C# Class ScreenManagement.Screens.Old.FancyMenuScreen

Inheritance: MenuScreen
Mostra file Open project: giladgray/XNA-ScreenManager

Private Properties

Property Type Description
ChangeColumns void
ChangeColumnsRelative void

Public Methods

Method Description
AddMenuEntry ( int column, MenuEntry entry, EventHandler evt = null ) : MenuEntry

Adds a new menu entry to the menu with the given event handler.

AddMenuEntry ( int column, string text, Alignment align = Alignment.Left, EventHandler evt = null ) : MenuEntry

Adds a new menu entry to the menu with the given text, alignment, and event handler.

Draw ( GameTime gameTime ) : void

Draws the menu.

FancyMenuScreen ( string title, int columns, Orientation orientation = Orientation.Vertical ) : System

Creates a new FancyMenuScreen with the given title, number of columns, and column orientation.

HandleInput ( InputState input ) : void

Responds to user input, changing the selected entry and accepting or cancelling the menu.

LoadContent ( ) : void
Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void

Updates the menu.

Protected Methods

Method Description
DoLayout ( ) : void

Recalculate the positions and sizes of each menu entry.

OnSelectEntry ( Selection selected, PlayerIndex playerIndex ) : void

Handler for when the user has chosen a menu entry.

Private Methods

Method Description
ChangeColumns ( int dir ) : void
ChangeColumnsRelative ( int dir ) : void

Method Details

AddMenuEntry() public method

Adds a new menu entry to the menu with the given event handler.
public AddMenuEntry ( int column, MenuEntry entry, EventHandler evt = null ) : MenuEntry
column int
entry MenuEntry MenuEntry to add
evt EventHandler event handler for selected the menu entry
return MenuEntry

AddMenuEntry() public method

Adds a new menu entry to the menu with the given text, alignment, and event handler.
public AddMenuEntry ( int column, string text, Alignment align = Alignment.Left, EventHandler evt = null ) : MenuEntry
column int
text string text of the menu entry
align Alignment horizontal alignment of menu entry
evt EventHandler event handler for selecting menu entry
return MenuEntry

DoLayout() protected method

Recalculate the positions and sizes of each menu entry.
protected DoLayout ( ) : void
return void

Draw() public method

Draws the menu.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

FancyMenuScreen() public method

Creates a new FancyMenuScreen with the given title, number of columns, and column orientation.
public FancyMenuScreen ( string title, int columns, Orientation orientation = Orientation.Vertical ) : System
title string the title of the menu
columns int the number of menu columns
orientation Orientation
return System

HandleInput() public method

Responds to user input, changing the selected entry and accepting or cancelling the menu.
public HandleInput ( InputState input ) : void
input InputState
return void

LoadContent() public method

public LoadContent ( ) : void
return void

OnSelectEntry() protected method

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

Update() public method

Updates the menu.
public Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void
gameTime Microsoft.Xna.Framework.GameTime
otherScreenHasFocus bool
coveredByOtherScreen bool
return void