C# 클래스 ScreenManagement.Screens.MenuEntry

파일 보기 프로젝트 열기: giladgray/XNA-ScreenManager 1 사용 예제들

공개 메소드들

메소드 설명
DoClick ( PlayerIndex playerIndex, MenuScreen screen ) : void

Performs the Selected event for this menu entry.

Draw ( SpriteBatch sb, SpriteFont font, Vector2 position, bool isSelected, GameTime gameTime ) : void

Draws the MenuEntry onto the given SpriteBatch using a specified font.

GetHeight ( SpriteFont font ) : float
GetWidth ( SpriteFont font ) : float
MenuEntry ( string text, EventHandler select ) : System

Creates a new MenuEntry that displays some text.

MenuEntry ( string text, Microsoft.Xna.Framework.Graphics.Texture2D background, EventHandler select ) : System

Creates a new MenuEntry that displays text centered on a background texture.

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

보호된 메소드들

메소드 설명
OnSelectEntry ( PlayerIndex playerIndex, MenuScreen screen ) : void

Method for raising the Selected event.

메소드 상세

DoClick() 공개 메소드

Performs the Selected event for this menu entry.
public DoClick ( PlayerIndex playerIndex, MenuScreen screen ) : void
playerIndex PlayerIndex index of the player who initiated the action
screen MenuScreen
리턴 void

Draw() 공개 메소드

Draws the MenuEntry onto the given SpriteBatch using a specified font.
public Draw ( SpriteBatch sb, SpriteFont font, Vector2 position, bool isSelected, GameTime gameTime ) : void
sb Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch to draw MenuEntry onto
font Microsoft.Xna.Framework.Graphics.SpriteFont font for menu entry text
position Vector2 coordinates of center of MenuEntry
isSelected bool whether the entry is currently selected in the menu
gameTime Microsoft.Xna.Framework.GameTime snapshot of current game timing
리턴 void

GetHeight() 공개 메소드

public GetHeight ( SpriteFont font ) : float
font Microsoft.Xna.Framework.Graphics.SpriteFont
리턴 float

GetWidth() 공개 메소드

public GetWidth ( SpriteFont font ) : float
font Microsoft.Xna.Framework.Graphics.SpriteFont
리턴 float

MenuEntry() 공개 메소드

Creates a new MenuEntry that displays some text.
public MenuEntry ( string text, EventHandler select ) : System
text string
select EventHandler
리턴 System

MenuEntry() 공개 메소드

Creates a new MenuEntry that displays text centered on a background texture.
public MenuEntry ( string text, Microsoft.Xna.Framework.Graphics.Texture2D background, EventHandler select ) : System
text string
background Microsoft.Xna.Framework.Graphics.Texture2D
select EventHandler
리턴 System

OnSelectEntry() 보호된 메소드

Method for raising the Selected event.
protected OnSelectEntry ( PlayerIndex playerIndex, MenuScreen screen ) : void
playerIndex PlayerIndex
screen MenuScreen
리턴 void

Update() 공개 메소드

public Update ( MenuScreen screen, bool isSelected, GameTime gameTime ) : void
screen MenuScreen
isSelected bool
gameTime Microsoft.Xna.Framework.GameTime
리턴 void