From d19c9eadb082cf435ac6b5104cd4f25a0accd9d4 Mon Sep 17 00:00:00 2001 From: HenrytheSlav Date: Sun, 26 Jun 2016 15:44:19 +0200 Subject: [PATCH 1/2] Jump to textfield in password prompt. --- OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs index 86259b7916..a1bdde2689 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs @@ -113,6 +113,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic passwordField = panel.GetOrNull("PASSWORD"); if (passwordField != null) { + passwordField.TakeKeyboardFocus(); passwordField.Text = orderManager.Password; passwordField.IsVisible = () => orderManager.AuthenticationFailed; var passwordLabel = widget.Get("PASSWORD_LABEL"); From 17d6afa0719f6f6baecf4d0a8fcc009198d88a33 Mon Sep 17 00:00:00 2001 From: HenrytheSlav Date: Sun, 26 Jun 2016 15:54:41 +0200 Subject: [PATCH 2/2] Do not keep the wrong password in the textfield for next try. --- OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs index a1bdde2689..0c547dacc6 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/ConnectionLogic.cs @@ -114,7 +114,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (passwordField != null) { passwordField.TakeKeyboardFocus(); - passwordField.Text = orderManager.Password; passwordField.IsVisible = () => orderManager.AuthenticationFailed; var passwordLabel = widget.Get("PASSWORD_LABEL"); passwordLabel.IsVisible = passwordField.IsVisible;