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

@@ -118,8 +118,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
passwordField.IsVisible = () => orderManager.AuthenticationFailed;
var passwordLabel = widget.Get<LabelWidget>("PASSWORD_LABEL");
passwordLabel.IsVisible = passwordField.IsVisible;
passwordField.OnEnterKey = () => { retryButton.OnClick(); return true; };
passwordField.OnEscKey = () => { abortButton.OnClick(); return true; };
passwordField.OnEnterKey = _ => { retryButton.OnClick(); return true; };
passwordField.OnEscKey = _ => { abortButton.OnClick(); return true; };
}
passwordOffsetAdjusted = false;