map password field Enter/ESC to buttons

closes #4869
This commit is contained in:
Matthias Mailänder
2014-03-15 12:37:47 +01:00
parent 26e75621c3
commit 4768c3d6a5

View File

@@ -113,6 +113,8 @@ namespace OpenRA.Mods.RA.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; };
}
passwordOffsetAdjusted = false;