adjust initial dialog to opt in/out into census with buttons

This commit is contained in:
rootdarkarchon
2023-11-21 14:59:43 +01:00
parent a32aef8ee8
commit 1dfdab4fef
6 changed files with 39 additions and 33 deletions

View File

@@ -69,17 +69,13 @@ public class PopupHandler : WindowMediatorSubscriberBase
using var popup = ImRaii.Popup(WindowName, ImGuiWindowFlags.Modal);
if (!popup) return;
_currentHandler.DrawContent();
ImGui.Separator();
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Times, "Close"))
if (_currentHandler.ShowClose)
{
ImGui.CloseCurrentPopup();
_currentHandler.OnClose();
ImGui.Separator();
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Times, "Close"))
{
ImGui.CloseCurrentPopup();
}
}
}
public override void OnClose()
{
base.OnClose();
_currentHandler?.OnClose();
}
}