From 9e62d2219a02bd2b0caa889a77216b551b42b3f6 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Fri, 5 Apr 2019 16:13:41 +0300 Subject: [PATCH] (335f60e63) Don't deselect items in the subeditor with "select" key. Use "deselect" instead. Fixes inventories and other interfaces closing when clicking trying to interact with the items inside them. --- .../BarotraumaClient/Source/GameSession/CrewManager.cs | 5 ----- .../BarotraumaClient/Source/Screens/SubEditorScreen.cs | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 132a7cfc6..509675c09 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -60,11 +60,6 @@ namespace Barotrauma public CrewManager(XElement element, bool isSinglePlayer) : this(isSinglePlayer) - { - return characterListBox.Rect; - } - - partial void InitProjectSpecific() { guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent) { diff --git a/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs index da080a4c1..9a97ade23 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/SubEditorScreen.cs @@ -2104,7 +2104,11 @@ namespace Barotrauma dummyCharacter.SelectedConstruction.UpdateHUD(cam, dummyCharacter, (float)deltaTime); } - if (PlayerInput.KeyHit(InputType.Select) && dummyCharacter.FocusedItem != dummyCharacter.SelectedConstruction && GUI.KeyboardDispatcher.Subscriber == null) + //if (PlayerInput.KeyHit(InputType.Select) && dummyCharacter.FocusedItem != dummyCharacter.SelectedConstruction && GUI.KeyboardDispatcher.Subscriber == null) + //{ + // dummyCharacter.SelectedConstruction = null; + //} + if (PlayerInput.KeyHit(InputType.Deselect)) { dummyCharacter.SelectedConstruction = null; }