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:
@@ -17,6 +17,7 @@ namespace Content.Client.UserInterface.Stylesheets
|
||||
public const string ButtonOpenRight = "OpenRight";
|
||||
public const string ButtonOpenLeft = "OpenLeft";
|
||||
public const string ButtonOpenBoth = "OpenBoth";
|
||||
public const string ButtonSquare = "ButtonSquare";
|
||||
|
||||
public const string ButtonCaution = "Caution";
|
||||
|
||||
@@ -28,6 +29,7 @@ namespace Content.Client.UserInterface.Stylesheets
|
||||
protected StyleBoxTexture BaseButtonOpenRight { get; }
|
||||
protected StyleBoxTexture BaseButtonOpenLeft { get; }
|
||||
protected StyleBoxTexture BaseButtonOpenBoth { get; }
|
||||
protected StyleBoxTexture BaseButtonSquare { get; }
|
||||
|
||||
protected StyleBase(IResourceCache resCache)
|
||||
{
|
||||
@@ -70,6 +72,15 @@ namespace Content.Client.UserInterface.Stylesheets
|
||||
BaseButtonOpenBoth.SetPadding(StyleBox.Margin.Right, 2);
|
||||
BaseButtonOpenBoth.SetPadding(StyleBox.Margin.Left, 1);
|
||||
|
||||
BaseButtonSquare = new StyleBoxTexture(BaseButton)
|
||||
{
|
||||
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions((10, 0), (3, 24))),
|
||||
};
|
||||
BaseButtonSquare.SetPatchMargin(StyleBox.Margin.Horizontal, 0);
|
||||
BaseButtonSquare.SetContentMarginOverride(StyleBox.Margin.Horizontal, 8);
|
||||
BaseButtonSquare.SetPadding(StyleBox.Margin.Right, 2);
|
||||
BaseButtonSquare.SetPadding(StyleBox.Margin.Left, 1);
|
||||
|
||||
BaseRules = new[]
|
||||
{
|
||||
// Default font.
|
||||
|
||||
Reference in New Issue
Block a user