From 166583b1ec5cf62ed539fc7d4b1f3531510195f1 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 16 Oct 2021 15:00:04 +0100 Subject: [PATCH] Fix disabled chat focus issues. --- OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs | 4 ++-- OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs index 90dc0105d4..ed009642dd 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/IngameChatLogic.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic TextNotification lastLine; int repetitions; - bool chatEnabled = true; + bool chatEnabled; [ObjectCreator.UseCtor] public IngameChatLogic(Widget widget, OrderManager orderManager, World world, ModData modData, bool isMenuChat, Dictionary logicArgs) @@ -325,7 +325,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (chatEnabled && !chatWasEnabled) { chatText.Text = ""; - if (Ui.KeyboardFocusWidget == null) + if (Ui.KeyboardFocusWidget == null && chatChrome.Visible) chatText.TakeKeyboardFocus(); } else if (!chatEnabled) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 82b1dd55d5..3f3347e5fa 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic MapPreview map; Session.MapStatus mapStatus; - bool chatEnabled = true; + bool chatEnabled; bool addBotOnMapLoad; bool disableTeamChat; bool insufficientPlayerSpawns;