2.0.0 #92
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user