internal DebugMenu() { //populate imi.Add(development.GetMenu()); imi.Add(tests.GetMenu()); imi.Add(new HardExitGameState()); //insert into a MenuState Menu debugMenu = new Menu("Debugger Menu",imi); Master.Push(debugMenu); }
public DevMenu() { MenuElement titleMenuElement = new MenuElement(); titleMenuElement.MenuText = "Transmission Debug"; titleMenuElement.Selectable = false; titleMenuElement.Hidden = false; titleMenuElement.ActiveArea = new Rectangle(10, 30, 30, 30); titleMenuElement.ForegroundColor = new Color(225, 225, 225); titleMenuElement.ActiveForegroundColor = new Color(100, 100, 100); titleMenuElement.SpriteFont = @"Fonts\MenuFont"; MenuElement playTestElement = new MenuElement(); playTestElement.MenuText = "Play Test"; playTestElement.Selectable = true; playTestElement.Hidden = false; playTestElement.ActiveArea = new Rectangle(10, 70, 600, 100); playTestElement.ForegroundColor = new Color(225, 225, 225); playTestElement.ActiveForegroundColor = new Color(255, 200, 200); playTestElement.SpriteFont = @"Fonts\MenuFont"; playTestElement.SetThrowPushEvent(new System.Action(() => { Master.Push(new PlayableState()); })); MenuElement mapToolElement = new MenuElement(); mapToolElement.MenuText = "Map Editor"; mapToolElement.Selectable = true; mapToolElement.Hidden = false; mapToolElement.ActiveArea = new Rectangle(10, 50, 600, 100); mapToolElement.ForegroundColor = new Color(225, 225, 225); mapToolElement.ActiveForegroundColor = new Color(255, 200, 200); mapToolElement.SpriteFont = @"Fonts\MenuFont"; mapToolElement.SetThrowPushEvent(new System.Action(() => { Graphics.CGraphics.changeResolution(800, 600); Master.Push(new EditorMode()); })); _menu = new Gears.Navigation.Menu(); //_menu.AddMenuElements(new MenuElement[] { titleMenuElement, playTestElement, mapToolElement }); _menu.AddMenuElement(titleMenuElement); _menu.AddMenuElement(mapToolElement); _menu.AddMenuElement(playTestElement); }
internal DebugMenu() { //create imi = new IMenuItem[5]; //populate imi[0] = unsorted.GetMenu(); imi[1] = spectrum.GetMenu(); imi[2] = tatltael.GetMenu(); //imi[3] = navi.GetMenu(); imi[3] = mvmenu.GetMenu(); imi[4] = new HardExitGameState(); //insert into a MenuState Menu debugMenu = new Menu("Debugger Menu",imi); Master.Push(debugMenu); }
public GameOverState() { Menu _menu = new Gears.Navigation.Menu(); MenuElement optionContinue = new MenuElement(); optionContinue.MenuText = "Cotinue"; optionContinue.Selectable = true; optionContinue.Hidden = false; optionContinue.ActiveArea = new Rectangle(10, 30, 30, 30); optionContinue.ForegroundColor = new Color(225, 225, 225); optionContinue.ActiveForegroundColor = new Color(100, 100, 100); optionContinue.SpriteFont = @"Fonts\sherwood"; _menu.AddMenuElement(optionContinue); MenuElement optionSave = new MenuElement(); optionSave.MenuText = "Save and Continue"; optionSave.Selectable = true; optionSave.Hidden = false; optionSave.ActiveArea = new Rectangle(10, 30, 30, 30); optionSave.ForegroundColor = new Color(225, 225, 225); optionSave.ActiveForegroundColor = new Color(100, 100, 100); optionSave.SpriteFont = @"Fonts\sherwood"; _menu.AddMenuElement(optionSave); MenuElement optionQuit = new MenuElement(); optionQuit.MenuText = "Save and Quit"; optionQuit.Selectable = true; optionQuit.Hidden = false; optionQuit.ActiveArea = new Rectangle(10, 30, 30, 30); optionQuit.ForegroundColor = new Color(225, 225, 225); optionQuit.ActiveForegroundColor = new Color(100, 100, 100); optionQuit.SpriteFont = @"Fonts\sherwood"; _menu.AddMenuElement(optionSave); }
public override void ThrowPushEvent() { Menu menu = new Menu(); MenuElement backMenuElement = new MenuElement(); backMenuElement.SetThrowPushEvent(new Action(() => { Master.Pop(); })); backMenuElement.ActiveArea = new Rectangle(100,200,300,100); backMenuElement.ForegroundColor = Color.Aquamarine; backMenuElement.BackgroundColor = Color.Indigo; backMenuElement.MenuText = "Back"; backMenuElement.Selectable = true; backMenuElement.Hidden = false; backMenuElement.SpriteFont = @"Fonts\MenuItem"; MenuElement exitMenuElement = new MenuElement(); exitMenuElement.SetThrowPushEvent(new Action(() => { Master.GetGame().Exit(); })); exitMenuElement.ActiveArea = new Rectangle(100, 450, 300, 100); exitMenuElement.ForegroundColor = Color.Azure; exitMenuElement.ActiveForegroundColor = Color.Gold; exitMenuElement.BackgroundColor = Color.AntiqueWhite; exitMenuElement.ActiveBackgroundColor = Color.LightCyan; exitMenuElement.Hidden = false; exitMenuElement.MenuText = "Exit Game"; exitMenuElement.Selectable = true; exitMenuElement.SpriteFont = @"Fonts\MenuItem"; exitMenuElement.Texture2D = @"Debug\Collision\collisionUnitA"; List<MenuElement> menuElements = new List<MenuElement>(); menuElements.Add(backMenuElement); menuElements.Add(exitMenuElement); menu.AddMenuElements(menuElements); XMLEngine<Menu>.SaveToFile("testSaveMenu-001.xml", menu); }
public MenuState(Menu menu) { this._menu = menu; this.InitializeLocal(); }
public DevMenu() { _menu = new Gears.Navigation.Menu(); MenuElement titleMenuElement = new MenuElement(); titleMenuElement.MenuText = "Transmission Debug"; titleMenuElement.Selectable = false; titleMenuElement.Hidden = false; titleMenuElement.ActiveArea = new Rectangle(10, 30, 30, 30); titleMenuElement.ForegroundColor = new Color(225, 225, 225); titleMenuElement.ActiveForegroundColor = new Color(100, 100, 100); titleMenuElement.SpriteFont = @"Fonts\MenuFont"; _menu.AddMenuElement(titleMenuElement); MenuElement playTestElement = new MenuElement(); playTestElement.MenuText = "Kokiri Forest (With title)"; playTestElement.Selectable = true; playTestElement.Hidden = false; playTestElement.ActiveArea = new Rectangle(10, 50, 600, 100); playTestElement.ForegroundColor = new Color(225, 225, 225); playTestElement.ActiveForegroundColor = new Color(255, 200, 200); playTestElement.SpriteFont = @"Fonts\MenuFont"; playTestElement.SetThrowPushEvent(new System.Action(() => { //Master.Push(new PlayableState()); Master.Push(new splash.CTitleState()); })); _menu.AddMenuElement(playTestElement); MenuElement hyruleCastleTownElement = new MenuElement(); hyruleCastleTownElement.MenuText = "Hyrule Castle Town"; hyruleCastleTownElement.Selectable = true; hyruleCastleTownElement.Hidden = false; hyruleCastleTownElement.ActiveArea = new Rectangle(10, 70, 600, 100); hyruleCastleTownElement.ForegroundColor = new Color(225, 225, 225); hyruleCastleTownElement.ActiveForegroundColor = new Color(255, 200, 200); hyruleCastleTownElement.SpriteFont = @"Fonts\MenuFont"; hyruleCastleTownElement.SetThrowPushEvent(new System.Action(() => { //Master.Push(new PlayableState()); Master.Push(new MapTests.HryuleCastleTownTest()); })); _menu.AddMenuElement(hyruleCastleTownElement); if (System.Environment.OSVersion.Platform != System.PlatformID.Unix) { MenuElement mapToolElement = new MenuElement(); mapToolElement.MenuText = "Map Editor"; mapToolElement.Selectable = true; mapToolElement.Hidden = false; mapToolElement.ActiveArea = new Rectangle(10, 90, 600, 100); mapToolElement.ForegroundColor = new Color(225, 225, 225); mapToolElement.ActiveForegroundColor = new Color(255, 200, 200); mapToolElement.SpriteFont = @"Fonts\MenuFont"; mapToolElement.SetThrowPushEvent(new System.Action(() => { Graphics.CGraphics.changeResolution(800, 600); CMasterControl.commNet.Clear(); Master.Push(new EditorMode()); })); _menu.AddMenuElement(mapToolElement); } //_menu.AddMenuElements(new MenuElement[] { titleMenuElement, playTestElement, mapToolElement }); }