notification clickthrougable, update notes centered in the middle of the screen unmovable
This commit is contained in:
@@ -45,6 +45,9 @@ public class LightlessNotificationUi : WindowMediatorSubscriberBase
|
||||
ImGuiWindowFlags.NoNav |
|
||||
ImGuiWindowFlags.NoBackground |
|
||||
ImGuiWindowFlags.NoCollapse |
|
||||
ImGuiWindowFlags.NoInputs |
|
||||
ImGuiWindowFlags.NoTitleBar |
|
||||
ImGuiWindowFlags.NoScrollbar |
|
||||
ImGuiWindowFlags.AlwaysAutoResize;
|
||||
|
||||
PositionCondition = ImGuiCond.Always;
|
||||
|
||||
@@ -76,13 +76,15 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
|
||||
ShowCloseButton = true;
|
||||
|
||||
Flags = ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse |
|
||||
ImGuiWindowFlags.NoTitleBar;
|
||||
ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoMove;
|
||||
|
||||
SizeConstraints = new WindowSizeConstraints()
|
||||
{
|
||||
MinimumSize = new Vector2(800, 700), MaximumSize = new Vector2(800, 700),
|
||||
};
|
||||
|
||||
PositionCondition = ImGuiCond.Always;
|
||||
|
||||
LoadEmbeddedResources();
|
||||
logger.LogInformation("UpdateNotesUi constructor completed successfully");
|
||||
}
|
||||
@@ -93,11 +95,20 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
|
||||
_hasInitializedCollapsingHeaders = false;
|
||||
}
|
||||
|
||||
private void CenterWindow()
|
||||
{
|
||||
var viewport = ImGui.GetMainViewport();
|
||||
var center = viewport.GetCenter();
|
||||
var windowSize = new Vector2(800f * ImGuiHelpers.GlobalScale, 700f * ImGuiHelpers.GlobalScale);
|
||||
Position = center - windowSize / 2f;
|
||||
}
|
||||
|
||||
protected override void DrawInternal()
|
||||
{
|
||||
if (_uiShared.IsInGpose)
|
||||
return;
|
||||
|
||||
CenterWindow();
|
||||
DrawHeader();
|
||||
ImGuiHelpers.ScaledDummy(6);
|
||||
DrawTabs();
|
||||
|
||||
Reference in New Issue
Block a user