C# 클래스 TraceRacer.Button

Represents a touchable button.
파일 보기 프로젝트 열기: alexcoco/trace_racer 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Alpha float
BorderColor Color
BorderThickness int
FillColor Color
Position Vector2
Size Vector2
Text string
TextColor Color

공개 메소드들

메소드 설명
Button ( string text ) : System

Creates a new Button.

Draw ( GameScreen screen ) : void

Draws the button

HandleTap ( Vector2 tap ) : bool

Passes a tap location to the button for handling.

보호된 메소드들

메소드 설명
OnTapped ( ) : void

Invokes the Tapped event and allows subclasses to perform actions when tapped.

메소드 상세

Button() 공개 메소드

Creates a new Button.
public Button ( string text ) : System
text string The text to display in the button.
리턴 System

Draw() 공개 메소드

Draws the button
public Draw ( GameScreen screen ) : void
screen GameScreen The screen drawing the button
리턴 void

HandleTap() 공개 메소드

Passes a tap location to the button for handling.
public HandleTap ( Vector2 tap ) : bool
tap Vector2 The location of the tap.
리턴 bool

OnTapped() 보호된 메소드

Invokes the Tapped event and allows subclasses to perform actions when tapped.
protected OnTapped ( ) : void
리턴 void

프로퍼티 상세

Alpha 공개적으로 프로퍼티

The opacity of the button.
public float Alpha
리턴 float

BorderColor 공개적으로 프로퍼티

The color of the button border.
public Color BorderColor
리턴 Color

BorderThickness 공개적으로 프로퍼티

The thickness of the border drawn for the button.
public int BorderThickness
리턴 int

FillColor 공개적으로 프로퍼티

The color of the button background.
public Color FillColor
리턴 Color

Position 공개적으로 프로퍼티

The position of the top-left corner of the button.
public Vector2 Position
리턴 Vector2

Size 공개적으로 프로퍼티

The size of the button.
public Vector2 Size
리턴 Vector2

Text 공개적으로 프로퍼티

The text displayed in the button.
public string Text
리턴 string

TextColor 공개적으로 프로퍼티

The color of the text.
public Color TextColor
리턴 Color