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

View File

@@ -56,6 +56,7 @@ namespace Content.Client.UserInterface
private readonly Button _clearButton; private readonly Button _clearButton;
private readonly GridContainer _resultsGrid; private readonly GridContainer _resultsGrid;
private readonly TextureRect _dragShadow; private readonly TextureRect _dragShadow;
private readonly IGameHud _gameHud;
private readonly DragDropHelper<ActionMenuItem> _dragDropHelper; private readonly DragDropHelper<ActionMenuItem> _dragDropHelper;
@@ -64,6 +65,8 @@ namespace Content.Client.UserInterface
_actionsComponent = actionsComponent; _actionsComponent = actionsComponent;
_actionsUI = actionsUI; _actionsUI = actionsUI;
_actionManager = IoCManager.Resolve<ActionManager>(); _actionManager = IoCManager.Resolve<ActionManager>();
_gameHud = IoCManager.Resolve<IGameHud>();
Title = Loc.GetString("Actions"); Title = Loc.GetString("Actions");
CustomMinimumSize = (300, 300); CustomMinimumSize = (300, 300);
@@ -143,14 +146,13 @@ namespace Content.Client.UserInterface
_dragDropHelper = new DragDropHelper<ActionMenuItem>(OnBeginActionDrag, OnContinueActionDrag, OnEndActionDrag); _dragDropHelper = new DragDropHelper<ActionMenuItem>(OnBeginActionDrag, OnContinueActionDrag, OnEndActionDrag);
} }
protected override void EnteredTree() protected override void EnteredTree()
{ {
base.EnteredTree(); base.EnteredTree();
_clearButton.OnPressed += OnClearButtonPressed; _clearButton.OnPressed += OnClearButtonPressed;
_searchBar.OnTextChanged += OnSearchTextChanged; _searchBar.OnTextChanged += OnSearchTextChanged;
_filterButton.OnItemSelected += OnFilterItemSelected; _filterButton.OnItemSelected += OnFilterItemSelected;
_gameHud.ActionsButtonDown = true;
foreach (var actionMenuControl in _resultsGrid.Children) foreach (var actionMenuControl in _resultsGrid.Children)
{ {
var actionMenuItem = (actionMenuControl as ActionMenuItem); var actionMenuItem = (actionMenuControl as ActionMenuItem);
@@ -167,7 +169,7 @@ namespace Content.Client.UserInterface
_clearButton.OnPressed -= OnClearButtonPressed; _clearButton.OnPressed -= OnClearButtonPressed;
_searchBar.OnTextChanged -= OnSearchTextChanged; _searchBar.OnTextChanged -= OnSearchTextChanged;
_filterButton.OnItemSelected -= OnFilterItemSelected; _filterButton.OnItemSelected -= OnFilterItemSelected;
_gameHud.ActionsButtonDown = false;
foreach (var actionMenuControl in _resultsGrid.Children) foreach (var actionMenuControl in _resultsGrid.Children)
{ {
var actionMenuItem = (actionMenuControl as ActionMenuItem); var actionMenuItem = (actionMenuControl as ActionMenuItem);

View File

@@ -32,6 +32,7 @@ namespace Content.Client.UserInterface
private readonly ActionManager _actionManager; private readonly ActionManager _actionManager;
private readonly IEntityManager _entityManager; private readonly IEntityManager _entityManager;
private readonly IGameTiming _gameTiming; private readonly IGameTiming _gameTiming;
private readonly IGameHud _gameHud;
private readonly ActionSlot[] _slots; private readonly ActionSlot[] _slots;
@@ -80,13 +81,15 @@ namespace Content.Client.UserInterface
_actionManager = IoCManager.Resolve<ActionManager>(); _actionManager = IoCManager.Resolve<ActionManager>();
_entityManager = IoCManager.Resolve<IEntityManager>(); _entityManager = IoCManager.Resolve<IEntityManager>();
_gameTiming = IoCManager.Resolve<IGameTiming>(); _gameTiming = IoCManager.Resolve<IGameTiming>();
_gameHud = IoCManager.Resolve<IGameHud>();
_menu = new ActionMenu(_actionsComponent, this); _menu = new ActionMenu(_actionsComponent, this);
LayoutContainer.SetGrowHorizontal(this, LayoutContainer.GrowDirection.End); LayoutContainer.SetGrowHorizontal(this, LayoutContainer.GrowDirection.End);
LayoutContainer.SetGrowVertical(this, LayoutContainer.GrowDirection.End); LayoutContainer.SetGrowVertical(this, LayoutContainer.GrowDirection.End);
LayoutContainer.SetAnchorTop(this, 0f); LayoutContainer.SetAnchorTop(this, 0f);
LayoutContainer.SetAnchorBottom(this, 0.8f); LayoutContainer.SetAnchorBottom(this, 0.8f);
LayoutContainer.SetMarginLeft(this, 10); LayoutContainer.SetMarginLeft(this, 13);
LayoutContainer.SetMarginTop(this, 100); LayoutContainer.SetMarginTop(this, 110);
SizeFlagsHorizontal = SizeFlags.None; SizeFlagsHorizontal = SizeFlags.None;
SizeFlagsVertical = SizeFlags.FillExpand; SizeFlagsVertical = SizeFlags.FillExpand;
@@ -208,6 +211,9 @@ namespace Content.Client.UserInterface
_lockButton.OnPressed += OnLockPressed; _lockButton.OnPressed += OnLockPressed;
_settingsButton.OnPressed += OnToggleActionsMenu; _settingsButton.OnPressed += OnToggleActionsMenu;
_loadoutContainer.OnKeyBindDown += OnHotbarPaginate; _loadoutContainer.OnKeyBindDown += OnHotbarPaginate;
_gameHud.ActionsButtonToggled += OnToggleActionsMenuTopButton;
_gameHud.ActionsButtonDown = false;
_gameHud.ActionsButtonVisible = true;
} }
protected override void ExitedTree() protected override void ExitedTree()
@@ -218,6 +224,9 @@ namespace Content.Client.UserInterface
_lockButton.OnPressed -= OnLockPressed; _lockButton.OnPressed -= OnLockPressed;
_settingsButton.OnPressed -= OnToggleActionsMenu; _settingsButton.OnPressed -= OnToggleActionsMenu;
_loadoutContainer.OnKeyBindDown -= OnHotbarPaginate; _loadoutContainer.OnKeyBindDown -= OnHotbarPaginate;
_gameHud.ActionsButtonToggled -= OnToggleActionsMenuTopButton;
_gameHud.ActionsButtonDown = false;
_gameHud.ActionsButtonVisible = false;
} }
protected override Vector2 CalculateMinimumSize() protected override Vector2 CalculateMinimumSize()
@@ -496,6 +505,13 @@ namespace Content.Client.UserInterface
ToggleActionsMenu(); ToggleActionsMenu();
} }
private void OnToggleActionsMenuTopButton(bool open)
{
if (open == _menu.IsOpen) return;
ToggleActionsMenu();
}
public void ToggleActionsMenu() public void ToggleActionsMenu()
{ {
if (_menu.IsOpen) if (_menu.IsOpen)

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic; using System.Collections.Generic;
using Content.Client.Administration;
using Content.Shared.Input; using Content.Shared.Input;
using Robust.Client.Console; using Robust.Client.Console;
using Robust.Client.Interfaces.Input; using Robust.Client.Interfaces.Input;
@@ -13,6 +14,8 @@ namespace Content.Client.UserInterface.AdminMenu
{ {
[Dependency] private readonly INetManager _netManager = default!; [Dependency] private readonly INetManager _netManager = default!;
[Dependency] private readonly IInputManager _inputManager = default!; [Dependency] private readonly IInputManager _inputManager = default!;
[Dependency] private readonly IGameHud _gameHud = default!;
[Dependency] private readonly IClientAdminManager _clientAdminManager = default!;
[Dependency] private readonly IClientConGroupController _clientConGroupController = default!; [Dependency] private readonly IClientConGroupController _clientConGroupController = default!;
private SS14Window _window; private SS14Window _window;
@@ -26,6 +29,30 @@ namespace Content.Client.UserInterface.AdminMenu
_inputManager.SetInputCommand(ContentKeyFunctions.OpenAdminMenu, _inputManager.SetInputCommand(ContentKeyFunctions.OpenAdminMenu,
InputCmdHandler.FromDelegate(session => Toggle())); InputCmdHandler.FromDelegate(session => Toggle()));
_clientAdminManager.AdminStatusUpdated += () =>
{
// when status changes, show the top button if we can open admin menu.
// if we can't or we lost admin status, close it and hide the button.
_gameHud.AdminButtonVisible = CanOpen();
if (!_gameHud.AdminButtonVisible)
{
Close();
}
};
_gameHud.AdminButtonToggled += (open) =>
{
if (open)
{
TryOpen();
}
else
{
Close();
}
};
_gameHud.AdminButtonVisible = CanOpen();
_gameHud.AdminButtonDown = false;
} }
public void ResetWindow() public void ResetWindow()

View File

@@ -31,6 +31,7 @@ namespace Content.Client.UserInterface.AdminMenu
public readonly TabContainer MasterTabContainer; public readonly TabContainer MasterTabContainer;
public readonly VBoxContainer PlayerList; public readonly VBoxContainer PlayerList;
public readonly Label PlayerCount; public readonly Label PlayerCount;
private readonly IGameHud _gameHud;
protected override Vector2? CustomSize => (500, 250); protected override Vector2? CustomSize => (500, 250);
@@ -207,6 +208,7 @@ namespace Content.Client.UserInterface.AdminMenu
public AdminMenuWindow() //TODO: search for buttons? public AdminMenuWindow() //TODO: search for buttons?
{ {
_gameHud = IoCManager.Resolve<IGameHud>();
Title = Loc.GetString("Admin Menu"); Title = Loc.GetString("Admin Menu");
#region PlayerList #region PlayerList
@@ -377,6 +379,19 @@ namespace Content.Client.UserInterface.AdminMenu
IoCManager.Resolve<IStationEventManager>().RequestEvents(); IoCManager.Resolve<IStationEventManager>().RequestEvents();
} }
protected override void ExitedTree()
{
base.ExitedTree();
_gameHud.AdminButtonDown = false;
}
protected override void EnteredTree()
{
base.EnteredTree();
_gameHud.AdminButtonDown = true;
}
#region CommandButtonBaseClass #region CommandButtonBaseClass
private abstract class CommandButton private abstract class CommandButton
{ {

View File

@@ -1,17 +1,25 @@
using System; using System;
using System.Transactions;
using Content.Client.UserInterface.Stylesheets;
using Content.Client.Utility; using Content.Client.Utility;
using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.Input; using Content.Shared.Input;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Client.Graphics.Drawing; using Robust.Client.Graphics.Drawing;
using Robust.Client.Input;
using Robust.Client.Interfaces.Input; using Robust.Client.Interfaces.Input;
using Robust.Client.Interfaces.ResourceManagement; using Robust.Client.Interfaces.ResourceManagement;
using Robust.Client.UserInterface; using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.Controls;
using Robust.Shared.Input;
using Robust.Shared.Input.Binding; using Robust.Shared.Input.Binding;
using Robust.Shared.IoC; using Robust.Shared.IoC;
using Robust.Shared.Localization; using Robust.Shared.Localization;
using Robust.Shared.Maths; using Robust.Shared.Maths;
using Robust.Shared.Utility;
using YamlDotNet.Core.Tokens;
using static Robust.Client.Input.Keyboard.Key;
using Control = Robust.Client.UserInterface.Control;
namespace Content.Client.UserInterface namespace Content.Client.UserInterface
{ {
@@ -41,6 +49,16 @@ namespace Content.Client.UserInterface
bool CraftingButtonVisible { get; set; } bool CraftingButtonVisible { get; set; }
Action<bool> CraftingButtonToggled { get; set; } Action<bool> CraftingButtonToggled { get; set; }
// Actions top button.
bool ActionsButtonDown { get; set; }
bool ActionsButtonVisible { get; set; }
Action<bool> ActionsButtonToggled { get; set; }
// Admin top button.
bool AdminButtonDown { get; set; }
bool AdminButtonVisible { get; set; }
Action<bool> AdminButtonToggled { get; set; }
// Sandbox top button. // Sandbox top button.
bool SandboxButtonDown { get; set; } bool SandboxButtonDown { get; set; }
bool SandboxButtonVisible { get; set; } bool SandboxButtonVisible { get; set; }
@@ -69,6 +87,8 @@ namespace Content.Client.UserInterface
private TopButton _buttonCharacterMenu; private TopButton _buttonCharacterMenu;
private TopButton _buttonInventoryMenu; private TopButton _buttonInventoryMenu;
private TopButton _buttonCraftingMenu; private TopButton _buttonCraftingMenu;
private TopButton _buttonActionsMenu;
private TopButton _buttonAdminMenu;
private TopButton _buttonSandboxMenu; private TopButton _buttonSandboxMenu;
private TutorialWindow _tutorialWindow; private TutorialWindow _tutorialWindow;
private TargetingDoll _targetingDoll; private TargetingDoll _targetingDoll;
@@ -112,12 +132,14 @@ namespace Content.Client.UserInterface
var characterTexture = _resourceCache.GetTexture("/Textures/Interface/character.svg.96dpi.png"); var characterTexture = _resourceCache.GetTexture("/Textures/Interface/character.svg.96dpi.png");
var inventoryTexture = _resourceCache.GetTexture("/Textures/Interface/inventory.svg.96dpi.png"); var inventoryTexture = _resourceCache.GetTexture("/Textures/Interface/inventory.svg.96dpi.png");
var craftingTexture = _resourceCache.GetTexture("/Textures/Interface/hammer.svg.96dpi.png"); var craftingTexture = _resourceCache.GetTexture("/Textures/Interface/hammer.svg.96dpi.png");
var tutorialTexture = _resourceCache.GetTexture("/Textures/Interface/students-cap.svg.96dpi.png"); var actionsTexture = _resourceCache.GetTexture("/Textures/Interface/fist.svg.96dpi.png");
var adminTexture = _resourceCache.GetTexture("/Textures/Interface/gavel.svg.96dpi.png");
var tutorialTexture = _resourceCache.GetTexture("/Textures/Interface/tutorial.svg.96dpi.png");
var sandboxTexture = _resourceCache.GetTexture("/Textures/Interface/sandbox.svg.96dpi.png"); var sandboxTexture = _resourceCache.GetTexture("/Textures/Interface/sandbox.svg.96dpi.png");
_topButtonsContainer = new HBoxContainer _topButtonsContainer = new HBoxContainer
{ {
SeparationOverride = 4 SeparationOverride = 8
}; };
RootControl.AddChild(_topButtonsContainer); RootControl.AddChild(_topButtonsContainer);
@@ -125,32 +147,29 @@ namespace Content.Client.UserInterface
LayoutContainer.SetAnchorAndMarginPreset(_topButtonsContainer, LayoutContainer.LayoutPreset.TopLeft, LayoutContainer.SetAnchorAndMarginPreset(_topButtonsContainer, LayoutContainer.LayoutPreset.TopLeft,
margin: 10); margin: 10);
// TODO: Pull key names here from the actual key binding config. // the icon textures here should all have the same image height (32) but different widths, so in order to ensure
// the buttons themselves are consistent widths we set a common custom min size
Vector2 topMinSize = (42, 64);
// Escape // Escape
_buttonEscapeMenu = new TopButton(escapeTexture, "Esc") _buttonEscapeMenu = new TopButton(escapeTexture, EngineKeyFunctions.EscapeMenu, _inputManager)
{ {
ToolTip = Loc.GetString("Open escape menu.") ToolTip = Loc.GetString("Open escape menu."),
CustomMinimumSize = (70, 64),
StyleClasses = {StyleBase.ButtonOpenRight}
}; };
_topButtonsContainer.AddChild(_buttonEscapeMenu); _topButtonsContainer.AddChild(_buttonEscapeMenu);
_buttonEscapeMenu.OnToggled += args => EscapeButtonToggled?.Invoke(args.Pressed); _buttonEscapeMenu.OnToggled += args => EscapeButtonToggled?.Invoke(args.Pressed);
// Tutorial
_buttonTutorial = new TopButton(tutorialTexture, "F1")
{
ToolTip = Loc.GetString("Open tutorial.")
};
_topButtonsContainer.AddChild(_buttonTutorial);
_buttonTutorial.OnToggled += a => ButtonTutorialOnOnToggled();
// Character // Character
_buttonCharacterMenu = new TopButton(characterTexture, "C") _buttonCharacterMenu = new TopButton(characterTexture, ContentKeyFunctions.OpenCharacterMenu, _inputManager)
{ {
ToolTip = Loc.GetString("Open character menu."), ToolTip = Loc.GetString("Open character menu."),
Visible = false CustomMinimumSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
}; };
_topButtonsContainer.AddChild(_buttonCharacterMenu); _topButtonsContainer.AddChild(_buttonCharacterMenu);
@@ -158,10 +177,12 @@ namespace Content.Client.UserInterface
_buttonCharacterMenu.OnToggled += args => CharacterButtonToggled?.Invoke(args.Pressed); _buttonCharacterMenu.OnToggled += args => CharacterButtonToggled?.Invoke(args.Pressed);
// Inventory // Inventory
_buttonInventoryMenu = new TopButton(inventoryTexture, "I") _buttonInventoryMenu = new TopButton(inventoryTexture, ContentKeyFunctions.OpenInventoryMenu, _inputManager)
{ {
ToolTip = Loc.GetString("Open inventory menu."), ToolTip = Loc.GetString("Open inventory menu."),
Visible = false CustomMinimumSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
}; };
_topButtonsContainer.AddChild(_buttonInventoryMenu); _topButtonsContainer.AddChild(_buttonInventoryMenu);
@@ -169,27 +190,69 @@ namespace Content.Client.UserInterface
_buttonInventoryMenu.OnToggled += args => InventoryButtonToggled?.Invoke(args.Pressed); _buttonInventoryMenu.OnToggled += args => InventoryButtonToggled?.Invoke(args.Pressed);
// Crafting // Crafting
_buttonCraftingMenu = new TopButton(craftingTexture, "G") _buttonCraftingMenu = new TopButton(craftingTexture, ContentKeyFunctions.OpenCraftingMenu, _inputManager)
{ {
ToolTip = Loc.GetString("Open crafting menu."), ToolTip = Loc.GetString("Open crafting menu."),
Visible = false CustomMinimumSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
}; };
_topButtonsContainer.AddChild(_buttonCraftingMenu); _topButtonsContainer.AddChild(_buttonCraftingMenu);
_buttonCraftingMenu.OnToggled += args => CraftingButtonToggled?.Invoke(args.Pressed); _buttonCraftingMenu.OnToggled += args => CraftingButtonToggled?.Invoke(args.Pressed);
// Actions
_buttonActionsMenu = new TopButton(actionsTexture, ContentKeyFunctions.OpenActionsMenu, _inputManager)
{
ToolTip = Loc.GetString("Open actions menu."),
CustomMinimumSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
};
_topButtonsContainer.AddChild(_buttonActionsMenu);
_buttonActionsMenu.OnToggled += args => ActionsButtonToggled?.Invoke(args.Pressed);
// Admin
_buttonAdminMenu = new TopButton(adminTexture, ContentKeyFunctions.OpenAdminMenu, _inputManager)
{
ToolTip = Loc.GetString("Open admin menu."),
CustomMinimumSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
};
_topButtonsContainer.AddChild(_buttonAdminMenu);
_buttonAdminMenu.OnToggled += args => AdminButtonToggled?.Invoke(args.Pressed);
// Sandbox // Sandbox
_buttonSandboxMenu = new TopButton(sandboxTexture, "B") _buttonSandboxMenu = new TopButton(sandboxTexture, ContentKeyFunctions.OpenSandboxWindow, _inputManager)
{ {
ToolTip = Loc.GetString("Open sandbox menu."), ToolTip = Loc.GetString("Open sandbox menu."),
Visible = false CustomMinimumSize = topMinSize,
Visible = false,
StyleClasses = {StyleBase.ButtonSquare}
}; };
_topButtonsContainer.AddChild(_buttonSandboxMenu); _topButtonsContainer.AddChild(_buttonSandboxMenu);
_buttonSandboxMenu.OnToggled += args => SandboxButtonToggled?.Invoke(args.Pressed); _buttonSandboxMenu.OnToggled += args => SandboxButtonToggled?.Invoke(args.Pressed);
// Tutorial
_buttonTutorial = new TopButton(tutorialTexture, ContentKeyFunctions.OpenTutorial, _inputManager)
{
ToolTip = Loc.GetString("Open tutorial."),
CustomMinimumSize = topMinSize,
StyleClasses = {StyleBase.ButtonOpenLeft, TopButton.StyleClassRedTopButton},
};
_topButtonsContainer.AddChild(_buttonTutorial);
_buttonTutorial.OnToggled += a => ButtonTutorialOnOnToggled();
_tutorialWindow = new TutorialWindow(); _tutorialWindow = new TutorialWindow();
_tutorialWindow.OnClose += () => _buttonTutorial.Pressed = false; _tutorialWindow.OnClose += () => _buttonTutorial.Pressed = false;
@@ -251,7 +314,8 @@ namespace Content.Client.UserInterface
RootControl.AddChild(SuspicionContainer); RootControl.AddChild(SuspicionContainer);
LayoutContainer.SetAnchorAndMarginPreset(SuspicionContainer, LayoutContainer.LayoutPreset.BottomLeft, margin: 10); LayoutContainer.SetAnchorAndMarginPreset(SuspicionContainer, LayoutContainer.LayoutPreset.BottomLeft,
margin: 10);
LayoutContainer.SetGrowHorizontal(SuspicionContainer, LayoutContainer.GrowDirection.End); LayoutContainer.SetGrowHorizontal(SuspicionContainer, LayoutContainer.GrowDirection.End);
LayoutContainer.SetGrowVertical(SuspicionContainer, LayoutContainer.GrowDirection.Begin); LayoutContainer.SetGrowVertical(SuspicionContainer, LayoutContainer.GrowDirection.Begin);
} }
@@ -330,6 +394,34 @@ namespace Content.Client.UserInterface
public Action<bool> CraftingButtonToggled { get; set; } public Action<bool> CraftingButtonToggled { get; set; }
public bool ActionsButtonDown
{
get => _buttonActionsMenu.Pressed;
set => _buttonActionsMenu.Pressed = value;
}
public bool ActionsButtonVisible
{
get => _buttonActionsMenu.Visible;
set => _buttonActionsMenu.Visible = value;
}
public Action<bool> ActionsButtonToggled { get; set; }
public bool AdminButtonDown
{
get => _buttonAdminMenu.Pressed;
set => _buttonAdminMenu.Pressed = value;
}
public bool AdminButtonVisible
{
get => _buttonAdminMenu.Visible;
set => _buttonAdminMenu.Visible = value;
}
public Action<bool> AdminButtonToggled { get; set; }
public bool SandboxButtonDown public bool SandboxButtonDown
{ {
get => _buttonSandboxMenu.Pressed; get => _buttonSandboxMenu.Pressed;
@@ -344,94 +436,203 @@ namespace Content.Client.UserInterface
public Action<bool> SandboxButtonToggled { get; set; } public Action<bool> SandboxButtonToggled { get; set; }
public sealed class TopButton : BaseButton public sealed class TopButton : ContainerButton
{ {
public const string StyleClassLabelTopButton = "topButtonLabel"; public const string StyleClassLabelTopButton = "topButtonLabel";
public const string StyleClassRedTopButton = "topButtonLabel";
private const float CustomTooltipDelay = 0.4f;
private static readonly Color ColorNormal = Color.FromHex("#7b7e9e"); private static readonly Color ColorNormal = Color.FromHex("#7b7e9e");
private static readonly Color ColorRedNormal = Color.FromHex("#FEFEFE");
private static readonly Color ColorHovered = Color.FromHex("#9699bb"); private static readonly Color ColorHovered = Color.FromHex("#9699bb");
private static readonly Color ColorRedHovered = Color.FromHex("#FFFFFF");
private static readonly Color ColorPressed = Color.FromHex("#789B8C"); private static readonly Color ColorPressed = Color.FromHex("#789B8C");
private const float VertPad = 8f;
private Color NormalColor => HasStyleClass(StyleClassRedTopButton) ? ColorRedNormal : ColorNormal;
private Color HoveredColor => HasStyleClass(StyleClassRedTopButton) ? ColorRedHovered : ColorHovered;
private readonly TextureRect _textureRect; private readonly TextureRect _textureRect;
private readonly Label _label; private readonly Label _label;
private readonly BoundKeyFunction _function;
private readonly IInputManager _inputManager;
public TopButton(Texture texture, string keyName) public TopButton(Texture texture, BoundKeyFunction function, IInputManager inputManager)
{ {
ToggleMode = true; _function = function;
_inputManager = inputManager;
TooltipDelay = CustomTooltipDelay;
AddChild(new MarginContainer AddChild(
{ new VBoxContainer
MarginTopOverride = 4,
Children =
{ {
new VBoxContainer Children =
{ {
Children = new Control {CustomMinimumSize = (0, VertPad)},
(_textureRect = new TextureRect
{ {
(_textureRect = new TextureRect Texture = texture,
{ SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
Texture = texture, SizeFlagsVertical = SizeFlags.Expand | SizeFlags.ShrinkCenter,
SizeFlagsHorizontal = SizeFlags.ShrinkCenter, ModulateSelfOverride = NormalColor,
SizeFlagsVertical = SizeFlags.Expand | SizeFlags.ShrinkCenter, Stretch = TextureRect.StretchMode.KeepCentered
ModulateSelfOverride = ColorNormal, }),
CustomMinimumSize = (0, 32), new Control {CustomMinimumSize = (0, VertPad)},
Stretch = TextureRect.StretchMode.KeepCentered (_label = new Label
}), {
(_label = new Label Text = ShortKeyName(_function),
{ SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
Text = keyName, ModulateSelfOverride = NormalColor,
SizeFlagsHorizontal = SizeFlags.ShrinkCenter, StyleClasses = {StyleClassLabelTopButton}
ModulateSelfOverride = ColorNormal, })
StyleClasses = {StyleClassLabelTopButton}
})
}
} }
} }
}); );
DrawModeChanged(); ToggleMode = true;
} }
protected override Vector2 CalculateMinimumSize() protected override void EnteredTree()
{ {
var styleSize = ActualStyleBox?.MinimumSize ?? Vector2.Zero; _inputManager.OnKeyBindingAdded += OnKeyBindingChanged;
return (0, 4) + styleSize + base.CalculateMinimumSize(); _inputManager.OnKeyBindingRemoved += OnKeyBindingChanged;
} }
protected override void Draw(DrawingHandleScreen handle) protected override void ExitedTree()
{ {
ActualStyleBox?.Draw(handle, PixelSizeBox); _inputManager.OnKeyBindingAdded -= OnKeyBindingChanged;
_inputManager.OnKeyBindingRemoved -= OnKeyBindingChanged;
} }
private StyleBox ActualStyleBox
private void OnKeyBindingChanged(IKeyBinding obj)
{ {
get _label.Text = ShortKeyName(_function);
}
private string ShortKeyName(BoundKeyFunction keyFunction)
{
// need to use shortened key names so they fit in the buttons.
return TryGetShortKeyName(keyFunction, out var name) ? Loc.GetString(name) : " ";
}
private bool TryGetShortKeyName(BoundKeyFunction keyFunction, out string name)
{
if (_inputManager.TryGetKeyBinding(keyFunction, out var binding))
{ {
TryGetStyleProperty(Button.StylePropertyStyleBox, out StyleBox ret); // can't possibly fit a modifier key in the top button, so omit it
return ret; var key = binding.BaseKey;
if (binding.Mod1 != Unknown || binding.Mod2 != Unknown ||
binding.Mod3 != Unknown)
{
name = null;
return false;
}
name = null;
name = key switch
{
Apostrophe => "'",
Comma => ",",
Delete => "Del",
Down => "Dwn",
Escape => "Esc",
Equal => "=",
Home => "Hom",
Insert => "Ins",
Left => "Lft",
Menu => "Men",
Minus => "-",
Num0 => "0",
Num1 => "1",
Num2 => "2",
Num3 => "3",
Num4 => "4",
Num5 => "5",
Num6 => "6",
Num7 => "7",
Num8 => "8",
Num9 => "9",
Pause => "||",
Period => ".",
Return => "Ret",
Right => "Rgt",
Slash => "/",
Space => "Spc",
Tab => "Tab",
Tilde => "~",
BackSlash => "\\",
BackSpace => "Bks",
LBracket => "[",
MouseButton4 => "M4",
MouseButton5 => "M5",
MouseButton6 => "M6",
MouseButton7 => "M7",
MouseButton8 => "M8",
MouseButton9 => "M9",
MouseLeft => "ML",
MouseMiddle => "MM",
MouseRight => "MR",
NumpadDecimal => "N.",
NumpadDivide => "N/",
NumpadEnter => "Ent",
NumpadMultiply => "*",
NumpadNum0 => "0",
NumpadNum1 => "1",
NumpadNum2 => "2",
NumpadNum3 => "3",
NumpadNum4 => "4",
NumpadNum5 => "5",
NumpadNum6 => "6",
NumpadNum7 => "7",
NumpadNum8 => "8",
NumpadNum9 => "9",
NumpadSubtract => "N-",
PageDown => "PgD",
PageUp => "PgU",
RBracket => "]",
SemiColon => ";",
_ => DefaultShortKeyName(keyFunction)
};
return name != null;
} }
name = null;
return false;
} }
protected override void DrawModeChanged() private string DefaultShortKeyName(BoundKeyFunction keyFunction)
{ {
var name = FormattedMessage.EscapeText(_inputManager.GetKeyFunctionButtonString(keyFunction));
return name.Length > 3 ? null : name;
}
protected override void StylePropertiesChanged()
{
// colors of children depend on style, so ensure we update when style is changed
base.StylePropertiesChanged();
UpdateChildColors();
}
private void UpdateChildColors()
{
if (_label == null || _textureRect == null) return;
switch (DrawMode) switch (DrawMode)
{ {
case DrawModeEnum.Normal: case DrawModeEnum.Normal:
SetOnlyStylePseudoClass(Button.StylePseudoClassNormal); _textureRect.ModulateSelfOverride = NormalColor;
_textureRect.ModulateSelfOverride = ColorNormal; _label.ModulateSelfOverride = NormalColor;
_label.ModulateSelfOverride = ColorNormal;
break; break;
case DrawModeEnum.Pressed: case DrawModeEnum.Pressed:
SetOnlyStylePseudoClass(Button.StylePseudoClassPressed);
_textureRect.ModulateSelfOverride = ColorPressed; _textureRect.ModulateSelfOverride = ColorPressed;
_label.ModulateSelfOverride = ColorPressed; _label.ModulateSelfOverride = ColorPressed;
break; break;
case DrawModeEnum.Hover: case DrawModeEnum.Hover:
SetOnlyStylePseudoClass(Button.StylePseudoClassHover); _textureRect.ModulateSelfOverride = HoveredColor;
_textureRect.ModulateSelfOverride = ColorHovered; _label.ModulateSelfOverride = HoveredColor;
_label.ModulateSelfOverride = ColorHovered;
break; break;
case DrawModeEnum.Disabled: case DrawModeEnum.Disabled:
@@ -439,15 +640,11 @@ namespace Content.Client.UserInterface
} }
} }
protected override void LayoutUpdateOverride()
{
var box = ActualStyleBox ?? new StyleBoxEmpty();
var contentBox = box.GetContentBox(PixelSizeBox);
foreach (var child in Children) protected override void DrawModeChanged()
{ {
FitChildInPixelBox(child, (UIBox2i) contentBox); base.DrawModeChanged();
} UpdateChildColors();
} }
} }
} }

View File

@@ -17,6 +17,7 @@ namespace Content.Client.UserInterface.Stylesheets
public const string ButtonOpenRight = "OpenRight"; public const string ButtonOpenRight = "OpenRight";
public const string ButtonOpenLeft = "OpenLeft"; public const string ButtonOpenLeft = "OpenLeft";
public const string ButtonOpenBoth = "OpenBoth"; public const string ButtonOpenBoth = "OpenBoth";
public const string ButtonSquare = "ButtonSquare";
public const string ButtonCaution = "Caution"; public const string ButtonCaution = "Caution";
@@ -28,6 +29,7 @@ namespace Content.Client.UserInterface.Stylesheets
protected StyleBoxTexture BaseButtonOpenRight { get; } protected StyleBoxTexture BaseButtonOpenRight { get; }
protected StyleBoxTexture BaseButtonOpenLeft { get; } protected StyleBoxTexture BaseButtonOpenLeft { get; }
protected StyleBoxTexture BaseButtonOpenBoth { get; } protected StyleBoxTexture BaseButtonOpenBoth { get; }
protected StyleBoxTexture BaseButtonSquare { get; }
protected StyleBase(IResourceCache resCache) protected StyleBase(IResourceCache resCache)
{ {
@@ -70,6 +72,15 @@ namespace Content.Client.UserInterface.Stylesheets
BaseButtonOpenBoth.SetPadding(StyleBox.Margin.Right, 2); BaseButtonOpenBoth.SetPadding(StyleBox.Margin.Right, 2);
BaseButtonOpenBoth.SetPadding(StyleBox.Margin.Left, 1); 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[] BaseRules = new[]
{ {
// Default font. // Default font.

View File

@@ -2,6 +2,7 @@
using Content.Client.GameObjects.EntitySystems; using Content.Client.GameObjects.EntitySystems;
using Content.Client.UserInterface.Controls; using Content.Client.UserInterface.Controls;
using Content.Client.Utility; using Content.Client.Utility;
using Robust.Client.Graphics;
using Robust.Client.Graphics.Drawing; using Robust.Client.Graphics.Drawing;
using Robust.Client.Interfaces.ResourceManagement; using Robust.Client.Interfaces.ResourceManagement;
using Robust.Client.UserInterface; using Robust.Client.UserInterface;
@@ -44,7 +45,9 @@ namespace Content.Client.UserInterface.Stylesheets
public static readonly Color NanoGold = Color.FromHex("#A88B5E"); public static readonly Color NanoGold = Color.FromHex("#A88B5E");
public static readonly Color ButtonColorDefault = Color.FromHex("#464966"); public static readonly Color ButtonColorDefault = Color.FromHex("#464966");
public static readonly Color ButtonColorDefaultRed = Color.FromHex("#D43B3B");
public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f"); public static readonly Color ButtonColorHovered = Color.FromHex("#575b7f");
public static readonly Color ButtonColorHoveredRed = Color.FromHex("#DF6B6B");
public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45"); public static readonly Color ButtonColorPressed = Color.FromHex("#3e6c45");
public static readonly Color ButtonColorDisabled = Color.FromHex("#30313c"); public static readonly Color ButtonColorDisabled = Color.FromHex("#30313c");
@@ -162,6 +165,33 @@ namespace Content.Client.UserInterface.Stylesheets
Modulate = ButtonColorPressed Modulate = ButtonColorPressed
}; };
var buttonTex = resCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png");
var topButtonBase = new StyleBoxTexture
{
Texture = buttonTex,
};
topButtonBase.SetPatchMargin(StyleBox.Margin.All, 10);
topButtonBase.SetPadding(StyleBox.Margin.All, 0);
topButtonBase.SetContentMarginOverride(StyleBox.Margin.All, 0);
var topButtonOpenRight = new StyleBoxTexture(topButtonBase)
{
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions((0, 0), (14, 24))),
};
topButtonOpenRight.SetPatchMargin(StyleBox.Margin.Right, 0);
var topButtonOpenLeft = new StyleBoxTexture(topButtonBase)
{
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions((10, 0), (14, 24))),
};
topButtonOpenLeft.SetPatchMargin(StyleBox.Margin.Left, 0);
var topButtonSquare = new StyleBoxTexture(topButtonBase)
{
Texture = new AtlasTexture(buttonTex, UIBox2.FromDimensions((10, 0), (3, 24))),
};
topButtonSquare.SetPatchMargin(StyleBox.Margin.Horizontal, 0);
var textureInvertedTriangle = resCache.GetTexture("/Textures/Interface/Nano/inverted_triangle.svg.png"); var textureInvertedTriangle = resCache.GetTexture("/Textures/Interface/Nano/inverted_triangle.svg.png");
var lineEditTex = resCache.GetTexture("/Textures/Interface/Nano/lineedit.png"); var lineEditTex = resCache.GetTexture("/Textures/Interface/Nano/lineedit.png");
@@ -410,6 +440,10 @@ namespace Content.Client.UserInterface.Stylesheets
.Class(ButtonOpenBoth) .Class(ButtonOpenBoth)
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenBoth), .Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenBoth),
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
.Class(ButtonSquare)
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonSquare),
new StyleRule(new SelectorElement(typeof(Label), new[] { Button.StyleClassButton }, null, null), new[] new StyleRule(new SelectorElement(typeof(Label), new[] { Button.StyleClassButton }, null, null), new[]
{ {
new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Center), new StyleProperty(Label.StylePropertyAlignMode, Label.AlignMode.Center),
@@ -808,8 +842,43 @@ namespace Content.Client.UserInterface.Stylesheets
}), }),
// Those top menu buttons. // Those top menu buttons.
Element<GameHud.TopButton>() // these use slight variations on the various BaseButton styles so that the content within them appears centered,
.Prop(Button.StylePropertyStyleBox, BaseButton), // which is NOT the case for the default BaseButton styles (OpenLeft/OpenRight adds extra padding on one of the sides
// which makes the TopButton icons appear off-center, which we don't want).
new StyleRule(
new SelectorElement(typeof(GameHud.TopButton), new[] {ButtonSquare}, null, null),
new[]
{
new StyleProperty(Button.StylePropertyStyleBox, topButtonSquare),
}),
new StyleRule(
new SelectorElement(typeof(GameHud.TopButton), new[] {ButtonOpenLeft}, null, null),
new[]
{
new StyleProperty(Button.StylePropertyStyleBox, topButtonOpenLeft),
}),
new StyleRule(
new SelectorElement(typeof(GameHud.TopButton), new[] {ButtonOpenRight}, null, null),
new[]
{
new StyleProperty(Button.StylePropertyStyleBox, topButtonOpenRight),
}),
new StyleRule(
new SelectorElement(typeof(GameHud.TopButton), null, null, new[] {Button.StylePseudoClassNormal}),
new[]
{
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorDefault),
}),
new StyleRule(
new SelectorElement(typeof(GameHud.TopButton), new[] {GameHud.TopButton.StyleClassRedTopButton}, null, new[] {Button.StylePseudoClassNormal}),
new[]
{
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorDefaultRed),
}),
new StyleRule( new StyleRule(
new SelectorElement(typeof(GameHud.TopButton), null, null, new[] {Button.StylePseudoClassNormal}), new SelectorElement(typeof(GameHud.TopButton), null, null, new[] {Button.StylePseudoClassNormal}),
@@ -832,6 +901,13 @@ namespace Content.Client.UserInterface.Stylesheets
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHovered), new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHovered),
}), }),
new StyleRule(
new SelectorElement(typeof(GameHud.TopButton), new[] {GameHud.TopButton.StyleClassRedTopButton}, null, new[] {Button.StylePseudoClassHover}),
new[]
{
new StyleProperty(Button.StylePropertyModulateSelf, ButtonColorHoveredRed),
}),
new StyleRule( new StyleRule(
new SelectorElement(typeof(Label), new[] {GameHud.TopButton.StyleClassLabelTopButton}, null, null), new SelectorElement(typeof(Label), new[] {GameHud.TopButton.StyleClassLabelTopButton}, null, null),
new[] new[]

View File

@@ -61,6 +61,10 @@ namespace Content.Client.UserInterface.Stylesheets
.Class(ButtonOpenBoth) .Class(ButtonOpenBoth)
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenBoth), .Prop(ContainerButton.StylePropertyStyleBox, BaseButtonOpenBoth),
Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
.Class(ButtonSquare)
.Prop(ContainerButton.StylePropertyStyleBox, BaseButtonSquare),
// Colors for the buttons. // Colors for the buttons.
Element<ContainerButton>().Class(ContainerButton.StyleClassButton) Element<ContainerButton>().Class(ContainerButton.StyleClassButton)
.Pseudo(ContainerButton.StylePseudoClassNormal) .Pseudo(ContainerButton.StylePseudoClassNormal)

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="19"
height="33"
viewBox="0 0 19 33"
fill="none"
version="1.1"
id="svg876"
sodipodi:docname="fist.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="C:\ss14\space-station-14\Resources\Textures\Interface\fist.svg.96dpi.png"
inkscape:export-xdpi="95.962189"
inkscape:export-ydpi="95.962189">
<metadata
id="metadata882">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs880" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview878"
showgrid="false"
inkscape:zoom="26.969697"
inkscape:cx="5.3842697"
inkscape:cy="16.5"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg876"
inkscape:pagecheckerboard="true" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M11.25 14.125V16.9375H9.375V14.125C9.375 11.5376 7.2749 9.4375 4.6875 9.4375V7.5625H6.5625C8.11865 7.5625 9.375 6.3064 9.375 4.75V3.8125H0V9.86865C0 13.3188 1.36865 16.675 3.75 19.1499C3.75 19.1499 3.75 23.9961 3.75 26.0236C3.75 28.2794 3.69224 28.3018 5.52217 30.287C7.3521 32.2722 10.727 32 10.727 32C10.727 32 13.6666 31.6559 15.0396 30.287C16.4126 28.918 16.875 26.0236 16.875 26.0236V19.0376L17.3438 18.1001C18.2625 16.2625 18.75 14.2 18.75 12.1375V9.4375H9.26245C10.4812 10.6187 11.25 12.2876 11.25 14.125Z"
fill="#789B8C"
id="path866"
style="fill:#feffff;fill-opacity:1" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M15.9375 1.9375H18.75V7.5625H15.9375V1.9375Z"
fill="#789B8C"
id="path868"
style="fill:#feffff;fill-opacity:1" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M11.25 0H14.0625V7.5625H11.25V0Z"
fill="#789B8C"
id="path870"
style="fill:#feffff;fill-opacity:1" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M6.5625 0H9.375V1.9375H6.5625V0Z"
fill="#789B8C"
id="path872"
style="fill:#feffff;fill-opacity:1" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M1.875 0H4.6875V1.9375H1.875V0Z"
fill="#789B8C"
id="path874"
style="fill:#feffff;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="27"
height="32"
viewBox="0 0 27 32"
fill="none"
version="1.1"
id="svg900"
sodipodi:docname="gavel.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="C:\ss14\space-station-14\Resources\Textures\Interface\gavel.svg.96dpi.png"
inkscape:export-xdpi="96.093094"
inkscape:export-ydpi="96.093094">
<metadata
id="metadata906">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs904" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview902"
showgrid="false"
inkscape:zoom="31.5"
inkscape:cx="13.5"
inkscape:cy="16"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg900"
inkscape:pagecheckerboard="true" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M18.0775 25.4082H3.14365C1.90509 25.4082 0.900024 26.4509 0.900024 27.7361V31.969H20.3211V27.7361C20.3211 26.4509 19.3161 25.4082 18.0775 25.4082Z"
fill="#7B7E9E"
id="path896"
style="fill:#ffffff;fill-opacity:1" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M25.8157 24.3901L12.5807 10.2906L14.8167 7.89409C15.2508 8.2913 15.9185 8.27188 16.3293 7.84565C16.7588 7.39521 16.7588 6.67344 16.3293 6.22299L10.6524 0.337833C10.2229 -0.112611 9.52259 -0.112611 9.09312 0.337833C8.65898 0.783484 8.65898 1.51005 9.09312 1.95563L9.04644 1.9072L1.8382 9.38109L1.88488 9.43432C1.45536 8.98387 0.755078 8.98387 0.325611 9.43432C-0.108537 9.87997 -0.108537 10.6065 0.325611 11.0522L5.99786 16.9421C6.43201 17.3878 7.13229 17.3878 7.56181 16.9421C7.99134 16.4917 7.99134 15.77 7.56181 15.3196L7.6085 15.3679L9.93835 13.0179L23.5734 27.0839C24.1102 27.641 25.2788 27.3369 25.8157 26.7799C26.3526 26.2228 26.3526 24.9471 25.8157 24.3901Z"
fill="#7B7E9E"
id="path898"
style="fill:#ffffff;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

View File

@@ -5,11 +5,39 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg4593" id="svg4593"
version="1.1" version="1.1"
viewBox="0 0 7.9563375 7.1438789" viewBox="0 0 7.9563375 7.1438789"
height="7.1438789mm" height="7.1438789mm"
width="7.9563375mm"> width="7.9563375mm"
sodipodi:docname="hamburger.svg"
inkscape:export-filename="C:\ss14\space-station-14\Resources\Textures\Interface\hamburger.svg.96dpi.png"
inkscape:export-xdpi="115.20007"
inkscape:export-ydpi="115.20007"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview9"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="32"
inkscape:cx="14.541508"
inkscape:cy="18.798475"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4593" />
<defs <defs
id="defs4587" /> id="defs4587" />
<metadata <metadata

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 316 B

View File

@@ -5,15 +5,21 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
id="svg1475" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="27.760838"
height="25.371094"
viewBox="0 0 27.760838 25.371094"
fill="none"
version="1.1" version="1.1"
viewBox="0 0 5.3731326 8.4666643" id="svg8"
height="8.4666643mm" sodipodi:docname="tutorial.svg"
width="5.3731327mm"> inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
<defs inkscape:export-filename="C:\ss14\space-station-14\Resources\Textures\Interface\tutorial.svg.96dpi.png"
id="defs1469" /> inkscape:export-xdpi="121.08268"
inkscape:export-ydpi="121.08268">
<metadata <metadata
id="metadata1472"> id="metadata14">
<rdf:RDF> <rdf:RDF>
<cc:Work <cc:Work
rdf:about=""> rdf:about="">
@@ -24,18 +30,37 @@
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>
<g <defs
transform="translate(-86.25635,-119.61469)" id="defs12" />
id="layer1"> <sodipodi:namedview
<path pagecolor="#ffffff"
id="path2050" bordercolor="#666666"
d="m 88.782112,125.68043 c 0,-0.22408 0.08061,-0.54167 0.147556,-0.68488 0.443259,-0.9484 2.067069,-0.31899 2.067069,-2.72423 0,-1.19082 -0.789124,-2.02388 -1.976921,-2.02388 -1.187795,0 -2.13072,0.83017 -2.13072,2.02388" borderopacity="1"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.26549149;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> objecttolerance="10"
<circle gridtolerance="10"
r="0.94911855" guidetolerance="10"
cy="127.13224" inkscape:pageopacity="0"
cx="88.782127" inkscape:pageshadow="2"
id="path5787" inkscape:window-width="2560"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2.95794892;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> inkscape:window-height="1377"
</g> id="namedview10"
showgrid="false"
inkscape:pagecheckerboard="true"
inkscape:zoom="32.5625"
inkscape:cx="9.9955816"
inkscape:cy="12.685547"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg8"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<path
id="path2"
style="fill:#ffffff;fill-opacity:1"
d="m 13.880421,0 c -1.0214,1.4000018e-6 -2.042034,0.510315 -2.615234,1.53125 L 0.38823357,20.902344 c -1.12269,1.9998 0.3238175,4.46875 2.61718753,4.46875 h 10.8749999 10.875 c 2.2933,0 3.739886,-2.46895 2.617188,-4.46875 L 16.495655,1.53125 C 15.922455,0.5103201 14.901821,-1.0999982e-6 13.880421,0 Z m 0,4.3710938 c 1.1046,0 2,0.89543 2,2 v 1 8.0000002 c 0,1.1046 -0.8954,2 -2,2 -1.1046,0 -2,-0.8954 -2,-2 v -8.0000002 -1 c 0,-1.10457 0.8954,-2 2,-2 z m -0.04883,15.0000002 a 2,2 0 0 1 0.04883,0 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 1.951172,-2 z"
inkscape:export-xdpi="121.08268"
inkscape:export-ydpi="121.08268" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 644 B

View File

@@ -315,7 +315,7 @@ binds:
key: Z key: Z
- function: OpenAbilitiesMenu - function: OpenAbilitiesMenu
type: State type: State
key: Equal key: K
- function: Hotbar0 - function: Hotbar0
type: State type: State
key: Num0 key: Num0