Pass KeyInput to OnKey functions

This commit is contained in:
Abdurrahmaan Iqbal
2021-06-29 20:43:03 +01:00
committed by Paul Chote
parent 2742985520
commit 6967c1fff3
15 changed files with 31 additions and 31 deletions

View File

@@ -114,7 +114,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
&& editor.CurrentBrush == editor.DefaultBrush
&& Game.RunTime > lastScrollTime + scrollVisibleTimeout;
actorIDField.OnEscKey = () =>
actorIDField.OnEscKey = _ =>
{
actorIDField.YieldKeyboardFocus();
return true;

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Panel.Layout = new GridLayout(Panel);
SearchTextField = widget.Get<TextFieldWidget>("SEARCH_TEXTFIELD");
SearchTextField.OnEscKey = () =>
SearchTextField.OnEscKey = _ =>
{
SearchTextField.Text = "";
SearchTextField.YieldKeyboardFocus();