Class: UIText

UIText(text, position, size, hAlign, vAlign, color) → {UIText}

new UIText(text, position, size, hAlign, vAlign, color) → {UIText}

Creates text used for UI
Parameters:
Name Type Description
text String The text that the font will be based on
position Array.<Array> The base position of the UIText
size int The size of the UIText
hAlign int The horizontal align of the UIText
vAlign int The vertical align of the UIText
color Array.<Array> The color of the text
Source:
Returns:
Type
UIText

Members

eHAlignment :enum|eHAlignment

The horiziontal alignment of the UIText
Type:
  • enum | eHAlignment
Source:

eVAlignment :enum|eVAlignment

The vertical alignment of the UIText
Type:
  • enum | eVAlignment
Source:

Methods

_applyUIXform(aCamera)

Converts the pixel position to a WC position that the camera to use
Parameters:
Name Type Description
aCamera Camera The camera the the conversion will be based off of
Source:

_getAlignmentOffset()

Calculates the position changes needed to match the allignment
Source:

getColor()

Gets the color of the text
Source:

getText()

Get the text of the UIText
Source:

setColor(c)

Sets the color of the text
Parameters:
Name Type Description
c Array.<Array> The color to set the text to
Source:

setText(t)

Sets the text of the UIText
Parameters:
Name Type Description
t String The text to change it to
Source:

setTextHeight(h)

Set the height of the text
Parameters:
Name Type Description
h int The new height to change it to
Source: