hack hack hack - no longer crash on failing to connect, etc
This commit is contained in:
@@ -26,10 +26,12 @@ namespace OpenRA.Widgets.Delegates
|
||||
{
|
||||
var r = Chrome.rootWidget;
|
||||
r.GetWidget("CONNECTION_BUTTON_ABORT").OnMouseUp = mi => {
|
||||
r.GetWidget("CONNECTION_BUTTON_ABORT").Parent.Visible = false;
|
||||
Game.Disconnect();
|
||||
return true;
|
||||
};
|
||||
r.GetWidget("CONNECTION_BUTTON_CANCEL").OnMouseUp = mi => {
|
||||
r.GetWidget("CONNECTION_BUTTON_CANCEL").Parent.Visible = false;
|
||||
Game.Disconnect();
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -215,6 +215,7 @@ namespace OpenRA.Widgets
|
||||
|
||||
public Widget OpenWindow(string id)
|
||||
{
|
||||
if (WindowList.Count > 0)
|
||||
Chrome.rootWidget.GetWidget(WindowList.Peek()).Visible = false;
|
||||
WindowList.Push(id);
|
||||
var window = Chrome.rootWidget.GetWidget(id);
|
||||
|
||||
Reference in New Issue
Block a user