Don't show the main menu when returning to the server browser.
Fixes #4902.
This commit is contained in:
@@ -23,11 +23,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
public class ServerBrowserLogic
|
public class ServerBrowserLogic
|
||||||
{
|
{
|
||||||
|
readonly static Action DoNothing = () => { };
|
||||||
|
|
||||||
GameServer currentServer;
|
GameServer currentServer;
|
||||||
ScrollItemWidget serverTemplate;
|
ScrollItemWidget serverTemplate;
|
||||||
|
|
||||||
Action onStart;
|
Action onStart;
|
||||||
Action onExit;
|
|
||||||
|
|
||||||
enum SearchStatus { Fetching, Failed, NoGames, Hidden }
|
enum SearchStatus { Fetching, Failed, NoGames, Hidden }
|
||||||
SearchStatus searchStatus = SearchStatus.Fetching;
|
SearchStatus searchStatus = SearchStatus.Fetching;
|
||||||
@@ -54,7 +55,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
{
|
{
|
||||||
panel = widget;
|
panel = widget;
|
||||||
this.onStart = onStart;
|
this.onStart = onStart;
|
||||||
this.onExit = onExit;
|
|
||||||
|
|
||||||
serverList = panel.Get<ScrollPanelWidget>("SERVER_LIST");
|
serverList = panel.Get<ScrollPanelWidget>("SERVER_LIST");
|
||||||
serverTemplate = serverList.Get<ScrollItemWidget>("SERVER_TEMPLATE");
|
serverTemplate = serverList.Get<ScrollItemWidget>("SERVER_TEMPLATE");
|
||||||
@@ -258,7 +258,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
Ui.OpenWindow("DIRECTCONNECT_PANEL", new WidgetArgs
|
Ui.OpenWindow("DIRECTCONNECT_PANEL", new WidgetArgs
|
||||||
{
|
{
|
||||||
{ "openLobby", OpenLobby },
|
{ "openLobby", OpenLobby },
|
||||||
{ "onExit", () => { } }
|
{ "onExit", DoNothing }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
Ui.OpenWindow("CREATESERVER_PANEL", new WidgetArgs
|
Ui.OpenWindow("CREATESERVER_PANEL", new WidgetArgs
|
||||||
{
|
{
|
||||||
{ "openLobby", OpenLobby },
|
{ "openLobby", OpenLobby },
|
||||||
{ "onExit", () => { } }
|
{ "onExit", DoNothing }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
var host = server.Address.Split(':')[0];
|
var host = server.Address.Split(':')[0];
|
||||||
var port = int.Parse(server.Address.Split(':')[1]);
|
var port = int.Parse(server.Address.Split(':')[1]);
|
||||||
|
|
||||||
ConnectionLogic.Connect(host, port, "", OpenLobby, onExit);
|
ConnectionLogic.Connect(host, port, "", OpenLobby, DoNothing);
|
||||||
}
|
}
|
||||||
|
|
||||||
string GetPlayersLabel(GameServer game)
|
string GetPlayersLabel(GameServer game)
|
||||||
|
|||||||
Reference in New Issue
Block a user