Merge more UI refactor stuff (#11277)

* Changelog+options ui controller
* Sandbox UI controller
* Escape menu UI controller
This commit is contained in:
wrexbe
2022-09-14 14:34:48 -07:00
committed by GitHub
parent 8871c445b8
commit 018a96ee88
23 changed files with 591 additions and 573 deletions

View File

@@ -9,6 +9,7 @@ using Content.Client.Lobby.UI;
using Content.Client.Preferences;
using Content.Client.Preferences.UI;
using Content.Client.Resources;
using Content.Client.UserInterface.Systems.EscapeMenu;
using Content.Client.Voting;
using Content.Shared.GameTicking;
using Robust.Client;
@@ -106,7 +107,7 @@ namespace Content.Client.Lobby
};
_lobby.LeaveButton.OnPressed += _ => _consoleHost.ExecuteCommand("disconnect");
_lobby.OptionsButton.OnPressed += _ => new OptionsMenu().Open();
_lobby.OptionsButton.OnPressed += OnOptionsPressed;
_gameTicker.InfoBlobUpdated += UpdateLobbyUi;
@@ -114,6 +115,11 @@ namespace Content.Client.Lobby
_gameTicker.LobbyLateJoinStatusUpdated += LobbyLateJoinStatusUpdated;
}
private void OnOptionsPressed(BaseButton.ButtonEventArgs obj)
{
IoCManager.Resolve<IUserInterfaceManager>().GetUIController<OptionsUIController>().ToggleWindow();
}
protected override void Shutdown()
{
_gameTicker.InfoBlobUpdated -= UpdateLobbyUi;