Label
Function | Description |
---|---|
position() |
Returns the position of the label. |
setOpacity(value) |
Sets the opacity of the label. |
setPosition(value) |
Sets the position of the label. |
setText(value) |
Sets the text for the label. |
position()
Returns the position of the label.
Returns
Vec2 the {x, y} position of the label.
setOpacity(value)
Sets the opacity of the label. Ranges from 0 (invisible) to 255 (fully opaque)
Parameters
number value – The opacity of the label
setPosition(value)
Sets the position of the label.
Parameters
Vec2 value – the {x, y} coordinates of the position
setText(value)
Sets the text for the label.
Parameters
string value – The string that will be displayed by the label.