Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
20 #include "client/input.h"
21 #include "../client.h"
22 #include "common/prompt.h"
57 Com_EPrintf(
"UI_PushMenu: MAX_MENU_DEPTH exceeded\n");
68 if (menu->
push && !menu->
push(menu)) {
148 Com_Error(ERR_FATAL,
"UI_PopMenu: depth < 1");
195 if (!strcmp(menu->
name, name)) {
237 Com_Error(ERR_FATAL,
"UI_OpenMenu: bad menu");
260 va_start(argptr, extrasize);
262 if ((p = va_arg(argptr,
char *)) == NULL) {
266 total += lengths[i] = strlen(p) + 1;
270 buffer =
UI_Malloc(extrasize + total + 1);
271 p = buffer + extrasize;
272 for (j = 0; j < i; j++) {
273 memcpy(p, strings[j], lengths[j]);
285 for (i = 0; i < n && *s; i++) {
316 if ((flags & UI_CENTER) == UI_CENTER) {
317 x -= strlen(
string) * CHAR_WIDTH / 2;
318 }
else if (flags & UI_RIGHT) {
319 x -= strlen(
string) * CHAR_WIDTH;
332 rc->height = CHAR_HEIGHT;
333 rc->width = CHAR_WIDTH * strlen(
string);
335 if ((flags & UI_CENTER) == UI_CENTER) {
336 rc->x -= rc->width / 2;
337 }
else if (flags & UI_RIGHT) {
345 R_DrawFill8(rc->x + rc->width - border, rc->y, border, rc->height,
c);
346 R_DrawFill8(rc->x + border, rc->y, rc->width - border * 2, border,
c);
347 R_DrawFill8(rc->x + border, rc->y + rc->height - border, rc->width - border * 2, border,
c);
351 void UI_DrawRect32(
const vrect_t *rc,
int border, uint32_t
color)
356 R_DrawFill32(rc->x + border, rc->y + rc->height - border, rc->width - border * 2, border,
color);
456 if (
r_config.flags & QVF_FULLSCREEN) {
512 if (key == K_MOUSE1) {
569 Com_Printf(
"Usage: %s <menu>\n",
Cmd_Argv(0));
577 Com_Printf(
"No such menu: %s\n", s);
589 static const cmdreg_t
c_ui[] = {
629 char buffer[MAX_QPATH];
644 Q_snprintf(buffer,
sizeof(buffer),
"m_cursor%d", i);
664 Com_DPrintf(
"Registered %d menus.\n", List_Count(&
ui_menus));
689 memset(&
uis, 0,
sizeof(
uis));
static void ui_scale_changed(cvar_t *self)
menuCommon_t * mouseTracker
void UI_MouseEvent(int x, int y)
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
void Key_SetDest(keydest_t dest)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
void Z_LeakTest(memtag_t tag)
void(* R_ClearColor)(void)
void UI_DrawChar(int x, int y, int flags, int ch)
static void UI_FreeMenus(void)
void(* R_DrawFill8)(int x, int y, int w, int h, int c)
float R_ClampScale(cvar_t *var)
static void UI_PopMenu_f(void)
void CL_WriteConfig(void)
char * UI_GetColumn(char *s, int n)
void M_Menu_PlayerConfig(void)
void * UI_FormatColumns(int extrasize,...)
void Cmd_Deregister(const cmdreg_t *reg)
static void UI_PushMenu_c(genctx_t *ctx, int argnum)
qboolean Prompt_AddMatch(genctx_t *ctx, const char *s)
qhandle_t bitmapCursors[NUM_CURSOR_FRAMES]
qboolean UI_DoHitTest(void)
qboolean UI_IsTransparent(void)
static void UI_Menu_g(genctx_t *ctx)
void Com_Error(error_type_t type, const char *fmt,...)
menuFrameWork_t * layers[MAX_MENU_DEPTH]
void UI_StartSound(menuSound_t sound)
char * va(const char *format,...)
void UI_StringDimensions(vrect_t *rc, int flags, const char *string)
void(* R_DrawPic)(int x, int y, qhandle_t pic)
void Cmd_Register(const cmdreg_t *reg)
void UI_DrawString(int x, int y, int flags, const char *string)
void M_Menu_Servers(void)
int(* R_DrawString)(int x, int y, int flags, size_t maxChars, const char *string, qhandle_t font)
menuFrameWork_t * activeMenu
void Con_Close(qboolean force)
void UI_DrawRect8(const vrect_t *rc, int border, int c)
void UI_CharEvent(int key)
void(* R_DrawFill32)(int x, int y, int w, int h, uint32_t color)
void UI_Draw(int realtime)
void UI_OpenMenu(uiMenu_t type)
void UI_ModeChanged(void)
void UI_ForceMenuOff(void)
void S_StartLocalSound(const char *sound)
struct uiStatic_s::@9 color
qboolean R_GetPicSize(int *w, int *h, qhandle_t pic)
keydest_t Key_GetDest(void)
static void UI_Resize(void)
menuFrameWork_t * UI_FindMenu(const char *name)
void(* R_SetScale)(float scale)
qboolean UI_CursorInRect(vrect_t *rect)
#define UI_IsItemSelectable(item)
#define NUM_CURSOR_FRAMES
void(* R_DrawChar)(int x, int y, int flags, int ch, qhandle_t font)
static void UI_PushMenu_f(void)
void PlayerModel_Free(void)
void UI_KeyEvent(int key, qboolean down)
void UI_PushMenu(menuFrameWork_t *menu)
static const cmdreg_t c_ui[]