GravityChooser.GravityChooserOptionsMenuScreen Class Reference

The options for the gravity chooser. More...

Inheritance diagram for GravityChooser.GravityChooserOptionsMenuScreen:
NewGamePhysics.StateManager.MenuScreen NewGamePhysics.StateManager.GameScreen

List of all members.

Public Member Functions

 GravityChooserOptionsMenuScreen ()
 Constructor for the options menu screen of the gravity chooser.
override void LoadContent ()
 Load content and create graphical elements needed for this screen.
override void Update (GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
 Update the main menu screen.
override void Draw (GameTime gameTime)
 Draw the options screen.

Detailed Description

The options for the gravity chooser.

Definition at line 20 of file GravityChooserOptionsMenuScreen.cs.


Constructor & Destructor Documentation

GravityChooser.GravityChooserOptionsMenuScreen.GravityChooserOptionsMenuScreen (  ) 

Constructor for the options menu screen of the gravity chooser.

Definition at line 42 of file GravityChooserOptionsMenuScreen.cs.

00043             : base("Gravity Chooser Options")
00044         {
00045             // Create our menu entries
00046             celestialObjectMenuEntry = new MenuEntry(string.Empty);
00047             celestialObjectMenuEntry.Selected += CelestialObjectMenuEntrySelected;
00048             MenuEntries.Add(celestialObjectMenuEntry);
00049 
00050             earthGravityModelMenuEntry = new MenuEntry(string.Empty);
00051             earthGravityModelMenuEntry.Selected += EarthGravityModelMenuEntrySelected;
00052             MenuEntries.Add(earthGravityModelMenuEntry);
00053 
00054             MenuEntry backMenuEntry = new MenuEntry("Back to Main Menu");
00055             backMenuEntry.Selected += OnCancel;
00056             MenuEntries.Add(backMenuEntry);
00057         }


Member Function Documentation

override void GravityChooser.GravityChooserOptionsMenuScreen.Draw ( GameTime  gameTime  )  [virtual]

Draw the options screen.

Parameters:
gameTime The current game time.

Reimplemented from NewGamePhysics.StateManager.MenuScreen.

Definition at line 109 of file GravityChooserOptionsMenuScreen.cs.

00110         {
00111             base.Draw(gameTime);
00112 
00113             // Draw scroller
00114             SpriteBatch spriteBatch = ScreenManager.SpriteBatch;
00115             scrollingInfoText.Draw(gameTime, spriteBatch);
00116         }

override void GravityChooser.GravityChooserOptionsMenuScreen.LoadContent (  )  [virtual]

Load content and create graphical elements needed for this screen.

Reimplemented from NewGamePhysics.StateManager.GameScreen.

Definition at line 64 of file GravityChooserOptionsMenuScreen.cs.

00065         {
00066             base.LoadContent();
00067 
00068             // Create scroller
00069             SpriteFont font = ScreenManager.Fonts["menu"];
00070             int width = ScreenManager.GraphicsDevice.Viewport.Width;
00071             scrollingInfoText = new ScrollingText("-", font, width, 400); // text will be set later
00072             scrollingInfoText.ScrollerSpeed = 200.0f;
00073         }

override void GravityChooser.GravityChooserOptionsMenuScreen.Update ( GameTime  gameTime,
bool  otherScreenHasFocus,
bool  coveredByOtherScreen 
) [virtual]

Update the main menu screen.

Parameters:
gameTime The current game time.
otherScreenHasFocus Flag indicating of another screen has the focus.
coveredByOtherScreen Flag indicating of the screen is covered by another screen.

Reimplemented from NewGamePhysics.StateManager.MenuScreen.

Definition at line 85 of file GravityChooserOptionsMenuScreen.cs.

00086         {
00087             if (WaitForUncover)
00088             {
00089                 if ((!coveredByOtherScreen) || (!otherScreenHasFocus))
00090                 {
00091                     // Update the texts
00092                     UpdateAllTexts();
00093 
00094                     // Update menu text
00095                     WaitForUncover = false;
00096                 }
00097             }
00098 
00099             // Update scrollers
00100             scrollingInfoText.Update(gameTime);
00101 
00102             base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
00103         }


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2