C# Class PrinceGame.MenuScreen

Inheritance: GameScreen
Afficher le fichier Open project: salvadorc17/Prince-Monogame Class Usage Examples

Méthodes publiques

Méthode Description
Draw ( GameTime gameTime ) : void

Draws the menu.

HandleInput ( GameTime gameTime, InputState input ) : void

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

MenuScreen ( string menuTitle ) : System

Constructor.

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

Updates the menu.

Méthodes protégées

Méthode Description
OnCancel ( PlayerIndex playerIndex ) : void

Handler for when the user has cancelled the menu.

OnCancel ( object sender, PlayerIndexEventArgs e ) : void

Helper overload makes it easy to use OnCancel as a MenuEntry event handler.

OnSelectEntry ( int entryIndex, PlayerIndex playerIndex ) : void

Handler for when the user has chosen a menu entry.

UpdateMenuEntryLocations ( ) : void

Allows the screen the chance to position the menu entries. By default all menu entries are lined up in a vertical list, centered on the screen.

Method Details

Draw() public méthode

Draws the menu.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

HandleInput() public méthode

Responds to user input, changing the selected entry and accepting or cancelling the menu.
public HandleInput ( GameTime gameTime, InputState input ) : void
gameTime Microsoft.Xna.Framework.GameTime
input InputState
Résultat void

MenuScreen() public méthode

Constructor.
public MenuScreen ( string menuTitle ) : System
menuTitle string
Résultat System

OnCancel() protected méthode

Handler for when the user has cancelled the menu.
protected OnCancel ( PlayerIndex playerIndex ) : void
playerIndex PlayerIndex
Résultat void

OnCancel() protected méthode

Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
protected OnCancel ( object sender, PlayerIndexEventArgs e ) : void
sender object
e PlayerIndexEventArgs
Résultat void

OnSelectEntry() protected méthode

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

Update() public méthode

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

UpdateMenuEntryLocations() protected méthode

Allows the screen the chance to position the menu entries. By default all menu entries are lined up in a vertical list, centered on the screen.
protected UpdateMenuEntryLocations ( ) : void
Résultat void