oops fixed logic

This commit is contained in:
Alex Noir
2017-12-05 18:22:03 +03:00
parent d4ce079d65
commit fdd3db82e6
@@ -224,7 +224,7 @@ namespace Barotrauma.Networking
//tab doesn't autoselect the chatbox when debug console is open, //tab doesn't autoselect the chatbox when debug console is open,
//because tab is used for autocompleting console commands //because tab is used for autocompleting console commands
if ((PlayerInput.KeyHit(InputType.Chat) || PlayerInput.KeyHit(InputType.RadioChat)) && if ((PlayerInput.KeyHit(InputType.Chat) || PlayerInput.KeyHit(InputType.RadioChat)) &&
(Screen.Selected == GameMain.GameScreen && msgBox.Visible || (!DebugConsole.IsOpen && GUIComponent.KeyboardDispatcher.Subscriber == null))) (!DebugConsole.IsOpen && GUIComponent.KeyboardDispatcher.Subscriber == null) && (Screen.Selected != GameMain.GameScreen || msgBox.Visible))
{ {
if (msgBox.Selected) if (msgBox.Selected)
{ {
@@ -234,7 +234,7 @@ namespace Barotrauma.Networking
else else
{ {
msgBox.Select(); msgBox.Select();
if (PlayerInput.KeyHit(InputType.RadioChat)) if (Screen.Selected == GameMain.GameScreen && PlayerInput.KeyHit(InputType.RadioChat))
{ {
msgBox.Text = "r; "; msgBox.Text = "r; ";
msgBox.OnTextChanged?.Invoke(msgBox, msgBox.Text); msgBox.OnTextChanged?.Invoke(msgBox, msgBox.Text);