Merge more UI refactor stuff (#11277)
* Changelog+options ui controller * Sandbox UI controller * Escape menu UI controller
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Client.Options.UI;
|
||||
using Content.Client.UserInterface.Systems.EscapeMenu;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -15,13 +16,10 @@ namespace Content.Client.Info
|
||||
[Dependency] private readonly IEntitySystemManager _sysMan = default!;
|
||||
[Dependency] private readonly RulesManager _rules = default!;
|
||||
|
||||
private OptionsMenu optionsMenu;
|
||||
|
||||
public RulesAndInfoWindow()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
optionsMenu = new OptionsMenu();
|
||||
|
||||
Title = Loc.GetString("ui-info-title");
|
||||
|
||||
@@ -52,7 +50,12 @@ namespace Content.Client.Info
|
||||
AddSection(tutorialList, Loc.GetString("ui-info-header-gameplay"), "Gameplay.txt", true);
|
||||
AddSection(tutorialList, Loc.GetString("ui-info-header-sandbox"), "Sandbox.txt", true);
|
||||
|
||||
infoControlSection.ControlsButton.OnPressed += _ => optionsMenu.OpenCentered();
|
||||
infoControlSection.ControlsButton.OnPressed += OnOptionsPressed;
|
||||
}
|
||||
|
||||
private void OnOptionsPressed(BaseButton.ButtonEventArgs obj)
|
||||
{
|
||||
IoCManager.Resolve<IUserInterfaceManager>().GetUIController<OptionsUIController>().ToggleWindow();
|
||||
}
|
||||
|
||||
private static void AddSection(Info info, Control control)
|
||||
|
||||
Reference in New Issue
Block a user