Overlay notification opacity

This commit is contained in:
Natsumi
2025-06-20 18:39:40 +12:00
parent 84913a0ef6
commit 921070da71
7 changed files with 186 additions and 16 deletions

View File

@@ -89,7 +89,7 @@ namespace VRCX
/// <param name="body">The content of the notification.</param>
/// <param name="timeout">[CURRENTLY UNUSED]The timeout of the notification.</param>
/// <param name="image">The image of the notification.</param>
public void OVRTNotification(bool hudNotification, bool wristNotification, string title, string body, int timeout, string image = "")
public void OVRTNotification(bool hudNotification, bool wristNotification, string title, string body, int timeout, int opacity, string image = "")
{
List<OvrtMessage> messages = [];

View File

@@ -13,7 +13,7 @@ namespace VRCX
/// <param name="content">The content of the notification.</param>
/// <param name="timeout">The duration of the notification in milliseconds.</param>
/// <param name="image">The optional image to display in the notification.</param>
public void XSNotification(string title, string content, int timeout, string image = "")
public void XSNotification(string title, string content, int timeout, int opacity, string image = "")
{
var broadcastSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
var endPoint = new IPEndPoint(IPAddress.Loopback, 42069);
@@ -43,7 +43,8 @@ namespace VRCX
timeout = timeout,
audioPath = string.Empty,
useBase64Icon = useBase64Icon,
icon = icon
icon = icon,
opacity = opacity / 100f
};
var byteBuffer = JsonSerializer.SerializeToUtf8Bytes(msg);