C# 클래스 GameStateManagement.MenuScreen

Base 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.
상속: GameScreen
파일 보기 프로젝트 열기: GarethIW/LDEngine 1 사용 예제들

공개 메소드들

메소드 설명
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.

LoadContent ( ) : void
MenuScreen ( string menuTitle ) : System

Constructor.

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

Updates the menu.

보호된 메소드들

메소드 설명
GetMenuEntryHitBounds ( MenuEntry entry ) : Rectangle

Allows the screen to create the hit bounds for a particular menu entry.

OnCancel ( object sender, EventArgs e ) : void

Handler for when the user has cancelled the menu.

OnSelectEntry ( int entryIndex ) : 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

GetMenuEntryHitBounds() 보호된 메소드

Allows the screen to create the hit bounds for a particular menu entry.
protected GetMenuEntryHitBounds ( MenuEntry entry ) : Rectangle
entry MenuEntry
리턴 Microsoft.Xna.Framework.Rectangle

HandleInput() 공개 메소드

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

LoadContent() 공개 메소드

public LoadContent ( ) : void
리턴 void

MenuScreen() 공개 메소드

Constructor.
public MenuScreen ( string menuTitle ) : System
menuTitle string
리턴 System

OnCancel() 보호된 메소드

Handler for when the user has cancelled the menu.
protected OnCancel ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

OnSelectEntry() 보호된 메소드

Handler for when the user has chosen a menu entry.
protected OnSelectEntry ( int entryIndex ) : void
entryIndex int
리턴 void

UnloadContent() 공개 메소드

public UnloadContent ( ) : void
리턴 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