Label
Extends: UiWidget
With customPosition, horizAlign lines the text up on customX, as Renderer.drawText() does: "center" centres it there and "right" ends it there. Each line of wrapped text is aligned the same way within the widest.
Properties
drawableText(BGE.DrawableText)wrapWidth(float) — Width in pixels to wrap the text at. 0 (the default) means no wrapping.
Constructor
new Label(game: BGE.Game): LabelParameters
game(BGE.Game)
Instance Methods
setFont(font: roFont): void
Draws the text in this font, ignoring the theme's font.
Parameters
font(roFont)
Returns
void
setText(text?: string): void
Parameters
text(string, optional, default: "\"\"")
Returns
void
getWorldPosition(parent?: UiWidget): BGE.Math.Vector
protected
Parameters
parent(UiWidget, optional, default: "invalid")
Returns
BGE.Math.Vector
draw(parent?: UiWidget): void
Parameters
parent(UiWidget, optional, default: "invalid")
Returns
void