font.render: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 18: Line 18:
|return1 = void
|return1 = void
|returnFail1 = void
|returnFail1 = void
|notes = You can use different colours using [[Format_Tags]]
}}
}}

Revision as of 03:42, 25 March 2021

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.
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.
bool shadow optional false Whether to draw a shadow for the text.

Return

void

On failure: void