public MainMenu(Vector2 position, MenuAction[] actions, float spacing, int scoreBoardIndex) : base(position, actions) { MenuEntry play = new MenuEntry( "Play", new MenuAction[] { new MenuAction(ActionType.Select, new PlayGameDelegate(scoreBoardIndex)) }, position); MenuEntry quit = new MenuEntry( "Quit", new MenuAction[] { new MenuAction(ActionType.Select, new GoToTitleDelegate()) }, position + new Vector2(0, 3 * spacing)); play.UpperMenu = quit; play.LowerMenu = quit; quit.UpperMenu = play; quit.LowerMenu = play; this.Add(play); this.Add(quit); }
/// <summary> /// Initializes a new instance of the <see cref="PauseMenu"/> class. /// </summary> /// <param name="position">The position.</param> /// <param name="actions">The actions.</param> /// <param name="spacing">The spacing.</param> public PauseMenu(Vector2 position, MenuAction[] actions, float spacing) : base(position, actions) { MenuEntry resume = new MenuEntry( "Resume", new MenuAction[] { new MenuAction(ActionType.Select, new QuitPauseScreenDelegate()) }, position); VolumeControlDisplayEntry music = new VolumeControlDisplayEntry( "Music Volume", string.Empty, new MenuAction[] { }, position + new Vector2(0, spacing), new Vector2(0, 300), 0.9f, 0.9f, true, false); VolumeControlDisplayEntry sound = new VolumeControlDisplayEntry( "Sound Volume", string.Empty, new MenuAction[] { }, position + new Vector2(0, 2 * spacing), new Vector2(0, 300), 0.9f, 0.9f, false, false); MenuEntry quit = new MenuEntry( "Exit", new MenuAction[] { new MenuAction(ActionType.Select, new GoToTitleDelegate()) }, position + new Vector2(0, 3 * spacing)); resume.UpperMenu = quit; resume.LowerMenu = music; music.UpperMenu = resume; music.LowerMenu = sound; sound.UpperMenu = music; sound.LowerMenu = quit; quit.UpperMenu = sound; quit.LowerMenu = resume; this.Add(resume); this.Add(music); this.Add(sound); this.Add(quit); }
public LoadOutMenu(Vector2 position, MenuAction[] actions, int count, LoadOutScreen parent) : base(position, actions) { MenuEntry gun = new MenuEntry( "Gun", new MenuAction[] { new MenuAction(ActionType.Select, new LoadOutDelegate(count, "Gun", parent)) }, position); MenuEntry axe = new MenuEntry( "Melee", new MenuAction[] { new MenuAction(ActionType.Select, new LoadOutDelegate(count, "Melee", parent)) }, position + new Vector2(0, 80)); MenuEntry shield = new MenuEntry( "Shield", new MenuAction[] { new MenuAction(ActionType.Select, new LoadOutDelegate(count, "Shield", parent)) }, position + new Vector2(0,160)); gun.LowerMenu = axe; axe.UpperMenu = gun; axe.LowerMenu = shield; shield.UpperMenu = axe; this.Add(gun); this.Add(axe); this.Add(shield); }