C# Class Gears.Navigation.Old_MenuState

MenuState rev.005 Abstract class, intended to be inherited from and then instantiated with constructor parameters. Every MenuState is a Menu, and contains a MenuItemCollection, which is simply a collection of possible MenuStates for use in the MenuState/Engine logic. To avoid feature creep, this revision does not include parameterized fonts or font sizes or window sizes. This is done on purpose and can easily be refactored in on a later revision.
Inheritance: Gears.Navigation.MenuReadyGameState
Mostrar archivo Open project: spectrumbranch/gearsvge

Protected Properties

Property Type Description
menuFont Microsoft.Xna.Framework.Graphics.SpriteFont
menuItemFont Microsoft.Xna.Framework.Graphics.SpriteFont

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch ) : void
Old_MenuState ( string menuText, IMenuItem menuItemList ) : System.Collections.Generic
Old_MenuState ( string menuText, List menuItemList ) : System.Collections.Generic
Update ( GameTime gameTime ) : void

Protected Methods

Method Description
DrawMenu ( SpriteBatch spriteBatch ) : void

Contains abstract Draw logic for the Menu.

Private Methods

Method Description
ActivateState ( ) : void

Contains logic that should be fired every time the state becomes active. This should fire especially in cases where the state had become inactive and then regains activity once again.

InactivateState ( ) : void

Contains logic that should be fired every time the state becomes inactive. This was originally implemented to avoid function pointers AKA delegates from firing out of the Master.stack order.

Initialize ( string menuText ) : void
KeyDown ( KeyboardState &currentKeyboardState, KeyboardState &oldKeyboardState ) : void

Event based Input hook for MenuState.

LoadContent ( ) : void
PushActiveMenuIndex ( ) : void

Called when a user presses Enter on a specific Menu Item.

UpdateInput ( GameTime gameTime ) : void

Only should be run if the state is active.

Method Details

Draw() public method

public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

DrawMenu() protected method

Contains abstract Draw logic for the Menu.
protected DrawMenu ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

Old_MenuState() public method

public Old_MenuState ( string menuText, IMenuItem menuItemList ) : System.Collections.Generic
menuText string
menuItemList IMenuItem
return System.Collections.Generic

Old_MenuState() public method

public Old_MenuState ( string menuText, List menuItemList ) : System.Collections.Generic
menuText string
menuItemList List
return System.Collections.Generic

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Property Details

menuFont protected_oe property

protected SpriteFont,Microsoft.Xna.Framework.Graphics menuFont
return Microsoft.Xna.Framework.Graphics.SpriteFont

menuItemFont protected_oe property

protected SpriteFont,Microsoft.Xna.Framework.Graphics menuItemFont
return Microsoft.Xna.Framework.Graphics.SpriteFont