C# 클래스 FarseerPhysics.Samples.ScreenSystem.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.
파일 보기 프로젝트 열기: tinco/Farseer-Physics 1 사용 예제들

공개 메소드들

메소드 설명
CompareTo ( object obj ) : int
Draw ( ) : void

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

GetHeight ( ) : int

Queries how much space this menu entry requires.

GetWidth ( ) : int

Queries how wide the entry is, used for centering on the screen.

Initialize ( ) : void
InitializeEntries ( float hiddenX, float visibleX ) : void
InitializePosition ( float target, bool visible ) : void
IsExitItem ( ) : bool
IsSelectable ( ) : bool
MenuEntry ( MenuScreen menu, string text, EntryType type, GameScreen screen ) : System

Constructs a new menu entry with the specified text.

MenuEntry ( string text, PhysicsDemoScreen screen, Microsoft.Xna.Framework.Graphics.Texture2D preview ) : System

Constructs a new menu entry with the specified text.

Update ( bool isSelected, GameTime gameTime ) : void

Updates the menu entry.

Update ( bool isSelected, bool isHovered, GameTime gameTime ) : void

Updates the menu entry.

메소드 상세

CompareTo() 공개 메소드

public CompareTo ( object obj ) : int
obj object
리턴 int

Draw() 공개 메소드

Draws the menu entry. This can be overridden to customize the appearance.
public Draw ( ) : void
리턴 void

GetHeight() 공개 메소드

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

GetWidth() 공개 메소드

Queries how wide the entry is, used for centering on the screen.
public GetWidth ( ) : int
리턴 int

Initialize() 공개 메소드

public Initialize ( ) : void
리턴 void

InitializeEntries() 공개 정적인 메소드

public static InitializeEntries ( float hiddenX, float visibleX ) : void
hiddenX float
visibleX float
리턴 void

InitializePosition() 공개 메소드

public InitializePosition ( float target, bool visible ) : void
target float
visible bool
리턴 void

IsExitItem() 공개 메소드

public IsExitItem ( ) : bool
리턴 bool

IsSelectable() 공개 메소드

public IsSelectable ( ) : bool
리턴 bool

MenuEntry() 공개 메소드

Constructs a new menu entry with the specified text.
public MenuEntry ( MenuScreen menu, string text, EntryType type, GameScreen screen ) : System
menu MenuScreen
text string
type EntryType
screen GameScreen
리턴 System

MenuEntry() 공개 메소드

Constructs a new menu entry with the specified text.
public MenuEntry ( string text, PhysicsDemoScreen screen, Microsoft.Xna.Framework.Graphics.Texture2D preview ) : System
text string
screen PhysicsDemoScreen
preview Microsoft.Xna.Framework.Graphics.Texture2D
리턴 System

Update() 공개 메소드

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

Update() 공개 메소드

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