using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using EvilSatellites.Menu; using EvilSatellites.Screens; namespace EvilSatellites.Screens { public class MainMenuScreen : MenuScreen { public override void Activate() { MenuOptions = new MenuContainer("Main Menu", "Navigate with up and down arrows,, and enter to select."); MenuOptions.Add(new MenuEntry("Start", "Start the game")) .Add(new MenuEntry("Options", "Change game options")) .Add(new MenuEntry("Exit", "Exit the game")); base.Activate(); } public override void SelectItem() { base.SelectItem(); if (CursorPosition == 0) { Manager.AddScreen(new GameScreen()); Manager.RemoveScreen(this); Manager.Game.ResetElapsedTime(); } if (CursorPosition == 2) { Environment.Exit(0); } if (CursorPosition == 1) { Manager.RemoveScreen(this); Manager.AddScreen(new OptionsScreen()); } } } }