Wiki

Clone wiki

Mono:UI / Scripts / m_draw_text

INTRODUCED: v0.1.0
LAST UPDATED: v0.1.1

m_draw_text

Draws a string inside a bounding box in a location provided by the font align arguments.

Usage

m_draw_text( 0, 0, 100, 100, "Hello World!", fa_center, fa_middle );

// Result: "Hello World!" drawn centred at x:50, y:50.

Parameters

Type Name Default Description
Real x1 The left bound to draw the label inside of.
Real y1 The top bound to draw the label inside of.
Real x2 The right bound to draw the label inside of.
Real y2 The bottom bound to draw the label inside of.
String string The text to draw.
FA halign How to horizontally align the text.
FA valign How to vertically align the text.

See Also

Updated