C# Класс PrinceGame.MenuScreen

Наследование: GameScreen
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

Draw() публичный Метод

Draws the menu.
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

HandleInput() публичный Метод

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
Результат void

MenuScreen() публичный Метод

Constructor.
public MenuScreen ( string menuTitle ) : System
menuTitle string
Результат System

OnCancel() защищенный Метод

Handler for when the user has cancelled the menu.
protected OnCancel ( PlayerIndex playerIndex ) : void
playerIndex PlayerIndex
Результат void

OnCancel() защищенный Метод

Helper overload makes it easy to use OnCancel as a MenuEntry event handler.
protected OnCancel ( object sender, PlayerIndexEventArgs e ) : void
sender object
e PlayerIndexEventArgs
Результат void

OnSelectEntry() защищенный Метод

Handler for when the user has chosen a menu entry.
protected OnSelectEntry ( int entryIndex, PlayerIndex playerIndex ) : void
entryIndex int
playerIndex PlayerIndex
Результат void

Update() публичный Метод

Updates the menu.
public Update ( GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen ) : void
gameTime Microsoft.Xna.Framework.GameTime
otherScreenHasFocus bool
coveredByOtherScreen bool
Результат void

UpdateMenuEntryLocations() защищенный Метод

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
Результат void