diff --git a/OpenRA.Game/Graphics/Viewport.cs b/OpenRA.Game/Graphics/Viewport.cs index 56672d1918..44a9141801 100644 --- a/OpenRA.Game/Graphics/Viewport.cs +++ b/OpenRA.Game/Graphics/Viewport.cs @@ -110,24 +110,16 @@ namespace OpenRA.Graphics Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false; Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = true; Chrome.rootWidget.GetWidget("CONNECTION_FAILED_BG").Visible = false; - - //(Game.chrome.rootWidget.GetWidget("CONNECTION_GROUP_FAILED") as LabelWidget).Text = "Connecting abort"; - - //Game.chrome.DrawDialog("Connecting to {0}:{1}...".F( Game.Settings.NetworkHost, Game.Settings.NetworkPort )); break; case ConnectionState.NotConnected: Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false; Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = false; Chrome.rootWidget.GetWidget("CONNECTION_FAILED_BG").Visible = true; - - //(Game.chrome.rootWidget.GetWidget("CONNECTION_GROUP_FAILED") as LabelWidget).Text = "Not Connected Retry/fail"; - //Game.chrome.DrawDialog("Connection failed.", "Retry", _ => {}, "Cancel",_ => {}); break; case ConnectionState.Connected: Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false; Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = false; Chrome.rootWidget.GetWidget("CONNECTION_FAILED_BG").Visible = false; - //Game.chrome.DrawLobby( world ); break; } } diff --git a/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs b/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs index c505a637df..fbb9dabc56 100644 --- a/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/ConnectionDialogsDelegate.cs @@ -37,6 +37,12 @@ namespace OpenRA.Widgets.Delegates Game.JoinServer(Game.CurrentHost, Game.CurrentPort); return true; }; + + r.GetWidget("CONNECTING_DESC").GetText = () => + "Connecting to {0}:{1}...".F(Game.CurrentHost, Game.CurrentPort); + + r.GetWidget("CONNECTION_FAILED_DESC").GetText = () => + "Could not connect to {0}:{1}".F(Game.CurrentHost, Game.CurrentPort); } } }