connection dialogs show correct hostname/port
This commit is contained in:
@@ -110,24 +110,16 @@ namespace OpenRA.Graphics
|
|||||||
Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false;
|
Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false;
|
||||||
Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = true;
|
Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = true;
|
||||||
Chrome.rootWidget.GetWidget("CONNECTION_FAILED_BG").Visible = false;
|
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;
|
break;
|
||||||
case ConnectionState.NotConnected:
|
case ConnectionState.NotConnected:
|
||||||
Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false;
|
Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false;
|
||||||
Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = false;
|
Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = false;
|
||||||
Chrome.rootWidget.GetWidget("CONNECTION_FAILED_BG").Visible = true;
|
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;
|
break;
|
||||||
case ConnectionState.Connected:
|
case ConnectionState.Connected:
|
||||||
Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false;
|
Chrome.rootWidget.GetWidget("MAINMENU_BG").Visible = false;
|
||||||
Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = false;
|
Chrome.rootWidget.GetWidget("CONNECTING_BG").Visible = false;
|
||||||
Chrome.rootWidget.GetWidget("CONNECTION_FAILED_BG").Visible = false;
|
Chrome.rootWidget.GetWidget("CONNECTION_FAILED_BG").Visible = false;
|
||||||
//Game.chrome.DrawLobby( world );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
Game.JoinServer(Game.CurrentHost, Game.CurrentPort);
|
Game.JoinServer(Game.CurrentHost, Game.CurrentPort);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
r.GetWidget<LabelWidget>("CONNECTING_DESC").GetText = () =>
|
||||||
|
"Connecting to {0}:{1}...".F(Game.CurrentHost, Game.CurrentPort);
|
||||||
|
|
||||||
|
r.GetWidget<LabelWidget>("CONNECTION_FAILED_DESC").GetText = () =>
|
||||||
|
"Could not connect to {0}:{1}".F(Game.CurrentHost, Game.CurrentPort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user