PendulumGame.PendulumOptionsMenuScreen Class Reference

The options for the gravity chooser. More...

Inheritance diagram for PendulumGame.PendulumOptionsMenuScreen:
NewGamePhysics.StateManager.MenuScreen NewGamePhysics.StateManager.GameScreen

List of all members.

Public Member Functions

 PendulumOptionsMenuScreen ()
 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 UnloadContent ()
 Unload graphics content used by the game 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 22 of file PendulumOptionsMenuScreen.cs.


Constructor & Destructor Documentation

PendulumGame.PendulumOptionsMenuScreen.PendulumOptionsMenuScreen (  ) 

Constructor for the options menu screen of the gravity chooser.

Definition at line 59 of file PendulumOptionsMenuScreen.cs.

00060             : base("Game Options")
00061         {
00062             this.chooseGravityMenuEntry = new MenuEntry("*"); // text will be set later
00063             this.chooseGravityMenuEntry.Selected += ChooseGravityMenuEntrySelected;
00064             MenuEntries.Add(this.chooseGravityMenuEntry);
00065 
00066             this.celestialObjectMenuEntry = new MenuEntry(string.Empty);
00067             this.celestialObjectMenuEntry.Selected += CelestialObjectMenuEntrySelected;
00068             MenuEntries.Add(this.celestialObjectMenuEntry);
00069 
00070             this.gravityModelMenuEntry = new MenuEntry(string.Empty);
00071             this.gravityModelMenuEntry.Selected += GravityModelMenuEntrySelected;
00072             MenuEntries.Add(this.gravityModelMenuEntry);
00073 
00074             this.rotationalFrictionTypeMenuEntry = new MenuEntry(string.Empty);
00075             this.rotationalFrictionTypeMenuEntry.Selected += RotationalFrictionTypeMenuEntrySelected;
00076             MenuEntries.Add(this.rotationalFrictionTypeMenuEntry);
00077 
00078             this.entropySourceTypeMenuEntry = new MenuEntry(string.Empty);
00079             this.entropySourceTypeMenuEntry.Selected += EntropySourceTypeMenuEntrySelected;
00080             MenuEntries.Add(this.entropySourceTypeMenuEntry);
00081 
00082             MenuEntry backMenuEntry = new MenuEntry("Back to Main Menu");
00083             backMenuEntry.Selected += OnCancel;
00084             MenuEntries.Add(backMenuEntry);
00085 
00086             // Update menu+info text
00087             UpdateAllTexts();
00088         }


Member Function Documentation

override void PendulumGame.PendulumOptionsMenuScreen.Draw ( GameTime  gameTime  )  [virtual]

Draw the options screen.

Parameters:
gameTime The current game time.

Reimplemented from NewGamePhysics.StateManager.MenuScreen.

Definition at line 155 of file PendulumOptionsMenuScreen.cs.

00156         {
00157             base.Draw(gameTime);
00158 
00159             // Draw scroller
00160             SpriteBatch spriteBatch = ScreenManager.SpriteBatch;
00161             scrollingInfoText.Draw(gameTime, spriteBatch);
00162         }

override void PendulumGame.PendulumOptionsMenuScreen.LoadContent (  )  [virtual]

Load content and create graphical elements needed for this screen.

Reimplemented from NewGamePhysics.StateManager.GameScreen.

Definition at line 93 of file PendulumOptionsMenuScreen.cs.

00094         {
00095             // Load base
00096             base.LoadContent();
00097 
00098             // Create scroller
00099             SpriteFont font = ScreenManager.Fonts["game"];
00100             int width = ScreenManager.GraphicsDevice.Viewport.Width;
00101             int yPos = ScreenManager.GraphicsDevice.Viewport.Height - 32;
00102 
00103             // Text will be set later
00104             scrollingInfoText = new ScrollingText("-", font, width, yPos);
00105             scrollingInfoText.TextScale = 0.5f;
00106             scrollingInfoText.ScrollerSpeed = 200.0f;
00107 
00108             // Pick random info link on 'gravity' and send it 
00109             Program.Game.SendRandomInfoLink("Gravity");
00110         }

override void PendulumGame.PendulumOptionsMenuScreen.UnloadContent (  )  [virtual]

Unload graphics content used by the game screen.

Reimplemented from NewGamePhysics.StateManager.GameScreen.

Definition at line 115 of file PendulumOptionsMenuScreen.cs.

00116         {
00117             // Unload base
00118             base.UnloadContent();
00119         }

override void PendulumGame.PendulumOptionsMenuScreen.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 131 of file PendulumOptionsMenuScreen.cs.

00132         {
00133             if (WaitForUncover)
00134             {
00135                 if ((!coveredByOtherScreen) || (!otherScreenHasFocus))
00136                 {
00137                     // Update the texts
00138                     UpdateAllTexts();
00139 
00140                     // Update menu text
00141                     WaitForUncover = false;
00142                 }
00143             }
00144 
00145             // Update scrollers
00146             scrollingInfoText.Update(gameTime);
00147 
00148             base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
00149         }


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

Generated by  doxygen 1.6.2