#include "ui_main.h"
#include "ui_font.h"
#include "ui_render.h"
#include "../cl_video.h"
#include "../renderer/r_draw.h"
#include "../renderer/r_misc.h"
Go to the source code of this file.
Functions | |
void | UI_DrawFill (int x, int y, int w, int h, const vec4_t color) |
Fills a box of pixels with a single color. | |
void | UI_Transform (const vec3_t transform, const vec3_t rotate, const vec3_t scale) |
struct image_s * | UI_LoadImage (const char *name) |
Searches for an image in the image array. | |
void | UI_DrawNormImage (float x, float y, float w, float h, float sh, float th, float sl, float tl, const image_t *image) |
const image_t * | UI_DrawNormImageByName (float x, float y, float w, float h, float sh, float th, float sl, float tl, const char *name) |
Draws an image or parts of it. | |
void | UI_DrawPanel (const vec2_t pos, const vec2_t size, const char *texture, int texX, int texY, const int panelDef[6]) |
draw a panel from a texture as we can see on the image | |
int | UI_DrawStringInBox (const char *fontID, align_t align, int x, int y, int width, int height, const char *text, longlines_t method) |
draw a line into a bounding box | |
int | UI_DrawString (const char *fontID, align_t align, int x, int y, int absX, int maxWidth, int lineHeight, const char *c, int boxHeight, int scrollPos, int *curLine, qboolean increaseLine, longlines_t method) |
Definition in file ui_render.c.
void UI_DrawFill | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h, | |||
const vec4_t | color | |||
) |
Fills a box of pixels with a single color.
Definition at line 35 of file ui_render.c.
References R_DrawFill().
Referenced by UI_BarNodeDraw(), UI_BaseLayoutNodeDraw(), UI_DrawDisabled(), UI_DrawFree(), UI_DrawNode(), UI_DrawNotice(), UI_DrawTooltip(), UI_EditorNodeHighlightNode(), UI_OptionListNodeDraw(), UI_OptionTreeNodeDraw(), UI_RadarNodeDraw(), UI_RowsNodeDraw(), UI_SelectBoxNodeDrawOverWindow(), UI_TodoNodeDraw(), and UI_WindowNodeDraw().
void UI_DrawNormImage | ( | float | x, | |
float | y, | |||
float | w, | |||
float | h, | |||
float | sh, | |||
float | th, | |||
float | sl, | |||
float | tl, | |||
const image_t * | image | |||
) |
Definition at line 82 of file ui_render.c.
References image_s::height, R_DrawImageArray(), viddef_t::rx, viddef_t::ry, viddef, and image_s::width.
Referenced by UI_DrawNormImageByName(), UI_DrawPanel(), UI_EKGNodeDraw(), UI_ImageNodeDraw(), UI_MaterialEditorNodeDraw(), UI_SelectBoxNodeDraw(), UI_SelectBoxNodeDrawOverWindow(), and UI_VScrollbarNodeDraw().
const image_t* UI_DrawNormImageByName | ( | float | x, | |
float | y, | |||
float | w, | |||
float | h, | |||
float | sh, | |||
float | th, | |||
float | sl, | |||
float | tl, | |||
const char * | name | |||
) |
Draws an image or parts of it.
[in] | x | X position to draw the image to |
[in] | y | Y position to draw the image to |
[in] | w | Width of the image |
[in] | h | Height of the image |
[in] | sh | Right x corner coord of the square to draw |
[in] | th | Lower y corner coord of the square to draw |
[in] | sl | Left x corner coord of the square to draw |
[in] | tl | Upper y corner coord of the square to draw |
[in] | name | The name of the image - relative to base/pics |
Definition at line 156 of file ui_render.c.
References Com_Printf(), UI_DrawNormImage(), and UI_LoadImage().
Referenced by UI_BaseMapNodeDraw(), UI_CheckBoxNodeDraw(), UI_CustomButtonNodeDraw(), UI_DrawIconInBox(), UI_DrawItem(), UI_RadarNodeDraw(), UI_RadioButtonNodeDraw(), UI_SpinnerNodeDraw(), UI_TabNodeDrawJunction(), UI_TabNodeDrawPlain(), and UI_TBarNodeDraw().
void UI_DrawPanel | ( | const vec2_t | pos, | |
const vec2_t | size, | |||
const char * | texture, | |||
int | texX, | |||
int | texY, | |||
const int | panelDef[6] | |||
) |
draw a panel from a texture as we can see on the image
[in] | pos | Position of the output panel |
[in] | size | Size of the output panel |
[in] | texture | Texture contain the template of the panel |
[in] | texX | Position x of the panel template into the texture |
[in] | texY | Position y of the panel template into the texture |
[in] | panelDef | Array of seven elements define the panel template used in the texture. From the first to the last: left width, mid width, right width, top height, mid height, bottom height, and margin |
Definition at line 183 of file ui_render.c.
References UI_DrawNormImage(), and UI_LoadImage().
Referenced by UI_ButtonNodeDraw(), UI_KeyBindingNodeDraw(), UI_OptionListNodeDraw(), UI_OptionTreeNodeDraw(), UI_PanelNodeDraw(), UI_TextEntryNodeDraw(), and UI_WindowNodeDraw().
int UI_DrawString | ( | const char * | fontID, | |
align_t | align, | |||
int | x, | |||
int | y, | |||
int | absX, | |||
int | maxWidth, | |||
int | lineHeight, | |||
const char * | c, | |||
int | boxHeight, | |||
int | scrollPos, | |||
int * | curLine, | |||
qboolean | increaseLine, | |||
longlines_t | method | |||
) |
Definition at line 264 of file ui_render.c.
References Com_Error(), ERR_FATAL, uiFont_s::name, R_FontDrawString(), UI_FontGetHeight(), and UI_GetFontByID().
Referenced by HUD_DrawMouseCursorText(), MAP_DrawMapMarkers(), MAP_DrawMapOneBase(), MAP_DrawMapOneInstallation(), MAP_DrawMapOneMission(), SCR_DrawDownloading(), SCR_DrawLoading(), SCR_DrawPrecacheScreen(), SCR_DrawString(), SEQ_Render2D(), UI_BaseInventoryNodeDrawItems(), UI_BaseMapNodeDraw(), UI_DrawFree(), UI_DrawNotice(), UI_DrawStringInBox(), UI_DrawTooltip(), UI_MessageDraw(), UI_OptionListNodeDraw(), UI_OptionTreeNodeDraw(), UI_SelectBoxNodeDraw(), UI_SelectBoxNodeDrawOverWindow(), UI_StringNodeDraw(), UI_TabNodeDraw(), and UI_TextNodeDrawText().
int UI_DrawStringInBox | ( | const char * | fontID, | |
align_t | align, | |||
int | x, | |||
int | y, | |||
int | width, | |||
int | height, | |||
const char * | text, | |||
longlines_t | method | |||
) |
draw a line into a bounding box
[in] | fontID | the font id (defined in ufos/fonts.ufo) |
[in] | align | Align of the text into the bounding box |
[in] | x | Current x position of the bounded box |
[in] | y | Current y position of the bounded box |
[in] | width | Current width of the bounded box |
[in] | text | The string to draw |
[in] | method | Truncation method
|
remove the use of UI_DrawString
test the code for multiline?
fix problem with truncation (maybe problem into UI_DrawString)
Definition at line 252 of file ui_render.c.
References qfalse, and UI_DrawString().
Referenced by UI_ButtonNodeDraw(), UI_CustomButtonNodeDraw(), UI_KeyBindingNodeDraw(), UI_RadarNodeDraw(), UI_StringNodeDraw(), UI_TextEntryNodeDraw(), UI_TextLineNodeDrawText(), and UI_WindowNodeDraw().
struct image_s* UI_LoadImage | ( | const char * | name | ) | [read] |
Searches for an image in the image array.
[in] | name | The name of the image relative to pics/ |
Definition at line 74 of file ui_render.c.
References it_pic, R_FindImage(), r_noTexture, and va().
Referenced by UI_AutoGenerateIcon(), UI_DrawNormImageByName(), UI_DrawPanel(), UI_EKGNodeDraw(), UI_ImageNodeDraw(), UI_ImageNodeLoaded(), UI_RadarNodeDrawActor(), UI_RadarNodeDrawItem(), UI_SelectBoxNodeDraw(), UI_SelectBoxNodeDrawOverWindow(), and UI_VScrollbarNodeDraw().
Pushes a new matrix, normalize to current resolution and move, rotate and scale the matrix to the given values.
transform
is NULL
transform | Translation (if NULL the matrix is removed from stack) | |
rotate | Rotation | |
scale | Scale |
Definition at line 51 of file ui_render.c.
References pos, R_PopMatrix(), R_PushMatrix(), R_Transform(), viddef_t::rx, viddef_t::ry, VectorCopy, and viddef.
Referenced by SEQ_Render2D(), and UI_LineChartNodeDraw().