(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.

This commit is contained in:
Joonas Rikkonen
2019-04-05 16:13:41 +03:00
parent 29e979d60a
commit 9e62d2219a
2 changed files with 5 additions and 6 deletions

View File

@@ -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)
{

View File

@@ -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;
}