font.render

From GTA Connected
Revision as of 16:28, 24 September 2021 by EricPlayZ (talk | contribs) (Fixed the params section; added an example)
Jump to navigation Jump to search

render

Signature: void render(string text, Vec2 position, float width, float align, float justify, float size, int colour, [ bool wordWrap = false, bool colourCodes = true, bool ignoreColourCodes = false, bool shadow = false ])

Usage: draw text on the screen using a font

Parameters

string text The text to draw.
Vec2 position The 2D position for the text.
float width The maximum width of the text, in pixels.
float align The horizontal alignment of the text, as a float.
float justify The justify alignment of the text, as a float.
float size The size of the text, as a float.
int colour The colour of the text, as an integer; visit the colour defines page for info.
bool wordWrap optional false Whether word wrap is enabled.
bool colourCodes optional true Whether colour codes are resolved.
bool ignoreColourCodes optional false Whether colour codes are not resolved.

Return

void

On failure: void