using FarseerGames.Triangulation.GamePlay.PhysicsHelper; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using FarseerGames.Triangulation.GamePlay.MainDemo; using Microsoft.Xna.Framework.Audio; using FarseerGames.Triangulation.ScreenSystem; namespace FarseerGames.Triangulation.ScreenSystem { /// <summary> /// The main menu screen is the first thing displayed when the game starts up. /// </summary> internal class MainMenuScreen : MenuScreen { /// <summary> /// Constructor fills in the menu contents. /// </summary> public MainMenuScreen() { MenuEntries.Add("Triangulate"); MenuEntries.Add("Exit"); LeftBorder = 100; } public override void LoadContent() { base.LoadContent(); } /// <summary> /// Responds to user menu selections. /// </summary> protected override void OnSelectEntry(int entryIndex) { switch (entryIndex) { case 0: ScreenManager.AddScreen(new TriangulateScreen()); break; default: // Default to exit ScreenManager.Game.Exit(); break; } ExitScreen(); } public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); } public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(); base.Draw(gameTime); ScreenManager.SpriteBatch.End(); } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)