Initial settings menu copied from the old impl.

This commit is contained in:
Paul Chote
2011-05-12 18:50:23 +12:00
parent be79529d9e
commit f0f591c6fb
7 changed files with 396 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ using System.Drawing;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Mods.RA;
using OpenRA.Support;
namespace OpenRA.Mods.Cnc.Widgets
{
@@ -117,7 +118,14 @@ namespace OpenRA.Mods.Cnc.Widgets
});
};
settingsMenu.GetWidget<CncMenuButtonWidget>("PREFERENCES_BUTTON").IsDisabled = () => true;
settingsMenu.GetWidget<CncMenuButtonWidget>("PREFERENCES_BUTTON").OnClick = () =>
{
Menu = MenuType.None;
Widget.OpenWindow("SETTINGS_PANEL", new Dictionary<string, object>()
{
{ "onExit", new Action(() => ReturnToMenu(MenuType.Settings)) },
});
};
settingsMenu.GetWidget<CncMenuButtonWidget>("BACK_BUTTON").OnClick = () => Menu = MenuType.Main;
}