|
| void | vguiFont (void) |
| |
| nonvirtual vguiFont | LoadFontFromFile (string) |
| |
| nonvirtual void | DrawText (vector vecOrigin, string strText) |
| | Draw text on the screen at the desired position with a desired font. More...
|
| |
| nonvirtual void | DrawText_A (vector vecOrigin, string strText, float a) |
| | Draw alpha-blended text on the screen at the desired position with a desired font. More...
|
| |
| nonvirtual void | DrawText_RGB (vector vecOrigin, string strText, vector col) |
| | Draw tinted text on the screen at the desired position with a desired font. More...
|
| |
| nonvirtual void | DrawText_RGBA (vector vecOrigin, string strText, vector col, float a) |
| | Draw tinted and alpha blended text on the screen at the desired position with a desired font. More...
|
| |
| nonvirtual void | DrawRText (vector vecOrigin, string strText) |
| | Right-aligned variant of DrawText. More...
|
| |
| nonvirtual void | DrawRText_A (vector vecOrigin, string strText, float a) |
| | Right-aligned variant of DrawText_A. More...
|
| |
| nonvirtual void | DrawRText_RGB (vector vecOrigin, string strText, vector col) |
| | Right-aligned variant of DrawText_RGB. More...
|
| |
| nonvirtual void | DrawRText_RGBA (vector vecOrigin, string strText, vector col, float a) |
| | Right-aligned variant of DrawText_RGBA. More...
|
| |
| nonvirtual void | DrawField (vector vecOrigin, vector vecSize, string strText, alignflags_t iAlignFlags) |
| | Draws a textfield with line wrapping. More...
|
| |
| nonvirtual void | DrawFieldAtHeight (vector vecOrigin, vector vecSize, int iTextHeight, string strText, alignflags_t iAlignFlags) |
| | Draws a textfield with line wrapping at a custom text height. More...
|
| |
| nonvirtual string | RGBtoHex (vector vecColor) |
| | Converts a normalized RGB color vector to a hex color string. More...
|
| |
| nonvirtual int | GetHeight () |
| | Returns the height of a specified font in pixels. More...
|
| |
| nonvirtual float | StringWidth (string strText, bool hasColor) |
| | Returns the width of a series of characters in pixels. More...
|
| |
| nonvirtual float | GetID () |
| | Get the internal font id. More...
|
| |
| nonvirtual void | DrawTextScroll (vector vecOrigin, string strText, vector canvasSize) |
| |
| nonvirtual void | DrawTextScroll_A (vector vecOrigin, string strText, vector canvasSize, float a) |
| |
| nonvirtual void | DrawTextScroll_RGB (vector vecOrigin, string strText, vector canvasSize, vector rgb) |
| |
| nonvirtual void | DrawTextScroll_RGBA (vector vecOrigin, string strText, vector canvasSize, vector rgb, float a) |
| |
| float vguiFont::GetID |
( |
void |
| ) |
|
Get the internal font id.
The internal font id is only useful for when you want to assign 'drawfont' yourself, or have some other use for it. Those id's are meant to be unique, but may change between vid_reload or other cases where video memory is de-allocated. Overall you should never need to use this, unless you know what you're doing or are porting old code.
- Parameters
-
| fnt | is the font to be queried. |
- Returns
- the internal 'drawfont' id of the specified font.
| float vguiFont::StringWidth |
( |
string |
strText, |
|
|
bool |
hasColor |
|
) |
| |
Returns the width of a series of characters in pixels.
If you have a string with funstring color codes (e.g. ^1 or ^xF00) and want to make sure those are not interpreted as visible characters, set the parameter hasColor to true. Rendering may be more expensive this way, but you should generally cache the result instead of querying it every frame anyway.
The return value is of type float, to be a drop-in replacement for the engine builtin stringwidth().
- Parameters
-
| strText | is the text to get the length of. |
| hasColor | hints if funstring color codes are present in the string. |
| fnt | is the font used with the text in question. |