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.NoNav |
|
||||||
ImGuiWindowFlags.NoBackground |
|
ImGuiWindowFlags.NoBackground |
|
||||||
ImGuiWindowFlags.NoCollapse |
|
ImGuiWindowFlags.NoCollapse |
|
||||||
|
ImGuiWindowFlags.NoInputs |
|
||||||
|
ImGuiWindowFlags.NoTitleBar |
|
||||||
|
ImGuiWindowFlags.NoScrollbar |
|
||||||
ImGuiWindowFlags.AlwaysAutoResize;
|
ImGuiWindowFlags.AlwaysAutoResize;
|
||||||
|
|
||||||
PositionCondition = ImGuiCond.Always;
|
PositionCondition = ImGuiCond.Always;
|
||||||
|
|||||||
@@ -76,13 +76,15 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
|
|||||||
ShowCloseButton = true;
|
ShowCloseButton = true;
|
||||||
|
|
||||||
Flags = ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse |
|
Flags = ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse |
|
||||||
ImGuiWindowFlags.NoTitleBar;
|
ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoMove;
|
||||||
|
|
||||||
SizeConstraints = new WindowSizeConstraints()
|
SizeConstraints = new WindowSizeConstraints()
|
||||||
{
|
{
|
||||||
MinimumSize = new Vector2(800, 700), MaximumSize = new Vector2(800, 700),
|
MinimumSize = new Vector2(800, 700), MaximumSize = new Vector2(800, 700),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
PositionCondition = ImGuiCond.Always;
|
||||||
|
|
||||||
LoadEmbeddedResources();
|
LoadEmbeddedResources();
|
||||||
logger.LogInformation("UpdateNotesUi constructor completed successfully");
|
logger.LogInformation("UpdateNotesUi constructor completed successfully");
|
||||||
}
|
}
|
||||||
@@ -93,11 +95,20 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
|
|||||||
_hasInitializedCollapsingHeaders = false;
|
_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()
|
protected override void DrawInternal()
|
||||||
{
|
{
|
||||||
if (_uiShared.IsInGpose)
|
if (_uiShared.IsInGpose)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
CenterWindow();
|
||||||
DrawHeader();
|
DrawHeader();
|
||||||
ImGuiHelpers.ScaledDummy(6);
|
ImGuiHelpers.ScaledDummy(6);
|
||||||
DrawTabs();
|
DrawTabs();
|
||||||
|
|||||||
Reference in New Issue
Block a user