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
Afficher le fichier Open project: spectrumbranch/gearsvge

Protected Properties

Свойство Type Description
menuFont Microsoft.Xna.Framework.Graphics.SpriteFont
menuItemFont Microsoft.Xna.Framework.Graphics.SpriteFont

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
DrawMenu ( SpriteBatch spriteBatch ) : void

Contains abstract Draw logic for the Menu.

Private Methods

Méthode 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 méthode

public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

DrawMenu() protected méthode

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

Old_MenuState() public méthode

public Old_MenuState ( string menuText, IMenuItem menuItemList ) : System.Collections.Generic
menuText string
menuItemList IMenuItem
Résultat System.Collections.Generic

Old_MenuState() public méthode

public Old_MenuState ( string menuText, List menuItemList ) : System.Collections.Generic
menuText string
menuItemList List
Résultat System.Collections.Generic

Update() public méthode

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Property Details

menuFont protected_oe property

protected SpriteFont,Microsoft.Xna.Framework.Graphics menuFont
Résultat Microsoft.Xna.Framework.Graphics.SpriteFont

menuItemFont protected_oe property

protected SpriteFont,Microsoft.Xna.Framework.Graphics menuItemFont
Résultat Microsoft.Xna.Framework.Graphics.SpriteFont