mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-15 01:14:15 +01:00
add census popup on connection
This commit is contained in:
parent
05f1c66a5d
commit
a32aef8ee8
10 changed files with 99 additions and 0 deletions
|
|
@ -44,6 +44,13 @@ public class PopupHandler : WindowMediatorSubscriberBase
|
|||
((BanUserPopupHandler)_currentHandler).Open(msg);
|
||||
IsOpen = true;
|
||||
});
|
||||
|
||||
Mediator.Subscribe<OpenCensusPopupMessage>(this, (msg) =>
|
||||
{
|
||||
_openPopup = true;
|
||||
_currentHandler = _handlers.OfType<CensusPopupHandler>().Single();
|
||||
IsOpen = true;
|
||||
});
|
||||
}
|
||||
|
||||
public override void Draw()
|
||||
|
|
@ -66,6 +73,13 @@ public class PopupHandler : WindowMediatorSubscriberBase
|
|||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Times, "Close"))
|
||||
{
|
||||
ImGui.CloseCurrentPopup();
|
||||
_currentHandler.OnClose();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
base.OnClose();
|
||||
_currentHandler?.OnClose();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue