diff --git a/Content.Client/Construction/ConstructionButton.cs b/Content.Client/Construction/ConstructionButton.cs
deleted file mode 100644
index 900ed2b302..0000000000
--- a/Content.Client/Construction/ConstructionButton.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-using Content.Client.GameObjects.Components.Construction;
-using Robust.Client.Interfaces.Graphics;
-using Robust.Client.UserInterface.Controls;
-using Robust.Shared.Maths;
-using Robust.Shared.Utility;
-
-namespace Content.Client.Construction
-{
- public class ConstructionButton : Button
- {
- public ConstructorComponent Owner
- {
- get => Menu.Owner;
- set => Menu.Owner = value;
- }
- ConstructionMenu Menu;
-
- public ConstructionButton()
- {
- PerformLayout();
- }
-
- protected override void Initialize()
- {
- base.Initialize();
-
- SetAnchorPreset(LayoutPreset.BottomRight);
- MarginLeft = -110.0f;
- MarginTop = -70.0f;
- MarginRight = -50.0f;
- MarginBottom = -50.0f;
- Text = "Crafting";
- OnPressed += IWasPressed;
- }
-
- private void PerformLayout()
- {
- Menu = new ConstructionMenu();
- Menu.AddToScreen();
- }
-
- void IWasPressed(ButtonEventArgs args)
- {
- Menu.Open();
- }
-
- public void AddToScreen()
- {
- UserInterfaceManager.StateRoot.AddChild(this);
- }
-
- public void RemoveFromScreen()
- {
- if (Parent != null)
- {
- Parent.RemoveChild(this);
- }
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- Menu.Dispose();
- }
-
- base.Dispose(disposing);
- }
- }
-}
diff --git a/Content.Client/EscapeMenuOwner.cs b/Content.Client/EscapeMenuOwner.cs
index 45ba4bc5cb..cec826486a 100644
--- a/Content.Client/EscapeMenuOwner.cs
+++ b/Content.Client/EscapeMenuOwner.cs
@@ -95,7 +95,7 @@ namespace Content.Client
else
{
_gameHud.EscapeButtonDown = false;
- _escapeMenu.Visible = false;
+ _escapeMenu.Close();
}
}
}
diff --git a/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs b/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs
index b1022fecf3..c568d25b46 100644
--- a/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs
+++ b/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs
@@ -1,15 +1,16 @@
-using Content.Client.GameObjects.Components.Mobs;
+using System.Collections.Generic;
+using System.Linq;
+using Content.Client.GameObjects.Components.Mobs;
+using Content.Client.UserInterface;
using Content.Shared.Input;
+using Robust.Client.GameObjects;
using Robust.Client.Interfaces.Input;
+using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.GameObjects;
-using Robust.Shared.Input;
+using Robust.Shared.Interfaces.GameObjects;
+using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
-using Robust.Shared.Utility;
-using System.Collections.Generic;
-using System.Linq;
-using Robust.Client.Interfaces.Graphics;
-using Robust.Client.UserInterface.Controls;
namespace Content.Client.GameObjects.Components.Actor
{
@@ -21,15 +22,15 @@ namespace Content.Client.GameObjects.Components.Actor
{
public override string Name => "Character Interface Component";
- ///
- /// Stored keybind to open the menu on keypress
- ///
- private InputCmdHandler _openMenuCmdHandler;
+ [Dependency]
+#pragma warning disable 649
+ private readonly IGameHud _gameHud;
+#pragma warning restore 649
///
/// Window to hold each of the character interfaces
///
- private SS14Window _window;
+ public SS14Window Window { get; private set; }
///
/// Create the window with all character UIs and bind it to a keypress
@@ -39,26 +40,11 @@ namespace Content.Client.GameObjects.Components.Actor
base.Initialize();
//Use all the character ui interfaced components to create the character window
- var UIcomponents = Owner.GetAllComponents();
- _window = new CharacterWindow(UIcomponents);
+ var uiComponents = Owner.GetAllComponents();
+ Window = new CharacterWindow(uiComponents);
+ Window.OnClose += () => _gameHud.CharacterButtonDown = false;
- _window.AddToScreen();
-
- //Toggle window visible/invisible on keypress
- _openMenuCmdHandler = InputCmdHandler.FromDelegate(session => {
- if (_window.Visible)
- {
- _window.Close();
- }
- else
- {
- _window.Open();
- }
- });
-
- //Set keybind to open character menu
- var inputMgr = IoCManager.Resolve();
- inputMgr.SetInputCommand(ContentKeyFunctions.OpenCharacterMenu, _openMenuCmdHandler);
+ Window.AddToScreen();
}
///
@@ -68,13 +54,40 @@ namespace Content.Client.GameObjects.Components.Actor
{
base.OnRemove();
- _window.Dispose();
- _window = null;
+ Window.Dispose();
+ Window = null;
var inputMgr = IoCManager.Resolve();
inputMgr.SetInputCommand(ContentKeyFunctions.OpenCharacterMenu, null);
}
+ public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
+ {
+ base.HandleMessage(message, netChannel, component);
+
+ switch (message)
+ {
+ case PlayerAttachedMsg playerAttachedMsg:
+ _gameHud.CharacterButtonVisible = true;
+ _gameHud.CharacterButtonToggled = b =>
+ {
+ if (b)
+ {
+ Window.Open();
+ }
+ else
+ {
+ Window.Close();
+ }
+ };
+ break;
+
+ case PlayerDetachedMsg playerDetachedMsg:
+ _gameHud.CharacterButtonVisible = false;
+ break;
+ }
+ }
+
///
/// A window that collects and shows all the individual character user interfaces
///
diff --git a/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs b/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs
index b2243449b8..8805f76f81 100644
--- a/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs
+++ b/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs
@@ -1,16 +1,15 @@
using System.Collections.Generic;
using Content.Client.Construction;
+using Content.Client.UserInterface;
using Content.Shared.Construction;
using Content.Shared.GameObjects.Components.Construction;
using Robust.Client.GameObjects;
using Robust.Client.Interfaces.GameObjects;
-using Robust.Client.Interfaces.Graphics;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
-using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
@@ -18,17 +17,19 @@ namespace Content.Client.GameObjects.Components.Construction
{
public class ConstructorComponent : SharedConstructorComponent
{
- int nextId;
- readonly Dictionary Ghosts = new Dictionary();
- ConstructionButton Button;
+#pragma warning disable 649
+ [Dependency] private readonly IGameHud _gameHud;
+#pragma warning restore 649
- ITransformComponent Transform;
+ private int nextId;
+ private readonly Dictionary Ghosts = new Dictionary();
+ public ConstructionMenu ConstructionMenu { get; private set; }
public override void Initialize()
{
base.Initialize();
- Transform = Owner.GetComponent();
+ Owner.GetComponent();
}
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
@@ -38,15 +39,30 @@ namespace Content.Client.GameObjects.Components.Construction
switch (message)
{
case PlayerAttachedMsg _:
- if (Button == null)
+ if (ConstructionMenu == null)
{
- Button = new ConstructionButton {Owner = this};
+ ConstructionMenu = new ConstructionMenu {Owner = this};
+ ConstructionMenu.OnClose += () => _gameHud.CraftingButtonDown = false;
}
- Button.AddToScreen();
+ ConstructionMenu.AddToScreen();
+
+ _gameHud.CraftingButtonVisible = true;
+ _gameHud.CraftingButtonToggled = b =>
+ {
+ if (b)
+ {
+ ConstructionMenu.Open();
+ }
+ else
+ {
+ ConstructionMenu.Close();
+ }
+ };
break;
case PlayerDetachedMsg _:
- Button.RemoveFromScreen();
+ ConstructionMenu.Parent.RemoveChild(ConstructionMenu);
+ _gameHud.CraftingButtonVisible = false;
break;
case AckStructureConstructionMessage ackMsg:
@@ -57,7 +73,7 @@ namespace Content.Client.GameObjects.Components.Construction
public override void OnRemove()
{
- Button?.Dispose();
+ ConstructionMenu?.Dispose();
}
public void SpawnGhost(ConstructionPrototype prototype, GridCoordinates loc, Direction dir)
diff --git a/Content.Client/GameObjects/EntitySystems/CharacterInterfaceSystem.cs b/Content.Client/GameObjects/EntitySystems/CharacterInterfaceSystem.cs
new file mode 100644
index 0000000000..47d86f42cc
--- /dev/null
+++ b/Content.Client/GameObjects/EntitySystems/CharacterInterfaceSystem.cs
@@ -0,0 +1,70 @@
+using Content.Client.GameObjects.Components.Actor;
+using Content.Client.UserInterface;
+using Content.Shared.Input;
+using Robust.Client.GameObjects.EntitySystems;
+using Robust.Client.Player;
+using Robust.Client.UserInterface.CustomControls;
+using Robust.Shared.GameObjects.Systems;
+using Robust.Shared.Input;
+using Robust.Shared.IoC;
+
+namespace Content.Client.GameObjects.EntitySystems
+{
+ public sealed class CharacterInterfaceSystem : EntitySystem
+ {
+#pragma warning disable 649
+ [Dependency] private readonly IGameHud _gameHud;
+ [Dependency] private readonly IPlayerManager _playerManager;
+#pragma warning restore 649
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ var inputSys = EntitySystemManager.GetEntitySystem();
+ inputSys.BindMap.BindFunction(ContentKeyFunctions.OpenCharacterMenu,
+ new PointerInputCmdHandler(HandleOpenCharacterMenu));
+ }
+
+ private void HandleOpenCharacterMenu(in PointerInputCmdHandler.PointerInputCmdArgs args)
+ {
+ if (_playerManager.LocalPlayer.ControlledEntity == null
+ || !_playerManager.LocalPlayer.ControlledEntity.TryGetComponent(out CharacterInterface characterInterface))
+ {
+ return;
+ }
+
+ var menu = characterInterface.Window;
+
+ if (menu.Visible)
+ {
+ if (menu.IsAtFront())
+ {
+ _setOpenValue(menu, false);
+ }
+ else
+ {
+ menu.MoveToFront();
+ }
+ }
+ else
+ {
+ _setOpenValue(menu, true);
+ }
+ }
+
+ private void _setOpenValue(SS14Window menu, bool value)
+ {
+ if (value)
+ {
+ _gameHud.CharacterButtonDown = true;
+ menu.OpenCentered();
+ }
+ else
+ {
+ _gameHud.CharacterButtonDown = false;
+ menu.Close();
+ }
+ }
+ }
+}
diff --git a/Content.Client/GameObjects/EntitySystems/ConstructorSystem.cs b/Content.Client/GameObjects/EntitySystems/ConstructorSystem.cs
new file mode 100644
index 0000000000..d4f626efb9
--- /dev/null
+++ b/Content.Client/GameObjects/EntitySystems/ConstructorSystem.cs
@@ -0,0 +1,70 @@
+using Content.Client.Construction;
+using Content.Client.GameObjects.Components.Construction;
+using Content.Client.UserInterface;
+using Content.Shared.Input;
+using Robust.Client.GameObjects.EntitySystems;
+using Robust.Client.Player;
+using Robust.Shared.GameObjects.Systems;
+using Robust.Shared.Input;
+using Robust.Shared.IoC;
+
+namespace Content.Client.GameObjects.EntitySystems
+{
+ public sealed class ConstructorSystem : EntitySystem
+ {
+#pragma warning disable 649
+ [Dependency] private readonly IGameHud _gameHud;
+ [Dependency] private readonly IPlayerManager _playerManager;
+#pragma warning restore 649
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ var inputSys = EntitySystemManager.GetEntitySystem();
+ inputSys.BindMap.BindFunction(ContentKeyFunctions.OpenCraftingMenu,
+ new PointerInputCmdHandler(HandleOpenCraftingMenu));
+ }
+
+ private void HandleOpenCraftingMenu(in PointerInputCmdHandler.PointerInputCmdArgs args)
+ {
+ if (_playerManager.LocalPlayer.ControlledEntity == null
+ || !_playerManager.LocalPlayer.ControlledEntity.TryGetComponent(out ConstructorComponent constructor))
+ {
+ return;
+ }
+
+ var menu = constructor.ConstructionMenu;
+
+ if (menu.Visible)
+ {
+ if (menu.IsAtFront())
+ {
+ _setOpenValue(menu, false);
+ }
+ else
+ {
+ menu.MoveToFront();
+ }
+ }
+ else
+ {
+ _setOpenValue(menu, true);
+ }
+ }
+
+ private void _setOpenValue(ConstructionMenu menu, bool value)
+ {
+ if (value)
+ {
+ _gameHud.CraftingButtonDown = true;
+ menu.OpenCentered();
+ }
+ else
+ {
+ _gameHud.CraftingButtonDown = false;
+ menu.Close();
+ }
+ }
+ }
+}
diff --git a/Content.Client/GameTicking/ClientGameTicker.cs b/Content.Client/GameTicking/ClientGameTicker.cs
index 4ffa820e50..2ae446cc55 100644
--- a/Content.Client/GameTicking/ClientGameTicker.cs
+++ b/Content.Client/GameTicking/ClientGameTicker.cs
@@ -45,7 +45,6 @@ namespace Content.Client.GameTicking
[ViewVariables] private LobbyGui _lobby;
[ViewVariables] private bool _gameStarted;
[ViewVariables] private DateTime _startTime;
- [ViewVariables] private TutorialButton _tutorialButton;
public void Initialize()
{
@@ -172,12 +171,6 @@ namespace Content.Client.GameTicking
_gameChat = null;
}
- if (_tutorialButton != null)
- {
- _tutorialButton.Dispose();
- _tutorialButton = null;
- }
-
_gameHud.RootControl.Parent?.RemoveChild(_gameHud.RootControl);
_tickerState = TickerState.InLobby;
@@ -253,9 +246,6 @@ namespace Content.Client.GameTicking
_userInterfaceManager.StateRoot.AddChild(_gameChat);
_userInterfaceManager.StateRoot.AddChild(_gameHud.RootControl);
_chatManager.SetChatBox(_gameChat);
- _tutorialButton = new TutorialButton();
- _userInterfaceManager.StateRoot.AddChild(_tutorialButton);
- _tutorialButton.SetAnchorAndMarginPreset(Control.LayoutPreset.BottomLeft, Control.LayoutPresetMode.MinSize, 50);
_gameChat.DefaultChatFormat = "say \"{0}\"";
}
diff --git a/Content.Client/Input/ContentContexts.cs b/Content.Client/Input/ContentContexts.cs
index 98f3fe1ee1..2f3d773eef 100644
--- a/Content.Client/Input/ContentContexts.cs
+++ b/Content.Client/Input/ContentContexts.cs
@@ -24,6 +24,7 @@ namespace Content.Client.Input
human.AddFunction(ContentKeyFunctions.ActivateItemInWorld);
human.AddFunction(ContentKeyFunctions.ThrowItemInHand);
human.AddFunction(ContentKeyFunctions.OpenContextMenu);
+ human.AddFunction(ContentKeyFunctions.OpenCraftingMenu);
// Disabled until there is feedback, so hitting tab doesn't suddenly break interaction.
// human.AddFunction(ContentKeyFunctions.ToggleCombatMode);
diff --git a/Content.Client/UserInterface/GameHud.cs b/Content.Client/UserInterface/GameHud.cs
index 1df2b16405..44b4ec2cd7 100644
--- a/Content.Client/UserInterface/GameHud.cs
+++ b/Content.Client/UserInterface/GameHud.cs
@@ -18,8 +18,21 @@ namespace Content.Client.UserInterface
{
Control RootControl { get; }
+ // Escape top button.
bool EscapeButtonDown { get; set; }
Action EscapeButtonToggled { get; set; }
+
+ // Character top button.
+ bool CharacterButtonDown { get; set; }
+ bool CharacterButtonVisible { get; set; }
+ Action CharacterButtonToggled { get; set; }
+
+ // Crafting top button.
+ bool CraftingButtonDown { get; set; }
+ bool CraftingButtonVisible { get; set; }
+ Action CraftingButtonToggled { get; set; }
+
+ // Init logic.
void Initialize();
}
@@ -27,8 +40,10 @@ namespace Content.Client.UserInterface
{
private HBoxContainer _topButtonsContainer;
private TopButton _buttonEscapeMenu;
- private TopButton _buttonInventoryMenu;
+ private TopButton _buttonTutorial;
+ private TopButton _buttonCharacterMenu;
private TopButton _buttonCraftingMenu;
+ private TutorialWindow _tutorialWindow;
#pragma warning disable 649
[Dependency] private readonly IResourceCache _resourceCache;
@@ -42,6 +57,9 @@ namespace Content.Client.UserInterface
RootControl.SetAnchorPreset(Control.LayoutPreset.Wide);
var escapeTexture = _resourceCache.GetTexture("/Textures/UserInterface/hamburger.svg.96dpi.png");
+ var characterTexture = _resourceCache.GetTexture("/Textures/UserInterface/character.svg.96dpi.png");
+ var craftingTexture = _resourceCache.GetTexture("/Textures/UserInterface/hammer.svg.96dpi.png");
+ var tutorialTexture = _resourceCache.GetTexture("/Textures/UserInterface/tutorial.svg.96dpi.png");
_topButtonsContainer = new HBoxContainer
{
@@ -53,30 +71,71 @@ namespace Content.Client.UserInterface
// TODO: Pull key names here from the actual key binding config.
// Escape
- _buttonEscapeMenu = new TopButton(escapeTexture, "esc")
+ _buttonEscapeMenu = new TopButton(escapeTexture, "ESC")
{
ToolTip = _localizationManager.GetString("Open escape menu.")
};
_topButtonsContainer.AddChild(_buttonEscapeMenu);
- // Inventory
- _buttonInventoryMenu = new TopButton(escapeTexture, "i")
+ _buttonEscapeMenu.OnToggled += args => EscapeButtonToggled?.Invoke(args.Pressed);
+
+ // Tutorial
+ _buttonTutorial = new TopButton(tutorialTexture, " ")
{
- ToolTip = _localizationManager.GetString("Open inventory menu.")
+ ToolTip = _localizationManager.GetString("Open tutorial.")
};
- _topButtonsContainer.AddChild(_buttonInventoryMenu);
+ _topButtonsContainer.AddChild(_buttonTutorial);
+
+ _buttonTutorial.OnToggled += ButtonTutorialOnOnToggled;
+
+ // Inventory
+ _buttonCharacterMenu = new TopButton(characterTexture, "C")
+ {
+ ToolTip = _localizationManager.GetString("Open character menu."),
+ Visible = false
+ };
+
+ _topButtonsContainer.AddChild(_buttonCharacterMenu);
+
+ _buttonCharacterMenu.OnToggled += args => CharacterButtonToggled?.Invoke(args.Pressed);
// Crafting
- _buttonCraftingMenu = new TopButton(escapeTexture, "g")
+ _buttonCraftingMenu = new TopButton(craftingTexture, "G")
{
- ToolTip = _localizationManager.GetString("Open crafting menu.")
+ ToolTip = _localizationManager.GetString("Open crafting menu."),
+ Visible = false
};
_topButtonsContainer.AddChild(_buttonCraftingMenu);
- _buttonEscapeMenu.OnToggled += args => EscapeButtonToggled?.Invoke(args.Pressed);
+ _buttonCraftingMenu.OnToggled += args => CraftingButtonToggled?.Invoke(args.Pressed);
+
+ _tutorialWindow = new TutorialWindow();
+ _tutorialWindow.AddToScreen();
+
+ _tutorialWindow.OnClose += () => _buttonTutorial.Pressed = false;
+ }
+
+ private void ButtonTutorialOnOnToggled(BaseButton.ButtonToggledEventArgs obj)
+ {
+ if (_tutorialWindow.Visible)
+ {
+ if (!_tutorialWindow.IsAtFront())
+ {
+ _tutorialWindow.MoveToFront();
+ }
+ else
+ {
+ _tutorialWindow.Close();
+ }
+ }
+ else
+ {
+ _tutorialWindow.OpenCentered();
+ _buttonTutorial.Pressed = true;
+ }
}
public Control RootControl { get; private set; }
@@ -89,6 +148,33 @@ namespace Content.Client.UserInterface
public Action EscapeButtonToggled { get; set; }
+ public bool CharacterButtonDown
+ {
+ get => _buttonCharacterMenu.Pressed;
+ set => _buttonCharacterMenu.Pressed = value;
+ }
+
+ public bool CharacterButtonVisible
+ {
+ get => _buttonCharacterMenu.Visible;
+ set => _buttonCharacterMenu.Visible = value;
+ }
+
+ public Action CharacterButtonToggled { get; set; }
+
+ public bool CraftingButtonDown
+ {
+ get => _buttonCraftingMenu.Pressed;
+ set => _buttonCraftingMenu.Pressed = value;
+ }
+
+ public bool CraftingButtonVisible
+ {
+ get => _buttonCraftingMenu.Visible;
+ set => _buttonCraftingMenu.Visible = value;
+ }
+
+ public Action CraftingButtonToggled { get; set; }
public sealed class TopButton : BaseButton
{
@@ -110,8 +196,10 @@ namespace Content.Client.UserInterface
{
Texture = texture,
SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
+ SizeFlagsVertical = SizeFlags.Expand | SizeFlags.ShrinkCenter,
MouseFilter = MouseFilterMode.Ignore,
- ModulateSelfOverride = ColorNormal
+ ModulateSelfOverride = ColorNormal,
+ CustomMinimumSize = (0, 32)
});
_container.AddChild(_label = new Label
diff --git a/Content.Client/UserInterface/TutorialButton.cs b/Content.Client/UserInterface/TutorialWindow.cs
similarity index 67%
rename from Content.Client/UserInterface/TutorialButton.cs
rename to Content.Client/UserInterface/TutorialWindow.cs
index 1e72981a6c..aa33a54572 100644
--- a/Content.Client/UserInterface/TutorialButton.cs
+++ b/Content.Client/UserInterface/TutorialWindow.cs
@@ -4,7 +4,7 @@ using Robust.Shared.Utility;
namespace Content.Client.UserInterface
{
- internal sealed class TutorialButton : Button
+ public sealed class TutorialWindow : SS14Window
{
private const string TutorialContents = @"Hi and welcome to Space Station 14!
@@ -21,32 +21,19 @@ New to SS14: You can press ""E"" to activate objects. This functions similarly t
You can talk in OOC by prefixing the message with [ or /ooc.
-If you are not on a QWERTY keyboard, the keys mentioned above are bound to the physical location on your keyboard,
-not what letter they correspond to. For example on AZERTY movement is ZQSD, drop is A, W is activate in hand.
+If you are not on a QWERTY keyboard, the keys mentioned above are bound to the physical location on your keyboard, not what letter they correspond to.
+For example on AZERTY movement is ZQSD, drop is A, W is activate in hand.
If you have any feedback, questions, bug reports, etc..., do not be afraid to tell us!
-You can ask on Discord or heck, just write it in OOC, we'll catch it.
-";
+You can ask on Discord or heck, just write it in OOC! We'll catch it.";
-
- public TutorialButton()
+ public TutorialWindow()
{
- OnPressed += OnOnPressed;
-
- Text = "Tutorial";
- }
-
- private void OnOnPressed(ButtonEventArgs obj)
- {
- _openTutorialWindow();
- }
-
- private void _openTutorialWindow()
- {
- var window = new SS14Window {Title = "Tutorial"};
+ HideOnClose = true;
+ Visible = false;
var scrollContainer = new ScrollContainer();
- window.Contents.AddChild(scrollContainer);
+ Contents.AddChild(scrollContainer);
var label = new RichTextLabel();
scrollContainer.AddChild(label);
@@ -54,8 +41,6 @@ You can ask on Discord or heck, just write it in OOC, we'll catch it.
var message = new FormattedMessage();
message.AddText(TutorialContents);
label.SetMessage(message);
-
- window.AddToScreen();
}
}
}
diff --git a/Content.Shared/Input/ContentKeyFunctions.cs b/Content.Shared/Input/ContentKeyFunctions.cs
index 1b357b02fc..18e5248f06 100644
--- a/Content.Shared/Input/ContentKeyFunctions.cs
+++ b/Content.Shared/Input/ContentKeyFunctions.cs
@@ -9,6 +9,7 @@ namespace Content.Shared.Input
public static readonly BoundKeyFunction Drop = "Drop";
public static readonly BoundKeyFunction ActivateItemInHand = "ActivateItemInHand";
public static readonly BoundKeyFunction OpenCharacterMenu = "OpenCharacterMenu";
+ public static readonly BoundKeyFunction OpenCraftingMenu = "OpenCraftingMenu";
public static readonly BoundKeyFunction ExamineEntity = "ExamineEntity";
public static readonly BoundKeyFunction UseItemInHand = "UseItemInHand"; // use hand item on world entity
public static readonly BoundKeyFunction ActivateItemInWorld = "ActivateItemInWorld"; // default action on world entity
diff --git a/Resources/Textures/UserInterface/character.svg b/Resources/Textures/UserInterface/character.svg
new file mode 100644
index 0000000000..33a6078101
--- /dev/null
+++ b/Resources/Textures/UserInterface/character.svg
@@ -0,0 +1,39 @@
+
+
diff --git a/Resources/Textures/UserInterface/character.svg.96dpi.png b/Resources/Textures/UserInterface/character.svg.96dpi.png
new file mode 100644
index 0000000000..30a6a428ac
Binary files /dev/null and b/Resources/Textures/UserInterface/character.svg.96dpi.png differ
diff --git a/Resources/Textures/UserInterface/hamburger.svg b/Resources/Textures/UserInterface/hamburger.svg
index 9a998ba3db..4ea08de45e 100644
--- a/Resources/Textures/UserInterface/hamburger.svg
+++ b/Resources/Textures/UserInterface/hamburger.svg
@@ -1,45 +1,17 @@
-
-
diff --git a/Resources/Textures/UserInterface/hammer.svg b/Resources/Textures/UserInterface/hammer.svg
new file mode 100644
index 0000000000..e3b5f0f34b
--- /dev/null
+++ b/Resources/Textures/UserInterface/hammer.svg
@@ -0,0 +1,39 @@
+
+
diff --git a/Resources/Textures/UserInterface/hammer.svg.96dpi.png b/Resources/Textures/UserInterface/hammer.svg.96dpi.png
new file mode 100644
index 0000000000..38c3d49d2d
Binary files /dev/null and b/Resources/Textures/UserInterface/hammer.svg.96dpi.png differ
diff --git a/Resources/Textures/UserInterface/inventory.svg b/Resources/Textures/UserInterface/inventory.svg
new file mode 100644
index 0000000000..512beffd79
--- /dev/null
+++ b/Resources/Textures/UserInterface/inventory.svg
@@ -0,0 +1,51 @@
+
+
diff --git a/Resources/Textures/UserInterface/inventory.svg.96dpi.png b/Resources/Textures/UserInterface/inventory.svg.96dpi.png
new file mode 100644
index 0000000000..df02c5f597
Binary files /dev/null and b/Resources/Textures/UserInterface/inventory.svg.96dpi.png differ
diff --git a/Resources/Textures/UserInterface/tutorial.svg b/Resources/Textures/UserInterface/tutorial.svg
new file mode 100644
index 0000000000..36de5ee867
--- /dev/null
+++ b/Resources/Textures/UserInterface/tutorial.svg
@@ -0,0 +1,41 @@
+
+
diff --git a/Resources/Textures/UserInterface/tutorial.svg.96dpi.png b/Resources/Textures/UserInterface/tutorial.svg.96dpi.png
new file mode 100644
index 0000000000..2e83e41f93
Binary files /dev/null and b/Resources/Textures/UserInterface/tutorial.svg.96dpi.png differ
diff --git a/Resources/keybinds.yml b/Resources/keybinds.yml
index fe384557e3..c8b223be53 100644
--- a/Resources/keybinds.yml
+++ b/Resources/keybinds.yml
@@ -76,3 +76,6 @@ binds:
- function: ToggleCombatMode
type: Toggle
key: Tab
+- function: OpenCraftingMenu
+ type: state
+ key: G