Remove key handling from ContainerWidget

It has no business handling key input. This was used only for opening the ingame chat and replacing it with a `LogicKeyListener` was trivial.
This commit is contained in:
Ivaylo Draganov
2024-09-30 16:59:14 +03:00
committed by Gustas
parent a69ea79d83
commit 771b9ddfda
4 changed files with 6 additions and 4 deletions

View File

@@ -209,7 +209,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var chatClose = chatChrome.Get<ButtonWidget>("CHAT_CLOSE");
chatClose.OnClick += CloseChat;
chatPanel.OnKeyPress = e =>
var openChatKeyListener = chatPanel.Get<LogicKeyListenerWidget>("OPEN_CHAT_KEY_LISTENER");
openChatKeyListener.AddHandler(e =>
{
if (e.Event == KeyInputEvent.Up)
return false;
@@ -223,7 +225,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
}
return false;
};
});
}
chatScrollPanel = chatChrome.Get<ScrollPanelWidget>("CHAT_SCROLLPANEL");