Merge pull request #10551 from RockyTV/rockytv

Change CONNECTIONFAILED_PANEL title if server requires password
This commit is contained in:
Oliver Brakmann
2016-01-31 16:14:21 +01:00
3 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

@@ -6,12 +6,11 @@ Background@CONNECTIONFAILED_PANEL:
Height: 160 Height: 160
Children: Children:
LogicTicker@CONNECTION_FAILED_TICKER: LogicTicker@CONNECTION_FAILED_TICKER:
Label@CONNECTION_FAILED_TITLE: Label@TITLE:
X: 0 X: 0
Y: 20 Y: 20
Width: 450 Width: 450
Height: 25 Height: 25
Text: Connection Failed
Align: Center Align: Center
Font: Bold Font: Bold
Label@CONNECTING_DESC: Label@CONNECTING_DESC:
@@ -43,7 +42,7 @@ Background@CONNECTIONFAILED_PANEL:
MaxLength: 20 MaxLength: 20
Height: 25 Height: 25
Button@RETRY_BUTTON: Button@RETRY_BUTTON:
X: PARENT_RIGHT - 360 X: PARENT_RIGHT - 430
Y: PARENT_BOTTOM - 45 Y: PARENT_BOTTOM - 45
Width: 160 Width: 160
Height: 25 Height: 25