C# Класс Nez.UI.Label

Наследование: Element
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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?

Приватные методы

Метод Описание
computePrefSize ( ) : void

Описание методов

Label() публичный Метод

public Label ( string text ) : System
text string
Результат System

Label() публичный Метод

public Label ( string text, BitmapFont font ) : System
text string
font BitmapFont
Результат System

Label() публичный Метод

public Label ( string text, BitmapFont font, Color fontColor ) : System
text string
font BitmapFont
fontColor Color
Результат System

Label() публичный Метод

public Label ( string text, LabelStyle style ) : System
text string
style LabelStyle
Результат System

Label() публичный Метод

public Label ( string text, Skin skin, string styleName = null ) : System
text string
skin Skin
styleName string
Результат System

draw() публичный Метод

public draw ( Graphics graphics, float parentAlpha ) : void
graphics Graphics
parentAlpha float
Результат void

getStyle() публичный Метод

Returns the button's style. Modifying the returned style may not have an effect until {@link #setStyle(ButtonStyle)} is called.
public getStyle ( ) : LabelStyle
Результат LabelStyle

getText() публичный Метод

public getText ( ) : string
Результат string

invalidate() публичный Метод

public invalidate ( ) : void
Результат void

layout() публичный Метод

public layout ( ) : void
Результат void

setAlignment() публичный Метод

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.
Результат Label

setAlignment() публичный Метод

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.
Результат Label

setBackground() публичный Метод

background may be null to clear the background.
public setBackground ( IDrawable background ) : Label
background IDrawable Background.
Результат Label

setEllipsis() публичный Метод

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.
Результат void

setEllipsis() публичный Метод

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.
Результат void

setFontColor() публичный Метод

public setFontColor ( Color color ) : Label
color Color
Результат Label

setFontScale() публичный Метод

public setFontScale ( float fontScale ) : Label
fontScale float
Результат Label

setFontScale() публичный Метод

public setFontScale ( float fontScaleX, float fontScaleY ) : void
fontScaleX float
fontScaleY float
Результат void

setStyle() публичный Метод

public setStyle ( LabelStyle style ) : Label
style LabelStyle
Результат Label

setText() публичный Метод

public setText ( string text ) : Label
text string
Результат Label

setWrap() публичный Метод

should the text be wrapped?
public setWrap ( bool shouldWrap ) : void
shouldWrap bool If set to true should wrap.
Результат void