Add end game dialog

This commit is contained in:
Oliver Brakmann
2014-07-31 21:24:08 +02:00
parent 8cec848a0f
commit 819eb64011
12 changed files with 385 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
*/
#endregion
using System;
using System.Drawing;
using System.Linq;
using OpenRA.Mods.RA;
@@ -43,6 +44,13 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
void InitRootWidgets()
{
Game.LoadWidget(world, "CHAT_PANEL", gameRoot, new WidgetArgs());
Action ShowLeaveRestartDialog = () =>
{
gameRoot.IsVisible = () => false;
Game.LoadWidget(world, "LEAVE_RESTART_WIDGET", Ui.Root, new WidgetArgs());
};
world.GameOver += ShowLeaveRestartDialog;
}
void InitObserverWidgets()