25 #include "../cl_shared.h"
26 #include "../input/cl_keys.h"
42 const char* font =
"f_small";
43 int height = 0, width = 0;
76 const char*
key =
nullptr;
77 const char* tooltip =
nullptr;
78 static const int maxWidth = 200;
87 if (tooltip && tooltip[0] ==
'\0')
89 if (key && key[0] ==
'\0')
96 string =
va(
"%s\n%s", tooltip, buf);
100 string =
va(
_(
"Key: %s"), key);
bool Q_strnull(const char *string)
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
bool Com_sprintf(char *dest, size_t size, const char *fmt,...)
copies formatted string with buffer-size checking
void R_Color(const vec4_t rgba)
Change the color to given value.
void R_FontTextSize(const char *fontId, const char *text, int maxWidth, longlines_t method, int *width, int *height, int *lines, bool *isTruncated)
Supply information about the size of the text when it is linewrapped and rendered, without actually rendering it. Any of the output parameters may be nullptr.
const char * UI_GetReferenceString(const uiNode_t *const node, const char *ref)
Atomic structure used to define most of the UI.
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, bool increaseLine, longlines_t method)
void UI_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
const char * Key_KeynumToString(int keynum)
Convert a given keynum to string.
struct uiKeyBinding_s * key