Fixed that notifcations prevents click around it.
This commit is contained in:
@@ -159,29 +159,29 @@ public class LightlessNotificationUi : WindowMediatorSubscriberBase
|
|||||||
{
|
{
|
||||||
var corner = _configService.Current.NotificationCorner;
|
var corner = _configService.Current.NotificationCorner;
|
||||||
var offsetX = _configService.Current.NotificationOffsetX;
|
var offsetX = _configService.Current.NotificationOffsetX;
|
||||||
|
var offsetY = _configService.Current.NotificationOffsetY;
|
||||||
var width = _configService.Current.NotificationWidth;
|
var width = _configService.Current.NotificationWidth;
|
||||||
|
|
||||||
float posX = corner == NotificationCorner.Left
|
float posX = corner == NotificationCorner.Left
|
||||||
? viewport.WorkPos.X + offsetX - _windowPaddingOffset
|
? viewport.WorkPos.X + offsetX - _windowPaddingOffset
|
||||||
: viewport.WorkPos.X + viewport.WorkSize.X - width - 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()
|
private void DrawAllNotifications()
|
||||||
{
|
{
|
||||||
var offsetY = _configService.Current.NotificationOffsetY;
|
var startY = ImGui.GetCursorPosY();
|
||||||
var startY = ImGui.GetCursorPosY() + offsetY;
|
|
||||||
|
|
||||||
for (int i = 0; i < _notifications.Count; i++)
|
for (int i = 0; i < _notifications.Count; i++)
|
||||||
{
|
{
|
||||||
var notification = _notifications[i];
|
var notification = _notifications[i];
|
||||||
|
|
||||||
if (_notificationYOffsets.TryGetValue(notification.Id, out var yOffset))
|
if (_notificationYOffsets.TryGetValue(notification.Id, out var yOffset))
|
||||||
{
|
|
||||||
ImGui.SetCursorPosY(startY + yOffset);
|
ImGui.SetCursorPosY(startY + yOffset);
|
||||||
}
|
|
||||||
|
|
||||||
DrawNotification(notification);
|
DrawNotification(notification);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user