ig.

UIText

new UIText()

UI element to be used for displaying text. IMPORTANT: to function properly, this requires that a font is defined by ig.UIText#font or ig.GameExtended#font.

Author:
  • Collin Hover - collinhover.com
Source:

align

Default Value:
  • 0 x 0 (topleft)
Source:

autoRefreshText :Boolean

Whether to automatically refresh the text element when ig.UIText#text has changed.

Default Value:
  • true
Source:

<readonly> changedText :Boolean

Whether ig.UIText#textDisplay has changed.

Source:

font :ig.Font

Font to use in rendering text.

Default Value:
  • ig.GameExtended#font
Source:

ignoreSystemScale :Boolean

Text ignores system scale as font does. IMPORTANT: when true, text will not scale dynamically with view and instead will be fixed in size. This is usually ideal.

Default Value:
  • ig.CONFIG.FONT.IGNORE_SYSTEM_SCALE
Source:

linkAlign

Default Value:
  • 0 x 0 (center)
Source:

maxHeight :Number

Maximum height of text area.
- set to 0 for infinite height Tip: this will crop text and put the extra into ig.UIText#overflow.

Default Value:
  • 0
Source:

maxWidth :Number

Maximum width of text area.
- set to 0 for infinite width Tip: this will reflow text into multiple lines as necessary.

Default Value:
  • 0
Source:

scale :Number

Text scales as font does, not as entities do.

Default Value:
  • ig.CONFIG.FONT.SCALE
Source:

scaleMax :Number

Maximum value of ig.Font#scale.

Default Value:
  • ig.CONFIG.FONT.SCALE_MAX
Source:

scaleMin :Number

Minimum value of ig.Font#scale.

Default Value:
  • ig.CONFIG.FONT.SCALE_MIN
Source:

scaleOfSystemScale :Number

Scale of system scale.

Source:

text :String

Text to display. IMPORTANT: if you change this value after the text entity is added to the game, it will automatically refresh the displayed text on the next update.

Source:

textAlign :String

Text align.

Default Value:
  • center
Source:

textDisplay :String

Text displayed after formatting.

Source:

textImage :ig.ImageDrawing

Text cache image.

Source:

textOverflow :String

Text overflowing, i.e. hidden, after formatting.

Source:

draw()

Source:

rebuild()

Source:

refresh()

Source:

resize()

Source:

update()

Source: