![]() |
Nuclide
Software Development Kit for id Technology (BETA)
|
Draw library.
Public Member Functions | |
| void | Rect (vector rectPos, vector rectSize, vector rectRGB, float rectAlpha) |
| Displays a solid colored rectangle at the specified position with a specified size. | |
| void | RectOutline (vector rectPos, vector rectSize, float outlineThickness, vector rectColor, float rectAlpha) |
| Displays a colored rectangle outline at the specified position with a specified size. | |
| void | RoundedRectOutline (vector rectPos, vector rectSize, vector rectColor, float rectAlpha) |
| Displays a colored, rounded rectangle outline at the specified position with a specified size. | |
| void | RoundedBox (vector boxPos, vector boxSize, vector boxColor, float boxAlpha) |
| Displays a colored rounded box at the specified position with a specified size. | |
| void | Line (float lineThickness, vector startPos, vector endPos, vector lineColor, float lineAlpha) |
| Displays a line with a specified thickness and color. | |
| void | Pic (vector imagePos, string imageName, vector imageSize, vector imageColor, float imageAlpha, float imageFlags) |
| Draws an image from either the virtual file-system, or the materials. | |
| void | SubPic (vector imagePos, vector displaySize, string imageName, vector sourcePos, vector sourceSize, vector imageColor, float imageAlpha, float imageFlags) |
| Draws part of an image from either the virtual file-system, or the materials. | |
| void | Text (vector vecOrigin, string strText, font_s fnt) |
| Draw text on the screen at the desired position with a desired font. | |
| void | Text_A (vector vecOrigin, string strText, float a, font_s fnt) |
| Draw alpha-blended text on the screen at the desired position with a desired font. | |
| void | Text_RGB (vector vecOrigin, string strText, vector col, font_s fnt) |
| Draw tinted text on the screen at the desired position with a desired font. | |
| void | Text_RGBA (vector vecOrigin, string strText, vector col, float a, font_s fnt) |
| Draw tinted and alpha blended text on the screen at the desired position with a desired font. | |
| void | RText (vector vecOrigin, string strText, font_s fnt) |
| Right-aligned variant of Text(). | |
| void | RText_A (vector vecOrigin, string strText, float a, font_s fnt) |
| Right-aligned variant of Text_A(). | |
| void | RText_RGB (vector vecOrigin, string strText, vector col, font_s fnt) |
| Right-aligned variant of Text_RGB(). | |
| void | RText_RGBA (vector vecOrigin, string strText, vector col, float a, font_s fnt) |
| Right-aligned variant of Text_RGBA(). | |
| void | TextField (vector vecOrigin, vector vecSize, string strText, font_s fnt, alignflags_t iAlignFlags) |
| Draws a textfield with line wrapping. | |
| void | TextFieldAtHeight (vector vecOrigin, vector vecSize, int iTextHeight, string strText, font_s fnt, alignflags_t iAlignFlags) |
| Draws a textfield with line wrapping at a custom text height. | |
| void | RadarRect (vector vecOrigin, vector vecSize) |
| Draws an opaque, rectangular radar that is centered around the current player, or the player that is being spectated. | |
| void drawAPI_t::Line | ( | float | lineThickness, |
| vector | startPos, | ||
| vector | endPos, | ||
| vector | lineColor, | ||
| float | lineAlpha ) |
Displays a line with a specified thickness and color.
| lineThickness | is the thickness of the line in pixels. |
| startPos | is the 'starting' point of the line. |
| endPos | is the second, 'endpoint' of the line. |
| lineColor | is the color of the line, in normalized RGB values. E.g. [0.0f, 1.0f, 0.0f] for green. |
| lineAlpha | is the alpha channel of the rectangle. 0.0 is invisible, 1.0 is fully visible. |
| void drawAPI_t::Pic | ( | vector | imagePos, |
| string | imageName, | ||
| vector | imageSize, | ||
| vector | imageColor, | ||
| float | imageAlpha, | ||
| float | imageFlags ) |
Draws an image from either the virtual file-system, or the materials.
| imagePosis | the position at which the pic will be drawn. |
| imageName | is the path/name of the image. Can be a material as well. E.g. "gfx/foo.png" or "conback". |
| imageSize | is the size at which we draw the pic, in pixels. |
| imageColor | is the color/tint of the pic, in normalized RGB values. E.g. [0.5f, 0.5f, 0.5f] for gray/grey. |
| imageAlpha | is the alpha channel of the rectangle. 0.0 is invisible, 1.0 is fully visible. |
| void drawAPI_t::RadarRect | ( | vector | vecOrigin, |
| vector | vecSize ) |
Draws an opaque, rectangular radar that is centered around the current player, or the player that is being spectated.
| void drawAPI_t::Rect | ( | vector | rectPos, |
| vector | rectSize, | ||
| vector | rectRGB, | ||
| float | rectAlpha ) |
Displays a solid colored rectangle at the specified position with a specified size.
| rectPos | is the position at which the rectangle will be drawn. |
| rectSize | is the size at which we draw the rectangle, in pixels. |
| rectRGB | is the color of the rectangle, in normalized RGB values. E.g. [1.0f, 0.0f, 0.0f] for red. |
| rectAlpha | is the alpha channel of the rectangle. 0.0 is invisible, 1.0 is fully visible. |
| void drawAPI_t::RectOutline | ( | vector | rectPos, |
| vector | rectSize, | ||
| float | outlineThickness, | ||
| vector | rectColor, | ||
| float | rectAlpha ) |
Displays a colored rectangle outline at the specified position with a specified size.
| rectPos | is the position at which the rectangle will be drawn. |
| rectSize | is the size at which we draw the rectangle, in pixels. |
| outlineThickness | is the thickness of the outline. In pixels. |
| rectRGB | is the color of the rectangle, in normalized RGB values. E.g. [0.0f, 0.0f, 1.0f] for blue. |
| rectAlpha | is the alpha channel of the rectangle. 0.0 is invisible, 1.0 is fully visible. |
| void drawAPI_t::RoundedBox | ( | vector | boxPos, |
| vector | boxSize, | ||
| vector | boxColor, | ||
| float | boxAlpha ) |
Displays a colored rounded box at the specified position with a specified size.
| boxPos | is the position at which the box will be drawn. |
| boxSize | is the size at which we draw the box, in pixels. |
| boxColor | is the color of the box, in normalized RGB values. E.g. [1.0f, 1.0f, 0.0f] for yellow. |
| boxAlpha | is the alpha channel of the box. 0.0 is invisible, 1.0 is fully visible. |
| void drawAPI_t::RoundedRectOutline | ( | vector | rectPos, |
| vector | rectSize, | ||
| vector | rectColor, | ||
| float | rectAlpha ) |
Displays a colored, rounded rectangle outline at the specified position with a specified size.
| rectPos | is the position at which the rounded rectangle will be drawn. |
| rectSize | is the size at which we draw the rounded rectangle, in pixels. |
| rectRGB | is the color of the rounded rectangle, in normalized RGB values. E.g. [0.0f, 0.0f, 1.0f] for blue. |
| rectAlpha | is the alpha channel of the rounded rectangle. 0.0 is invisible, 1.0 is fully visible. |
| void drawAPI_t::RText | ( | vector | vecOrigin, |
| string | strText, | ||
| font_s | fnt ) |
| void drawAPI_t::RText_A | ( | vector | vecOrigin, |
| string | strText, | ||
| float | a, | ||
| font_s | fnt ) |
Right-aligned variant of Text_A().
| void drawAPI_t::RText_RGB | ( | vector | vecOrigin, |
| string | strText, | ||
| vector | col, | ||
| font_s | fnt ) |
Right-aligned variant of Text_RGB().
| void drawAPI_t::RText_RGBA | ( | vector | vecOrigin, |
| string | strText, | ||
| vector | col, | ||
| float | a, | ||
| font_s | fnt ) |
Right-aligned variant of Text_RGBA().
| void drawAPI_t::SubPic | ( | vector | imagePos, |
| vector | displaySize, | ||
| string | imageName, | ||
| vector | sourcePos, | ||
| vector | sourceSize, | ||
| vector | imageColor, | ||
| float | imageAlpha, | ||
| float | imageFlags ) |
Draws part of an image from either the virtual file-system, or the materials.
| imagePosis | the position at which the pic will be drawn. |
| imageName | is the path/name of the image. Can be a material as well. E.g. "gfx/foo.png" or "conback". |
| displaySize | is the size at which we draw the pic, in pixels. |
| sourcePos | is the position at which we start cropping from (top-left corner), in normalized values |
| sourceSize | is the normalized |
| imageColor | is the color/tint of the pic, in normalized RGB values. E.g. [0.5f, 0.5f, 0.5f] for gray/grey. |
| imageAlpha | is the alpha channel of the rectangle. 0.0 is invisible, 1.0 is fully visible. |
| void drawAPI_t::Text | ( | vector | vecOrigin, |
| string | strText, | ||
| font_s | fnt ) |
Draw text on the screen at the desired position with a desired font.
| vecOrigin | is the absolute starting position. |
| strText | is the text to be drawn. |
| fnt | is the font to be used. |
| void drawAPI_t::Text_A | ( | vector | vecOrigin, |
| string | strText, | ||
| float | a, | ||
| font_s | fnt ) |
Draw alpha-blended text on the screen at the desired position with a desired font.
| vecOrigin | is the absolute starting position. |
| strText | is the text to be drawn. |
| a | is the alpha value to blend with. |
| fnt | is the font to be used. |
| void drawAPI_t::Text_RGB | ( | vector | vecOrigin, |
| string | strText, | ||
| vector | col, | ||
| font_s | fnt ) |
Draw tinted text on the screen at the desired position with a desired font.
| vecOrigin | is the absolute starting position. |
| strText | is the text to be drawn. |
| col | is the normalized color value to tint the text with. |
| fnt | is the font to be used. |
| void drawAPI_t::Text_RGBA | ( | vector | vecOrigin, |
| string | strText, | ||
| vector | col, | ||
| float | a, | ||
| font_s | fnt ) |
Draw tinted and alpha blended text on the screen at the desired position with a desired font.
| vecOrigin | is the absolute starting position. |
| strText | is the text to be drawn. |
| col | is the normalized color value to tint the text with. |
| a | is the alpha value to blend with. |
| fnt | is the font to be used. |
| void drawAPI_t::TextField | ( | vector | vecOrigin, |
| vector | vecSize, | ||
| string | strText, | ||
| font_s | fnt, | ||
| alignflags_t | iAlignFlags ) |
Draws a textfield with line wrapping.
| vecOrigin | is the absolute starting position. |
| vecSize | is the total area in pixels that the field takes up on the screen. |
| strText | is the text to be drawn onto the screen. |
| fnt | is the font to be used for rendering the text. |
| iAlignFlags | sets how the text may be aligned. |
| void drawAPI_t::TextFieldAtHeight | ( | vector | vecOrigin, |
| vector | vecSize, | ||
| int | iTextHeight, | ||
| string | strText, | ||
| font_s | fnt, | ||
| alignflags_t | iAlignFlags ) |
Draws a textfield with line wrapping at a custom text height.
| vecOrigin | is the absolute starting position. |
| vecSize | is the total area in pixels that the field takes up on the screen. |
| iTextHeight | is the desired text height in pixels. |
| strText | is the text to be drawn onto the screen. |
| fnt | is the font to be used for rendering the text. |
| iAlignFlags | sets how the text may be aligned. |