Merge pull request #4872 from Mailaender/password-hotkeys

Mapped password field Enter/ESC to buttons
This commit is contained in:
Paul Chote
2014-04-04 02:23:57 +13:00

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;