C# Class PrinceGame.MenuEntry

ファイルを表示 Open project: salvadorc17/Prince-Monogame Class Usage Examples

Public Methods

Method Description
Draw ( MenuScreen screen, bool isSelected, GameTime gameTime ) : void

Draws the menu entry. This can be overridden to customize the appearance.

GetHeight ( MenuScreen screen ) : int

Queries how much space this menu entry requires.

GetWidth ( MenuScreen screen ) : int

Queries how wide the entry is, used for centering on the screen.

MenuEntry ( string text ) : System

Constructs a new menu entry with the specified text.

Update ( MenuScreen screen, bool isSelected, GameTime gameTime ) : void

Updates the menu entry.

Protected Methods

Method Description
OnSelectEntry ( PlayerIndex playerIndex ) : void

Method for raising the Selected event.

Method Details

Draw() public method

Draws the menu entry. This can be overridden to customize the appearance.
public Draw ( MenuScreen screen, bool isSelected, GameTime gameTime ) : void
screen MenuScreen
isSelected bool
gameTime Microsoft.Xna.Framework.GameTime
return void

GetHeight() public method

Queries how much space this menu entry requires.
public GetHeight ( MenuScreen screen ) : int
screen MenuScreen
return int

GetWidth() public method

Queries how wide the entry is, used for centering on the screen.
public GetWidth ( MenuScreen screen ) : int
screen MenuScreen
return int

MenuEntry() public method

Constructs a new menu entry with the specified text.
public MenuEntry ( string text ) : System
text string
return System

OnSelectEntry() protected method

Method for raising the Selected event.
protected OnSelectEntry ( PlayerIndex playerIndex ) : void
playerIndex PlayerIndex
return void

Update() public method

Updates the menu entry.
public Update ( MenuScreen screen, bool isSelected, GameTime gameTime ) : void
screen MenuScreen
isSelected bool
gameTime Microsoft.Xna.Framework.GameTime
return void