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

@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Common.Widgets
var isValid = false;
input.Text = initialText;
input.IsValid = () => isValid;
input.OnEnterKey = () =>
input.OnEnterKey = _ =>
{
if (acceptButton.IsDisabled())
return false;
@@ -121,7 +121,7 @@ namespace OpenRA.Mods.Common.Widgets
acceptButton.OnClick();
return true;
};
input.OnEscKey = () =>
input.OnEscKey = _ =>
{
if (cancelButton.IsDisabled())
return false;