Exemplo n.º 1
0
 /// <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]);
     }
 }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 6
0
 public void SelectAcitiveMenu(Menu menu)
 {
     CurrentMenu = menu;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Makes the Menu invisible
 /// </summary>
 /// <param name="menu"> The Menu to make invisible </param>
 public void HideMenu(Menu menu)
 {
     menu.Visible = false;
 }
Exemplo n.º 8
0
 /// <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);
 }