C# Class Flood.GUI.Controls.Label

Static text label.
Inheritance: Control
Datei anzeigen Open project: FloodProject/flood Class Usage Examples

Public Methods

Method Description
GetCharacterPosition ( int index ) : System.Vector2

Gets the coordinates of specified character.

Label ( Control parent ) : System

Initializes a new instance of the Label class.

MakeColorBright ( ) : void
MakeColorDark ( ) : void
MakeColorHighlight ( ) : void
MakeColorNormal ( ) : void
SetText ( String str, bool doEvents = true ) : void

Sets the label text.

SizeToContents ( ) : void

Protected Methods

Method Description
GetClosestCharacter ( int x, int y ) : int

Returns index of the character closest to specified point (in canvas coordinates).

Layout ( Skins skin ) : void

Lays out the control's interior according to alignment, padding, dock etc.

OnTextChanged ( ) : void

Handler for text changed event.

Render ( Skins skin ) : void

Renders the control using specified skin.

SetTextPosition ( int x, int y ) : void

Sets the position of the internal text control.

Method Details

GetCharacterPosition() public method

Gets the coordinates of specified character.
public GetCharacterPosition ( int index ) : System.Vector2
index int Character index.
return System.Vector2

GetClosestCharacter() protected method

Returns index of the character closest to specified point (in canvas coordinates).
protected GetClosestCharacter ( int x, int y ) : int
x int
y int
return int

Label() public method

Initializes a new instance of the Label class.
public Label ( Control parent ) : System
parent Control Parent control.
return System

Layout() protected method

Lays out the control's interior according to alignment, padding, dock etc.
protected Layout ( Skins skin ) : void
skin Skins Skin to use.
return void

MakeColorBright() public method

public MakeColorBright ( ) : void
return void

MakeColorDark() public method

public MakeColorDark ( ) : void
return void

MakeColorHighlight() public method

public MakeColorHighlight ( ) : void
return void

MakeColorNormal() public method

public MakeColorNormal ( ) : void
return void

OnTextChanged() protected method

Handler for text changed event.
protected OnTextChanged ( ) : void
return void

Render() protected method

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
return void

SetText() public method

Sets the label text.
public SetText ( String str, bool doEvents = true ) : void
str String Text to set.
doEvents bool Determines whether to invoke "text changed" event.
return void

SetTextPosition() protected method

Sets the position of the internal text control.
protected SetTextPosition ( int x, int y ) : void
x int
y int
return void

SizeToContents() public method

public SizeToContents ( ) : void
return void