C# Class NScumm.MonoGame.MenuScreen

Base public class for screens that contain a menu of options. The user can move up and down to select an entry, or cancel to back out of the screen.
This public class is similar to one in the GameStateManagement sample.
Inheritance: GameScreen
Show file Open project: scemino/nscumm

Public Methods

Method Description
Draw ( GameTime gameTime ) : void

Draws the menu.

HandleInput ( InputState input ) : void

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

Protected Methods

Method Description
MenuScreen ( ) : System

Constructor.

OnCancel ( ) : void

Notifies derived classes that the menu has been cancelled.

OnSelectEntry ( int entryIndex ) : void

Notifies derived classes that a menu entry has been chosen.

Method Details

Draw() public method

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

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

MenuScreen() protected method

Constructor.
protected MenuScreen ( ) : System
return System

OnCancel() protected abstract method

Notifies derived classes that the menu has been cancelled.
protected abstract OnCancel ( ) : void
return void

OnSelectEntry() protected abstract method

Notifies derived classes that a menu entry has been chosen.
protected abstract OnSelectEntry ( int entryIndex ) : void
entryIndex int
return void