Let panels handle closing themselves

This commit is contained in:
Paul Chote
2011-05-12 20:14:23 +12:00
parent 5fffc9d816
commit 61facc7bb1
11 changed files with 34 additions and 42 deletions

View File

@@ -240,7 +240,7 @@ namespace OpenRA.Mods.Cnc.Widgets
CncConnectingLogic.Connect(ipField.Text, port, openLobby, onExit);
};
panel.GetWidget<CncMenuButtonWidget>("BACK_BUTTON").OnClick = onExit;
panel.GetWidget<CncMenuButtonWidget>("BACK_BUTTON").OnClick = () => { Widget.CloseWindow(); onExit(); };
}
}
}