C# 클래스 GameStateManagement.MenuEntry

Helper class represents a single entry in a MenuScreen. By default this just draws the entry text string, but it can be customized to display menu entries in different ways. This also provides an event that will be raised when the menu entry is selected.
파일 보기 프로젝트 열기: GarethIW/LDEngine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Position Vector2
bounds Microsoft.Xna.Framework.Rectangle
selectionFade float

공개 메소드들

메소드 설명
Click ( int x, int y ) : void
Draw ( MenuScreen screen, bool isSelected, GameTime gameTime ) : void

Draws the menu entry. This can be overridden to customize the appearance.

GetHeight ( MenuScreen screen ) : int

Queries how much space this menu entry requires.

Left ( ) : void
MenuEntry ( string text, bool isEnabled ) : System

Constructs a new menu entry with the specified text.

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

Updates the menu entry.

보호된 메소드들

메소드 설명
OnSelectEntry ( ) : void

Method for raising the Selected event.

메소드 상세

Click() 공개 메소드

public Click ( int x, int y ) : void
x int
y int
리턴 void

Draw() 공개 메소드

Draws the menu entry. This can be overridden to customize the appearance.
public Draw ( MenuScreen screen, bool isSelected, GameTime gameTime ) : void
screen MenuScreen
isSelected bool
gameTime Microsoft.Xna.Framework.GameTime
리턴 void

GetHeight() 공개 메소드

Queries how much space this menu entry requires.
public GetHeight ( MenuScreen screen ) : int
screen MenuScreen
리턴 int

Left() 공개 메소드

public Left ( ) : void
리턴 void

MenuEntry() 공개 메소드

Constructs a new menu entry with the specified text.
public MenuEntry ( string text, bool isEnabled ) : System
text string
isEnabled bool
리턴 System

OnSelectEntry() 보호된 메소드

Method for raising the Selected event.
protected OnSelectEntry ( ) : void
리턴 void

Right() 공개 메소드

public Right ( ) : void
리턴 void

Update() 공개 메소드

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

프로퍼티 상세

Position 공개적으로 프로퍼티

public Vector2 Position
리턴 Vector2

bounds 공개적으로 프로퍼티

public Rectangle,Microsoft.Xna.Framework bounds
리턴 Microsoft.Xna.Framework.Rectangle

selectionFade 공개적으로 프로퍼티

Tracks a fading selection effect on the entry.
The entries transition out of the selection effect when they are deselected.
public float selectionFade
리턴 float