Split the last TD UI logic into reuseable chunks.

This commit is contained in:
Paul Chote
2014-07-13 12:07:07 +12:00
parent ef00411931
commit e7ae615ac9
14 changed files with 313 additions and 138 deletions

View File

@@ -42,6 +42,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Widget optionsBG = null;
optionsBG = Game.LoadWidget(world, "INGAME_OPTIONS_BG", Ui.Root, new WidgetArgs
{
{ "transient", false },
{ "onExit", () =>
{
optionsBG.Visible = false;
@@ -52,6 +53,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
}
});
optionsBG.Visible = false;
gameRoot.Get<ButtonWidget>("INGAME_OPTIONS_BUTTON").OnClick = () =>
{
optionsBG.Visible ^= true;