Change CONNECTIONFAILED_PANEL title if server requires password

If the server requires a password, display Password Required instead of the usual Connection Error title.
This commit is contained in:
Alexandre Oliveira
2016-01-19 16:18:26 -02:00
parent 8ab72edc6a
commit 6f715a6a4e
3 changed files with 4 additions and 3 deletions

View File

@@ -106,6 +106,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var connectionError = widget.Get<LabelWidget>("CONNECTION_ERROR");
connectionError.GetText = () => orderManager.ServerError;
var panelTitle = widget.Get<LabelWidget>("TITLE");
panelTitle.GetText = () => orderManager.AuthenticationFailed ? "Password Required" : "Connection Failed";
passwordField = panel.GetOrNull<PasswordFieldWidget>("PASSWORD");
if (passwordField != null)
{

View File

@@ -46,7 +46,6 @@ Container@CONNECTIONFAILED_PANEL:
Font: BigBold
Contrast: true
Align: Center
Text: Connection Failed
Background@CONNECTION_BACKGROUND:
Width: 370
Height: 85

View File

@@ -6,12 +6,11 @@ Background@CONNECTIONFAILED_PANEL:
Height: 160
Children:
LogicTicker@CONNECTION_FAILED_TICKER:
Label@CONNECTION_FAILED_TITLE:
Label@TITLE:
X: 0
Y: 20
Width: 450
Height: 25
Text: Connection Failed
Align: Center
Font: Bold
Label@CONNECTING_DESC: