C# Class Nez.UI.Label

Inheritance: Element
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Méthode Description
Label ( string text ) : System
Label ( string text, BitmapFont font ) : System
Label ( string text, BitmapFont font, Color fontColor ) : System
Label ( string text, LabelStyle style ) : System
Label ( string text, Skin skin, string styleName = null ) : System
draw ( Graphics graphics, float parentAlpha ) : void
getStyle ( ) : LabelStyle

Returns the button's style. Modifying the returned style may not have an effect until {@link #setStyle(ButtonStyle)} is called.

getText ( ) : string
invalidate ( ) : void
layout ( ) : void
setAlignment ( Align alignment ) : Label

alignment Aligns all the text within the label (default left center) and each line of text horizontally (default left)

setAlignment ( Align labelAlign, Align lineAlign ) : Label

labelAlign Aligns all the text within the label (default left center). lineAlign Aligns each line of text horizontally (default left).

setBackground ( IDrawable background ) : Label

background may be null to clear the background.

setEllipsis ( String ellipsis ) : void

When non-null the text will be truncated "..." if it does not fit within the width of the label. Wrapping will not occur when ellipsis is enabled. Default is false.

setEllipsis ( bool ellipsis ) : void

When true the text will be truncated "..." if it does not fit within the width of the label. Wrapping will not occur when ellipsis is true. Default is false.

setFontColor ( Color color ) : Label
setFontScale ( float fontScale ) : Label
setFontScale ( float fontScaleX, float fontScaleY ) : void
setStyle ( LabelStyle style ) : Label
setText ( string text ) : Label
setWrap ( bool shouldWrap ) : void

should the text be wrapped?

Private Methods

Méthode Description
computePrefSize ( ) : void

Method Details

Label() public méthode

public Label ( string text ) : System
text string
Résultat System

Label() public méthode

public Label ( string text, BitmapFont font ) : System
text string
font BitmapFont
Résultat System

Label() public méthode

public Label ( string text, BitmapFont font, Color fontColor ) : System
text string
font BitmapFont
fontColor Color
Résultat System

Label() public méthode

public Label ( string text, LabelStyle style ) : System
text string
style LabelStyle
Résultat System

Label() public méthode

public Label ( string text, Skin skin, string styleName = null ) : System
text string
skin Skin
styleName string
Résultat System

draw() public méthode

public draw ( Graphics graphics, float parentAlpha ) : void
graphics Graphics
parentAlpha float
Résultat void

getStyle() public méthode

Returns the button's style. Modifying the returned style may not have an effect until {@link #setStyle(ButtonStyle)} is called.
public getStyle ( ) : LabelStyle
Résultat LabelStyle

getText() public méthode

public getText ( ) : string
Résultat string

invalidate() public méthode

public invalidate ( ) : void
Résultat void

layout() public méthode

public layout ( ) : void
Résultat void

setAlignment() public méthode

alignment Aligns all the text within the label (default left center) and each line of text horizontally (default left)
public setAlignment ( Align alignment ) : Label
alignment Align Alignment.
Résultat Label

setAlignment() public méthode

labelAlign Aligns all the text within the label (default left center). lineAlign Aligns each line of text horizontally (default left).
public setAlignment ( Align labelAlign, Align lineAlign ) : Label
labelAlign Align Label align.
lineAlign Align Line align.
Résultat Label

setBackground() public méthode

background may be null to clear the background.
public setBackground ( IDrawable background ) : Label
background IDrawable Background.
Résultat Label

setEllipsis() public méthode

When non-null the text will be truncated "..." if it does not fit within the width of the label. Wrapping will not occur when ellipsis is enabled. Default is false.
public setEllipsis ( String ellipsis ) : void
ellipsis String Ellipsis.
Résultat void

setEllipsis() public méthode

When true the text will be truncated "..." if it does not fit within the width of the label. Wrapping will not occur when ellipsis is true. Default is false.
public setEllipsis ( bool ellipsis ) : void
ellipsis bool Ellipsis.
Résultat void

setFontColor() public méthode

public setFontColor ( Color color ) : Label
color Color
Résultat Label

setFontScale() public méthode

public setFontScale ( float fontScale ) : Label
fontScale float
Résultat Label

setFontScale() public méthode

public setFontScale ( float fontScaleX, float fontScaleY ) : void
fontScaleX float
fontScaleY float
Résultat void

setStyle() public méthode

public setStyle ( LabelStyle style ) : Label
style LabelStyle
Résultat Label

setText() public méthode

public setText ( string text ) : Label
text string
Résultat Label

setWrap() public méthode

should the text be wrapped?
public setWrap ( bool shouldWrap ) : void
shouldWrap bool If set to true should wrap.
Résultat void