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 OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
@@ -26,6 +27,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Game.LoadWidget(world, "PLAYER_WIDGETS", playerRoot, new WidgetArgs());
Game.LoadWidget(world, "CHAT_PANEL", ingameRoot, new WidgetArgs());
Action ShowLeaveRestartDialog = () =>
{
ingameRoot.IsVisible = () => false;
Game.LoadWidget(world, "LEAVE_RESTART_WIDGET", Ui.Root, new WidgetArgs());
};
world.GameOver += ShowLeaveRestartDialog;
}
}
}