From 6891424b0de9dac5eeeb0657e46faeab60542b6c Mon Sep 17 00:00:00 2001 From: cake Date: Sun, 14 Dec 2025 00:49:39 +0100 Subject: [PATCH] Fixed that notifcations prevents click around it. --- LightlessSync/UI/LightlessNotificationUI.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/LightlessSync/UI/LightlessNotificationUI.cs b/LightlessSync/UI/LightlessNotificationUI.cs index b280350..9c4f8f5 100644 --- a/LightlessSync/UI/LightlessNotificationUI.cs +++ b/LightlessSync/UI/LightlessNotificationUI.cs @@ -159,29 +159,29 @@ public class LightlessNotificationUi : WindowMediatorSubscriberBase { var corner = _configService.Current.NotificationCorner; var offsetX = _configService.Current.NotificationOffsetX; + var offsetY = _configService.Current.NotificationOffsetY; var width = _configService.Current.NotificationWidth; - + float posX = corner == NotificationCorner.Left ? viewport.WorkPos.X + offsetX - _windowPaddingOffset : viewport.WorkPos.X + viewport.WorkSize.X - width - offsetX - _windowPaddingOffset; - - return new Vector2(posX, viewport.WorkPos.Y); + + float posY = viewport.WorkPos.Y + offsetY; + + return new Vector2(posX, posY); } private void DrawAllNotifications() { - var offsetY = _configService.Current.NotificationOffsetY; - var startY = ImGui.GetCursorPosY() + offsetY; - + var startY = ImGui.GetCursorPosY(); + for (int i = 0; i < _notifications.Count; i++) { var notification = _notifications[i]; - + if (_notificationYOffsets.TryGetValue(notification.Id, out var yOffset)) - { ImGui.SetCursorPosY(startY + yOffset); - } - + DrawNotification(notification); } }