/// <summary> /// Makes the Menu visible /// </summary> /// <param name="menu"> The Menu to make visible </param> /// <param name="reset"> Should the menu be reset to the first item? </param> public void ShowMenu(Menu menu, bool reset) { menu.Visible = true; if (reset) { menu.OnDeselect(menu.MenuItems[menu.SelectedItem]); menu.SelectedItem = 0; menu.OnSelect(menu.MenuItems[0]); } }
public void CreateSinglePlayerMenu() { Menu menu = new Menu(new Vector2(200), 85, true, GFX.sfTitle, Color.White, new Vector2(0.5f), Align.Left, SinglePlayerBack); menu.OnSelect = Menus.SelectText; menu.OnDeselect = Menus.DeselectText; menu.AddMenuItem(new Text("Campaign", Campaign)); menu.AddMenuItem(new Text("Classic", Classic)); Menus.SinglePlayerMenu = menu; menuM.AddMenu(Menus.SinglePlayerMenu); }
public void CreateOptionMenu() { Menu menu = new Menu(new Vector2(200), 85, true, GFX.sfTitle, Color.White, new Vector2(0.5f), Align.Left, OptionBack); menu.OnSelect = Menus.SelectText; menu.OnDeselect = Menus.DeselectText; menu.AddMenuItem(new Text("Graphics", Graphics)); menu.AddMenuItem(new Text("Sound", Sound)); Menus.OptionsMenu = menu; menuM.AddMenu(Menus.OptionsMenu); }
public void CreateMultiPlayerMenu() { Menu menu = new Menu(new Vector2(200), 85, true, GFX.sfTitle, Color.White, new Vector2(0.5f), Align.Left, MultiPlayerBack); menu.OnSelect = Menus.SelectText; menu.OnDeselect = Menus.DeselectText; menu.AddMenuItem(new Text("Co-op", Coop)); menu.AddMenuItem(new Text("Player v Player", PVP)); Menus.MultiPlayerMenu = menu; menuM.AddMenu(Menus.MultiPlayerMenu); }
public void CreateMainMenu() { Menu menu = new Menu(new Vector2(200), 85, true, GFX.sfTitle, Color.White, new Vector2(0.5f), Align.Left, MainMenuBack); menu.OnSelect = Menus.SelectText; menu.OnDeselect = Menus.DeselectText; menu.AddMenuItem(new Text("Single Player", SinglePlayer)); menu.AddMenuItem(new Text("Multiplayer", Multiplayer)); menu.AddMenuItem(new Text("Options", Options)); menu.AddMenuItem(new Text("Exit", engine.Exit)); Menus.MainMenu = menu; menuM.AddMenu(Menus.MainMenu); }
public void SelectAcitiveMenu(Menu menu) { CurrentMenu = menu; }
/// <summary> /// Makes the Menu invisible /// </summary> /// <param name="menu"> The Menu to make invisible </param> public void HideMenu(Menu menu) { menu.Visible = false; }
/// <summary> /// Adds m to the list of Menus being managed /// </summary> /// <param name="m"> The Menu to add to Menus </param> public void AddMenu(Menu m) { Menus.Add(m); }