Files
Patryk Gensch df6cf2f3d3
Some checks failed
docs / deploy (push) Has been cancelled
docs / build (push) Has been cancelled
Added part of docs
2026-05-19 20:51:59 +02:00

2.5 KiB

TEXT

A text element rendered on screen. Uses a font (FONT) referenced through the FONT field; content, position, and alignment are configured by the remaining fields.

Fields

FONT

STRING FONT

Name of the FONT variable from which character textures are taken.

HJUSTIFY

STRING HJUSTIFY

Horizontal alignment inside the RECT rectangle. Accepted values: LEFT, RIGHT, CENTER.

PRIORITY

INTEGER PRIORITY

The text's rendering priority (Z) relative to other scene objects.

RECT

INTEGER,INTEGER,INTEGER,INTEGER RECT

The rectangle in which the text is drawn — four comma-separated integers: xLeft, yBottom, xRight, yTop. In a script, the field can also reference a variable of type ANIMO or IMAGE, in which case its bounds are taken from that object.

TEXT

STRING TEXT

The displayed text. Modified through SETTEXT.

TOCANVAS

BOOL TOCANVAS

Whether the text is rendered on the scene's main canvas. If FALSE, the text is not visible regardless of VISIBLE.

VISIBLE

BOOL VISIBLE

The text's visibility. Modified through SHOW and HIDE.

VJUSTIFY

STRING VJUSTIFY

Vertical alignment inside the RECT rectangle. Accepted values: TOP, BOTTOM, CENTER.

Methods

HIDE

void HIDE()

Hides the text (sets VISIBLE to FALSE).

SETJUSTIFY

void SETJUSTIFY(INTEGER xLeft, INTEGER yBottom, INTEGER xRight, INTEGER yTop, STRING hJustify, STRING vJustify)

Sets the drawing rectangle (RECT) and the horizontal (HJUSTIFY) and vertical (VJUSTIFY) alignment in a single call.

Parameters

  • xLeft, yBottom, xRight, yTop — rectangle coordinates.
  • hJustify — horizontal alignment (LEFT, RIGHT, CENTER).
  • vJustify — vertical alignment (TOP, BOTTOM, CENTER).

SETPRIORITY

void SETPRIORITY(INTEGER priority)

Sets the text's rendering priority.

Parameters

  • priority — the new value of the PRIORITY field.

SETTEXT

void SETTEXT(STRING text)

Changes the displayed text.

Parameters

  • text — the new value of the TEXT field.

Examples

TXTDEBUG^SETTEXT(ARRPX^GETSIZE());
TXTDEBUG^SETTEXT("SAVED");

SHOW

void SHOW()

Shows the text (sets VISIBLE to TRUE).

Signals

ONINIT

Fired when the object is initialised.