Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Functions

Functions

U32 dglDrawText (GFont *font, const Point2I &ptDraw, const UTF16 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 
U32 dglDrawText (GFont *font, const Point2I &ptDraw, const UTF8 *in_string, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawText. More...
 
U32 dglDrawTextN (GFont *font, const Point2I &ptDraw, const UTF16 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 
U32 dglDrawTextN (GFont *font, const Point2I &ptDraw, const UTF8 *in_string, U32 n, const ColorI *colorTable=NULL, const U32 maxColorIndex=9, F32 rot=0.f)
 Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawTextN. More...
 

Detailed Description

These functions draw a string on the string with a given font

Function Documentation

U32 dglDrawText ( GFont font,
const Point2I ptDraw,
const UTF16 *  in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Draws text at a location in 2d gui coordinates Also supports color tags to modulate the given text

Returns
the number of x-pixels traversed
Parameters
fontfont to draw with, usually found in the profile
ptDrawpoint where to start drawing text
in_stringstring to be drawn
colorTablelookups for the color tags
maxColorIndexsize of the colorTable
rotrotation of text
U32 dglDrawText ( GFont font,
const Point2I ptDraw,
const UTF8 *  in_string,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawText.

U32 dglDrawTextN ( GFont font,
const Point2I ptDraw,
const UTF16 *  in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Draws "n" number of characters from the string, in_string

Returns
the number of x-pixels traversed
See Also
dglDrawText
U32 dglDrawTextN ( GFont font,
const Point2I ptDraw,
const UTF8 *  in_string,
U32  n,
const ColorI colorTable = NULL,
const U32  maxColorIndex = 9,
F32  rot = 0.f 
)

Converts UTF8 text to UTF16, and calls the UTF16 version of dglDrawTextN.