C# Class ScreenManagement.Screens.MenuScreen

Inheritance: GameScreen
Show file Open project: giladgray/XNA-ScreenManager Class Usage Examples

Protected Properties

Property Type Description
DefaultAlignment Alignment

Public Methods

Method Description
AddMenuEntry ( string text, Microsoft.Xna.Framework.Graphics.Texture2D background, EventHandler selected, bool inherit ) : MenuEntry
AddMenuLabel ( string text, Microsoft.Xna.Framework.Graphics.Texture2D background, Color textColor ) : MenuEntry
Draw ( Microsoft gameTime ) : void
HandleInput ( InputState input ) : void
LoadContent ( ) : void
MenuScreen ( string title ) : System
UnloadContent ( ) : void
Update ( Microsoft gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void

Protected Methods

Method Description
OnCancel ( object sender, MenuSelectionEventArgs args ) : void

Handler for when the user has cancelled the menu.

OnSelectEntry ( int entryIndex, PlayerIndex playerIndex ) : void

Handler for when the user has chosen a menu entry.

Method Details

AddMenuEntry() public method

public AddMenuEntry ( string text, Microsoft.Xna.Framework.Graphics.Texture2D background, EventHandler selected, bool inherit ) : MenuEntry
text string
background Microsoft.Xna.Framework.Graphics.Texture2D
selected EventHandler
inherit bool
return MenuEntry

AddMenuLabel() public method

public AddMenuLabel ( string text, Microsoft.Xna.Framework.Graphics.Texture2D background, Color textColor ) : MenuEntry
text string
background Microsoft.Xna.Framework.Graphics.Texture2D
textColor Color
return MenuEntry

Draw() public method

public Draw ( Microsoft gameTime ) : void
gameTime Microsoft
return void

HandleInput() public method

public HandleInput ( InputState input ) : void
input InputState
return void

LoadContent() public method

public LoadContent ( ) : void
return void

MenuScreen() public method

public MenuScreen ( string title ) : System
title string
return System

OnCancel() protected method

Handler for when the user has cancelled the menu.
protected OnCancel ( object sender, MenuSelectionEventArgs args ) : void
sender object
args MenuSelectionEventArgs
return void

OnSelectEntry() protected method

Handler for when the user has chosen a menu entry.
protected OnSelectEntry ( int entryIndex, PlayerIndex playerIndex ) : void
entryIndex int
playerIndex PlayerIndex
return void

UnloadContent() public method

public UnloadContent ( ) : void
return void

Update() public method

public Update ( Microsoft gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void
gameTime Microsoft
otherScreenHasFocus bool
coveredByOtherScreen bool
return void

Property Details

DefaultAlignment protected property

protected Alignment DefaultAlignment
return Alignment