mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-15 02:24:15 +01:00
minor refactoring
This commit is contained in:
parent
142c65cc9d
commit
7baca3565a
34 changed files with 554 additions and 627 deletions
|
|
@ -13,9 +13,11 @@ public class PopupHandler : WindowMediatorSubscriberBase
|
|||
{
|
||||
protected bool _openPopup = false;
|
||||
private readonly HashSet<IPopupHandler> _handlers;
|
||||
private readonly UiSharedService _uiSharedService;
|
||||
private IPopupHandler? _currentHandler = null;
|
||||
|
||||
public PopupHandler(ILogger<PopupHandler> logger, MareMediator mediator, IEnumerable<IPopupHandler> popupHandlers, PerformanceCollectorService performanceCollectorService)
|
||||
public PopupHandler(ILogger<PopupHandler> logger, MareMediator mediator, IEnumerable<IPopupHandler> popupHandlers, PerformanceCollectorService performanceCollectorService,
|
||||
UiSharedService uiSharedService)
|
||||
: base(logger, mediator, "MarePopupHandler", performanceCollectorService)
|
||||
{
|
||||
Flags = ImGuiWindowFlags.NoBringToFrontOnFocus
|
||||
|
|
@ -52,6 +54,7 @@ public class PopupHandler : WindowMediatorSubscriberBase
|
|||
_currentHandler = _handlers.OfType<CensusPopupHandler>().Single();
|
||||
IsOpen = true;
|
||||
});
|
||||
_uiSharedService = uiSharedService;
|
||||
}
|
||||
|
||||
protected override void DrawInternal()
|
||||
|
|
@ -73,7 +76,7 @@ public class PopupHandler : WindowMediatorSubscriberBase
|
|||
if (_currentHandler.ShowClose)
|
||||
{
|
||||
ImGui.Separator();
|
||||
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.Times, "Close"))
|
||||
if (UiSharedService.IconTextButton(FontAwesomeIcon.Times, "Close"))
|
||||
{
|
||||
ImGui.CloseCurrentPopup();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue