Improved top menu (#2949)

* #272 proper open sides in menu buttons

* #272 WIP, good starting point for making
the top menu work well at different UI scales

* #272 WIP top menu looking better, but inconsistent size

* #272 WIP esc nice and big

* #272 consistently sized top buttons

* #272 proper highlighting of top menu elements

* #272 proper highlighting of top menu elements

* #272 nice shiny red tutorial button

* #272 better tutorial icon

* #272 missed svg changes

* #272 consistently sized top menu

* #272 better padding / alignment of top bar with other UI sections

* #272 fix hamburger menu height to
match others

* #272 top menu name set based on
keybind, use shortened names if possible

* #272 top menu name set based on
keybind, use shortened names if possible

* #272 add top menu actions button

* #272 add top menu admin button

* #272 fix sandbox top button down status

* #272 remove todo
This commit is contained in:
chairbender
2021-01-08 20:40:07 -08:00
committed by GitHub
parent 42171a9b70
commit 79dd7a7d7e
18 changed files with 685 additions and 108 deletions

View File

@@ -33,10 +33,12 @@ namespace Content.Client.Sandbox
public readonly Button ShowMarkersButton; //Shows spawn points
public readonly Button ShowBbButton; //Shows bounding boxes
public readonly Button MachineLinkingButton; // Enables/disables machine linking mode.
private readonly IGameHud _gameHud;
public SandboxWindow()
{
Resizable = false;
_gameHud = IoCManager.Resolve<IGameHud>();
Title = "Sandbox Panel";
@@ -82,6 +84,20 @@ namespace Content.Client.Sandbox
MachineLinkingButton = new Button { Text = Loc.GetString("Link machines"), ToggleMode = true };
vBox.AddChild(MachineLinkingButton);
}
protected override void EnteredTree()
{
base.EnteredTree();
_gameHud.SandboxButtonDown = true;
}
protected override void ExitedTree()
{
base.ExitedTree();
_gameHud.SandboxButtonDown = false;
}
}
internal class SandboxManager : SharedSandboxManager, ISandboxManager
@@ -197,7 +213,6 @@ namespace Content.Client.Sandbox
private void WindowOnOnClose()
{
_window = null;
_gameHud.SandboxButtonDown = false;
_sandboxWindowToggled = false;
}