diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index e5fc89f5d0..d72ece192f 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -597,5 +597,7 @@ namespace OpenRA public static void Exit() { quit = true; } public static void Debug(string s) { chat.AddLine(Color.White, "Debug", s); } + + public static void Disconnect() { } } } diff --git a/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs b/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs index bcc8522a7d..7ec4b112bb 100644 --- a/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/IngameChromeDelegate.cs @@ -36,10 +36,9 @@ namespace OpenRA.Widgets.Delegates return true; }; - optionsBG.GetWidget("BUTTON_DISCONNECT").OnMouseUp = mi => { - // Todo: Do this cleanly, so we don't crash - //Game.JoinLocal(); - //Game.LoadShellMap(new Manifest(Game.LobbyInfo.GlobalSettings.Mods).ShellmapUid); + optionsBG.GetWidget("BUTTON_DISCONNECT").OnMouseUp = mi => { + optionsBG.Visible = false; + Game.Disconnect(); return true; };