Quake II RTX doxygen  1.0 dev
ui.c File Reference
#include "ui.h"
#include "client/input.h"
#include "../client.h"
#include "common/prompt.h"

Go to the source code of this file.

Functions

 LIST_DECL (ui_menus)
 
void UI_PushMenu (menuFrameWork_t *menu)
 
static void UI_Resize (void)
 
void UI_ForceMenuOff (void)
 
void UI_PopMenu (void)
 
qboolean UI_IsTransparent (void)
 
menuFrameWork_tUI_FindMenu (const char *name)
 
void UI_OpenMenu (uiMenu_t type)
 
voidUI_FormatColumns (int extrasize,...)
 
char * UI_GetColumn (char *s, int n)
 
qboolean UI_CursorInRect (vrect_t *rect)
 
void UI_DrawString (int x, int y, int flags, const char *string)
 
void UI_DrawChar (int x, int y, int flags, int ch)
 
void UI_StringDimensions (vrect_t *rc, int flags, const char *string)
 
void UI_DrawRect8 (const vrect_t *rc, int border, int c)
 
qboolean UI_DoHitTest (void)
 
void UI_MouseEvent (int x, int y)
 
void UI_Draw (int realtime)
 
void UI_StartSound (menuSound_t sound)
 
void UI_KeyEvent (int key, qboolean down)
 
void UI_CharEvent (int key)
 
static void UI_Menu_g (genctx_t *ctx)
 
static void UI_PushMenu_c (genctx_t *ctx, int argnum)
 
static void UI_PushMenu_f (void)
 
static void UI_PopMenu_f (void)
 
static void ui_scale_changed (cvar_t *self)
 
void UI_ModeChanged (void)
 
static void UI_FreeMenus (void)
 
void UI_Init (void)
 
void UI_Shutdown (void)
 

Variables

uiStatic_t uis
 
cvar_t * ui_debug
 
static cvar_t * ui_open
 
static cvar_t * ui_scale
 
static const cmdreg_t c_ui []
 

Function Documentation

◆ LIST_DECL()

LIST_DECL ( ui_menus  )

◆ UI_CharEvent()

void UI_CharEvent ( int  key)

Definition at line 528 of file ui.c.

529 {
530  menuCommon_t *item;
531  menuSound_t sound;
532 
533  if (!uis.activeMenu) {
534  return;
535  }
536 
537  if ((item = Menu_ItemAtCursor(uis.activeMenu)) == NULL ||
538  (sound = Menu_CharEvent(item, key)) == QMS_NOTHANDLED) {
539  return;
540  }
541 
542  UI_StartSound(sound);
543 }

Referenced by Key_Event().

◆ UI_CursorInRect()

qboolean UI_CursorInRect ( vrect_t *  rect)

Definition at line 297 of file ui.c.

298 {
299  if (uis.mouseCoords[0] < rect->x) {
300  return qfalse;
301  }
302  if (uis.mouseCoords[0] >= rect->x + rect->width) {
303  return qfalse;
304  }
305  if (uis.mouseCoords[1] < rect->y) {
306  return qfalse;
307  }
308  if (uis.mouseCoords[1] >= rect->y + rect->height) {
309  return qfalse;
310  }
311  return qtrue;
312 }

Referenced by Menu_HitTest(), MenuList_Click(), and Slider_Click().

◆ UI_DoHitTest()

qboolean UI_DoHitTest ( void  )

Definition at line 368 of file ui.c.

369 {
370  menuCommon_t *item;
371 
372  if (!uis.activeMenu) {
373  return qfalse;
374  }
375 
376  if (uis.mouseTracker) {
377  item = uis.mouseTracker;
378  } else {
379  if (!(item = Menu_HitTest(uis.activeMenu))) {
380  return qfalse;
381  }
382  }
383 
384  if (!UI_IsItemSelectable(item)) {
385  return qfalse;
386  }
387 
388  Menu_MouseMove(item);
389 
390  if (item->flags & QMF_HASFOCUS) {
391  return qfalse;
392  }
393 
394  Menu_SetFocus(item);
395 
396  return qtrue;
397 }

Referenced by UI_MouseEvent(), UI_PopMenu(), and UI_PushMenu().

◆ UI_Draw()

void UI_Draw ( int  realtime)

Definition at line 420 of file ui.c.

421 {
422  int i;
423 
424  uis.realtime = realtime;
425 
426  if (!(Key_GetDest() & KEY_MENU)) {
427  return;
428  }
429 
430  if (!uis.activeMenu) {
431  return;
432  }
433 
434  R_ClearColor();
436 
437  if (1) {
438  // draw top menu
439  if (uis.activeMenu->draw) {
441  } else {
443  }
444  } else {
445  // draw all layers
446  for (i = 0; i < uis.menuDepth; i++) {
447  if (uis.layers[i]->draw) {
448  uis.layers[i]->draw(uis.layers[i]);
449  } else {
450  Menu_Draw(uis.layers[i]);
451  }
452  }
453  }
454 
455  // draw custom cursor in fullscreen mode
456  if (r_config.flags & QVF_FULLSCREEN) {
459  }
460 
461  if (ui_debug->integer) {
462  UI_DrawString(uis.width - 4, 4, UI_RIGHT,
463  va("%3i %3i", uis.mouseCoords[0], uis.mouseCoords[1]));
464  }
465 
466  // delay playing the enter sound until after the
467  // menu has been drawn, to avoid delay while
468  // caching images
469  if (uis.entersound) {
470  uis.entersound = qfalse;
471  S_StartLocalSound("misc/menu1.wav");
472  }
473 
474  R_ClearColor();
475  R_SetScale(1.0f);
476 }

Referenced by SCR_UpdateScreen().

◆ UI_DrawChar()

void UI_DrawChar ( int  x,
int  y,
int  flags,
int  ch 
)

Definition at line 325 of file ui.c.

326 {
327  R_DrawChar(x, y, flags, ch, uis.fontHandle);
328 }

Referenced by Action_Draw(), Keybind_Draw(), Slider_Draw(), and SpinControl_Draw().

◆ UI_DrawRect8()

void UI_DrawRect8 ( const vrect_t *  rc,
int  border,
int  c 
)

Definition at line 342 of file ui.c.

343 {
344  R_DrawFill8(rc->x, rc->y, border, rc->height, c); // left
345  R_DrawFill8(rc->x + rc->width - border, rc->y, border, rc->height, c); // right
346  R_DrawFill8(rc->x + border, rc->y, rc->width - border * 2, border, c); // top
347  R_DrawFill8(rc->x + border, rc->y + rc->height - border, rc->width - border * 2, border, c); // bottom
348 }

Referenced by Menu_Draw().

◆ UI_DrawString()

void UI_DrawString ( int  x,
int  y,
int  flags,
const char *  string 
)

Definition at line 314 of file ui.c.

315 {
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;
320  }
321 
322  R_DrawString(x, y, flags, MAX_STRING_CHARS, string, uis.fontHandle);
323 }

Referenced by Action_Draw(), Draw(), DrawStatus(), Field_Draw(), Keybind_Draw(), Menu_Draw(), MenuList_DrawString(), Separator_Draw(), Slider_Draw(), SpinControl_Draw(), Static_Draw(), and UI_Draw().

◆ UI_FindMenu()

menuFrameWork_t* UI_FindMenu ( const char *  name)

Definition at line 190 of file ui.c.

191 {
192  menuFrameWork_t *menu;
193 
194  LIST_FOR_EACH(menuFrameWork_t, menu, &ui_menus, entry) {
195  if (!strcmp(menu->name, name)) {
196  return menu;
197  }
198  }
199 
200  return NULL;
201 }

Referenced by Parse_File(), UI_OpenMenu(), and UI_PushMenu_f().

◆ UI_ForceMenuOff()

void UI_ForceMenuOff ( void  )

Definition at line 119 of file ui.c.

120 {
121  menuFrameWork_t *menu;
122  int i;
123 
124  for (i = 0; i < uis.menuDepth; i++) {
125  menu = uis.layers[i];
126  if (menu->pop) {
127  menu->pop(menu);
128  }
129  }
130 
131  Key_SetDest(Key_GetDest() & ~KEY_MENU);
132  uis.menuDepth = 0;
133  uis.activeMenu = NULL;
134  uis.mouseTracker = NULL;
135  uis.transparent = qfalse;
136 }

Referenced by UI_OpenMenu(), UI_PopMenu(), and UI_Shutdown().

◆ UI_FormatColumns()

void* UI_FormatColumns ( int  extrasize,
  ... 
)

Definition at line 251 of file ui.c.

252 {
253  va_list argptr;
254  char *buffer, *p;
255  int i, j;
256  size_t total = 0;
257  char *strings[MAX_COLUMNS];
258  size_t lengths[MAX_COLUMNS];
259 
260  va_start(argptr, extrasize);
261  for (i = 0; i < MAX_COLUMNS; i++) {
262  if ((p = va_arg(argptr, char *)) == NULL) {
263  break;
264  }
265  strings[i] = p;
266  total += lengths[i] = strlen(p) + 1;
267  }
268  va_end(argptr);
269 
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]);
274  p += lengths[j];
275  }
276  *p = 0;
277 
278  return buffer;
279 }

Referenced by AddServer(), BuildDir(), BuildName(), PingSelected(), UI_ErrorEvent(), and UI_StatusEvent().

◆ UI_FreeMenus()

static void UI_FreeMenus ( void  )
static

Definition at line 609 of file ui.c.

610 {
611  menuFrameWork_t *menu, *next;
612 
613  LIST_FOR_EACH_SAFE(menuFrameWork_t, menu, next, &ui_menus, entry) {
614  if (menu->free) {
615  menu->free(menu);
616  }
617  }
618  List_Init(&ui_menus);
619 }

Referenced by UI_Shutdown().

◆ UI_GetColumn()

char* UI_GetColumn ( char *  s,
int  n 
)

Definition at line 281 of file ui.c.

282 {
283  int i;
284 
285  for (i = 0; i < n && *s; i++) {
286  s += strlen(s) + 1;
287  }
288 
289  return s;
290 }

Referenced by MenuList_Key(), namecmp(), pingcmp(), and WriteCache().

◆ UI_Init()

void UI_Init ( void  )

Definition at line 627 of file ui.c.

628 {
629  char buffer[MAX_QPATH];
630  int i;
631 
633 
634  ui_debug = Cvar_Get("ui_debug", "0", 0);
635  ui_open = Cvar_Get("ui_open", "1", 0);
636 
637  UI_ModeChanged();
638 
639  uis.fontHandle = R_RegisterFont("conchars");
640  uis.cursorHandle = R_RegisterPic("ch1");
642 
643  for (i = 0; i < NUM_CURSOR_FRAMES; i++) {
644  Q_snprintf(buffer, sizeof(buffer), "m_cursor%d", i);
645  uis.bitmapCursors[i] = R_RegisterPic(buffer);
646  }
647 
648  uis.color.background.u32 = MakeColor(0, 0, 0, 255);
649  uis.color.normal.u32 = MakeColor(15, 128, 235, 100);
650  uis.color.active.u32 = MakeColor(15, 128, 235, 100);
651  uis.color.selection.u32 = MakeColor(15, 128, 235, 100);
652  uis.color.disabled.u32 = MakeColor(127, 127, 127, 255);
653 
654  strcpy(uis.weaponModel, "w_railgun.md2");
655 
656  // load custom menus
657  UI_LoadScript();
658 
659  // load built-in menus
661  M_Menu_Servers();
662  M_Menu_Demos();
663 
664  Com_DPrintf("Registered %d menus.\n", List_Count(&ui_menus));
665 
666  uis.initialized = qtrue;
667 }

Referenced by CL_InitRefresh(), CL_RestartFilesystem(), and CL_RestartRefresh().

◆ UI_IsTransparent()

qboolean UI_IsTransparent ( void  )

Definition at line 177 of file ui.c.

178 {
179  if (!(Key_GetDest() & KEY_MENU)) {
180  return qtrue;
181  }
182 
183  if (!uis.activeMenu) {
184  return qtrue;
185  }
186 
187  return uis.activeMenu->transparent;
188 }

Referenced by SCR_DrawActive().

◆ UI_KeyEvent()

void UI_KeyEvent ( int  key,
qboolean  down 
)

Definition at line 503 of file ui.c.

504 {
505  menuSound_t sound;
506 
507  if (!uis.activeMenu) {
508  return;
509  }
510 
511  if (!down) {
512  if (key == K_MOUSE1) {
513  uis.mouseTracker = NULL;
514  }
515  return;
516  }
517 
518  sound = Menu_Keydown(uis.activeMenu, key);
519 
520  UI_StartSound(sound);
521 }

Referenced by Key_Event().

◆ UI_Menu_g()

static void UI_Menu_g ( genctx_t *  ctx)
static

Definition at line 545 of file ui.c.

546 {
547  menuFrameWork_t *menu;
548 
549  LIST_FOR_EACH(menuFrameWork_t, menu, &ui_menus, entry) {
550  if (!Prompt_AddMatch(ctx, menu->name)) {
551  break;
552  }
553  }
554 }

Referenced by UI_PushMenu_c().

◆ UI_ModeChanged()

void UI_ModeChanged ( void  )

Definition at line 602 of file ui.c.

603 {
604  ui_scale = Cvar_Get("ui_scale", "2", 0);
605  ui_scale->changed = ui_scale_changed;
606  UI_Resize();
607 }

Referenced by SCR_ModeChanged(), and UI_Init().

◆ UI_MouseEvent()

void UI_MouseEvent ( int  x,
int  y 
)

Definition at line 404 of file ui.c.

405 {
406  clamp(x, 0, r_config.width - 1);
407  clamp(y, 0, r_config.height - 1);
408 
409  uis.mouseCoords[0] = Q_rint(x * uis.scale);
410  uis.mouseCoords[1] = Q_rint(y * uis.scale);
411 
412  UI_DoHitTest();
413 }

Referenced by Win_MainWndProc().

◆ UI_OpenMenu()

void UI_OpenMenu ( uiMenu_t  type)

Definition at line 208 of file ui.c.

209 {
210  menuFrameWork_t *menu = NULL;
211 
212  if (!uis.initialized) {
213  return;
214  }
215 
216  // close any existing menus
217  UI_ForceMenuOff();
218 
219  switch (type) {
220  case UIMENU_DEFAULT:
221  if (ui_open->integer) {
222  menu = UI_FindMenu("main");
223  }
224  break;
225  case UIMENU_MAIN:
226  menu = UI_FindMenu("main");
227  break;
228  case UIMENU_GAME:
229  menu = UI_FindMenu("game");
230  if (!menu) {
231  menu = UI_FindMenu("main");
232  }
233  break;
234  case UIMENU_NONE:
235  break;
236  default:
237  Com_Error(ERR_FATAL, "UI_OpenMenu: bad menu");
238  break;
239  }
240 
241  UI_PushMenu(menu);
242 }

Referenced by CL_CheckForResend(), CL_Disconnect(), CL_Init(), CL_RestartFilesystem(), CL_RestartRefresh(), and Key_Event().

◆ UI_PopMenu()

void UI_PopMenu ( void  )

Definition at line 143 of file ui.c.

144 {
145  menuFrameWork_t *menu;
146 
147  if (uis.menuDepth < 1)
148  Com_Error(ERR_FATAL, "UI_PopMenu: depth < 1");
149 
150  menu = uis.layers[--uis.menuDepth];
151  if (menu->pop) {
152  menu->pop(menu);
153  }
154 
155  if (!uis.menuDepth) {
156  UI_ForceMenuOff();
157 
158  // Save the config file if the user closes the menu while in-game
159  if (cls.state >= ca_active) {
160  CL_WriteConfig();
161  }
162 
163  return;
164  }
165 
167  uis.mouseTracker = NULL;
168 
169  UI_DoHitTest();
170 }

Referenced by Menu_DefaultKey(), UI_PopMenu_f(), and UI_PushMenu().

◆ UI_PopMenu_f()

static void UI_PopMenu_f ( void  )
static

Definition at line 581 of file ui.c.

582 {
583  if (uis.activeMenu) {
584  UI_PopMenu();
585  }
586 }

◆ UI_PushMenu()

void UI_PushMenu ( menuFrameWork_t menu)

Definition at line 39 of file ui.c.

40 {
41  int i, j;
42 
43  if (!menu) {
44  return;
45  }
46 
47  // if this menu is already present, drop back to that level
48  // to avoid stacking menus by hotkeys
49  for (i = 0; i < uis.menuDepth; i++) {
50  if (uis.layers[i] == menu) {
51  break;
52  }
53  }
54 
55  if (i == uis.menuDepth) {
56  if (uis.menuDepth >= MAX_MENU_DEPTH) {
57  Com_EPrintf("UI_PushMenu: MAX_MENU_DEPTH exceeded\n");
58  return;
59  }
60  uis.layers[uis.menuDepth++] = menu;
61  } else {
62  for (j = i; j < uis.menuDepth; j++) {
63  UI_PopMenu();
64  }
65  uis.menuDepth = i + 1;
66  }
67 
68  if (menu->push && !menu->push(menu)) {
69  uis.menuDepth--;
70  return;
71  }
72 
73  Menu_Init(menu);
74 
75  Key_SetDest((Key_GetDest() & ~KEY_CONSOLE) | KEY_MENU);
76 
77  Con_Close(qtrue);
78 
79  if (!uis.activeMenu) {
80  // opening menu moves cursor to the nice location
81  IN_WarpMouse(menu->mins[0] / uis.scale, menu->mins[1] / uis.scale);
82 
83  uis.mouseCoords[0] = menu->mins[0];
84  uis.mouseCoords[1] = menu->mins[1];
85 
86  uis.entersound = qtrue;
87  }
88 
89  uis.activeMenu = menu;
90 
91  UI_DoHitTest();
92 
93  if (menu->expose) {
94  menu->expose(menu);
95  }
96 }

Referenced by UI_OpenMenu(), and UI_PushMenu_f().

◆ UI_PushMenu_c()

static void UI_PushMenu_c ( genctx_t *  ctx,
int  argnum 
)
static

Definition at line 556 of file ui.c.

557 {
558  if (argnum == 1) {
559  UI_Menu_g(ctx);
560  }
561 }

◆ UI_PushMenu_f()

static void UI_PushMenu_f ( void  )
static

Definition at line 563 of file ui.c.

564 {
565  menuFrameWork_t *menu;
566  char *s;
567 
568  if (Cmd_Argc() < 2) {
569  Com_Printf("Usage: %s <menu>\n", Cmd_Argv(0));
570  return;
571  }
572  s = Cmd_Argv(1);
573  menu = UI_FindMenu(s);
574  if (menu) {
575  UI_PushMenu(menu);
576  } else {
577  Com_Printf("No such menu: %s\n", s);
578  }
579 }

◆ UI_Resize()

static void UI_Resize ( void  )
static

Definition at line 98 of file ui.c.

99 {
100  int i;
101 
103  uis.width = r_config.width * uis.scale;
104  uis.height = r_config.height * uis.scale;
105 
106  for (i = 0; i < uis.menuDepth; i++) {
107  Menu_Init(uis.layers[i]);
108  }
109 
110  //CL_WarpMouse(0, 0);
111 }

Referenced by UI_ModeChanged(), and ui_scale_changed().

◆ ui_scale_changed()

static void ui_scale_changed ( cvar_t *  self)
static

Definition at line 597 of file ui.c.

598 {
599  UI_Resize();
600 }

Referenced by UI_ModeChanged().

◆ UI_Shutdown()

void UI_Shutdown ( void  )

Definition at line 674 of file ui.c.

675 {
676  if (!uis.initialized) {
677  return;
678  }
679  UI_ForceMenuOff();
680 
681  ui_scale->changed = NULL;
682 
684 
685  UI_FreeMenus();
686 
688 
689  memset(&uis, 0, sizeof(uis));
690 
691  Z_LeakTest(TAG_UI);
692 }

Referenced by CL_RestartFilesystem(), CL_RestartRefresh(), and CL_ShutdownRefresh().

◆ UI_StartSound()

void UI_StartSound ( menuSound_t  sound)

Definition at line 478 of file ui.c.

479 {
480  switch (sound) {
481  case QMS_IN:
482  S_StartLocalSound("misc/menu1.wav");
483  break;
484  case QMS_MOVE:
485  S_StartLocalSound("misc/menu2.wav");
486  break;
487  case QMS_OUT:
488  S_StartLocalSound("misc/menu3.wav");
489  break;
490  case QMS_BEEP:
491  S_StartLocalSound("misc/talk1.wav");
492  break;
493  default:
494  break;
495  }
496 }

Referenced by keybind_cb(), UI_CharEvent(), and UI_KeyEvent().

◆ UI_StringDimensions()

void UI_StringDimensions ( vrect_t *  rc,
int  flags,
const char *  string 
)

Definition at line 330 of file ui.c.

331 {
332  rc->height = CHAR_HEIGHT;
333  rc->width = CHAR_WIDTH * strlen(string);
334 
335  if ((flags & UI_CENTER) == UI_CENTER) {
336  rc->x -= rc->width / 2;
337  } else if (flags & UI_RIGHT) {
338  rc->x -= rc->width;
339  }
340 }

Referenced by Action_Init(), Field_Init(), Keybind_Init(), Savegame_Push(), SpinControl_Init(), and Static_Init().

Variable Documentation

◆ c_ui

const cmdreg_t c_ui[]
static
Initial value:
= {
{ "forcemenuoff", UI_ForceMenuOff },
{ "pushmenu", UI_PushMenu_f, UI_PushMenu_c },
{ "popmenu", UI_PopMenu_f },
{ NULL, NULL }
}

Definition at line 589 of file ui.c.

Referenced by UI_Init(), and UI_Shutdown().

◆ ui_debug

cvar_t* ui_debug

Definition at line 28 of file ui.c.

Referenced by Menu_Draw(), UI_Draw(), and UI_Init().

◆ ui_open

cvar_t* ui_open
static

Definition at line 29 of file ui.c.

Referenced by UI_Init(), and UI_OpenMenu().

◆ ui_scale

cvar_t* ui_scale
static

Definition at line 30 of file ui.c.

Referenced by UI_ModeChanged(), UI_Resize(), and UI_Shutdown().

◆ uis

menuCommon_s
Definition: ui.h:140
uiStatic_s::transparent
qboolean transparent
Definition: ui.h:301
ui_scale_changed
static void ui_scale_changed(cvar_t *self)
Definition: ui.c:597
uiStatic_s::fontHandle
qhandle_t fontHandle
Definition: ui.h:307
QMS_NOTHANDLED
@ QMS_NOTHANDLED
Definition: ui.h:68
menuFrameWork_s::mins
int mins[2]
Definition: ui.h:114
uiStatic_s::mouseTracker
menuCommon_t * mouseTracker
Definition: ui.h:297
menuFrameWork_s::name
char * name
Definition: ui.h:101
Q_snprintf
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
Definition: shared.c:846
ui_open
static cvar_t * ui_open
Definition: ui.c:29
Key_SetDest
void Key_SetDest(keydest_t dest)
Definition: keys.c:178
Cvar_Get
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
Definition: cvar.c:257
Z_LeakTest
void Z_LeakTest(memtag_t tag)
Definition: zone.c:120
R_ClearColor
void(* R_ClearColor)(void)
Definition: refresh.c:410
menuFrameWork_s::free
void(* free)(struct menuFrameWork_s *)
Definition: ui.h:136
menuFrameWork_s::push
qboolean(* push)(struct menuFrameWork_s *)
Definition: ui.h:131
uiStatic_s::height
int height
Definition: ui.h:292
menuFrameWork_s::expose
void(* expose)(struct menuFrameWork_s *)
Definition: ui.h:133
Menu_CharEvent
menuSound_t Menu_CharEvent(menuCommon_t *item, int key)
Definition: menu.c:2376
uiStatic_s::initialized
qboolean initialized
Definition: ui.h:290
ca_active
@ ca_active
Definition: client.h:340
client_static_s::state
connstate_t state
Definition: client.h:375
UI_FreeMenus
static void UI_FreeMenus(void)
Definition: ui.c:609
R_DrawFill8
void(* R_DrawFill8)(int x, int y, int w, int h, int c)
Definition: refresh.c:422
R_ClampScale
float R_ClampScale(cvar_t *var)
Definition: refresh.c:440
UI_PopMenu_f
static void UI_PopMenu_f(void)
Definition: ui.c:581
CL_WriteConfig
void CL_WriteConfig(void)
Definition: main.c:2391
menuFrameWork_s
Definition: ui.h:98
Menu_SetFocus
void Menu_SetFocus(menuCommon_t *focus)
Definition: menu.c:2057
M_Menu_PlayerConfig
void M_Menu_PlayerConfig(void)
Definition: playerconfig.c:322
UI_Malloc
#define UI_Malloc(s)
Definition: ui.h:33
Cmd_Deregister
void Cmd_Deregister(const cmdreg_t *reg)
Definition: cmd.c:1580
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:899
M_Menu_Demos
void M_Menu_Demos(void)
Definition: demos.c:636
UI_PushMenu_c
static void UI_PushMenu_c(genctx_t *ctx, int argnum)
Definition: ui.c:556
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:889
Prompt_AddMatch
qboolean Prompt_AddMatch(genctx_t *ctx, const char *s)
Definition: prompt.c:149
Menu_HitTest
menuCommon_t * Menu_HitTest(menuFrameWork_t *menu)
Definition: menu.c:2480
uiStatic_s::bitmapCursors
qhandle_t bitmapCursors[NUM_CURSOR_FRAMES]
Definition: ui.h:311
UI_PopMenu
void UI_PopMenu(void)
Definition: ui.c:143
UI_DoHitTest
qboolean UI_DoHitTest(void)
Definition: ui.c:368
Menu_Keydown
menuSound_t Menu_Keydown(menuFrameWork_t *menu, int key)
Definition: menu.c:2452
QMS_MOVE
@ QMS_MOVE
Definition: ui.h:71
uis
uiStatic_t uis
Definition: ui.c:24
UI_Menu_g
static void UI_Menu_g(genctx_t *ctx)
Definition: ui.c:545
uiStatic_s::scale
float scale
Definition: ui.h:293
Com_Error
void Com_Error(error_type_t type, const char *fmt,...)
Definition: g_main.c:258
QMF_HASFOCUS
#define QMF_HASFOCUS
Definition: ui.h:62
uiStatic_s::layers
menuFrameWork_t * layers[MAX_MENU_DEPTH]
Definition: ui.h:295
ui_debug
cvar_t * ui_debug
Definition: ui.c:28
UI_StartSound
void UI_StartSound(menuSound_t sound)
Definition: ui.c:478
Menu_Draw
void Menu_Draw(menuFrameWork_t *menu)
Definition: menu.c:2196
va
char * va(const char *format,...)
Definition: shared.c:429
uiStatic_s::entersound
qboolean entersound
Definition: ui.h:299
R_DrawPic
void(* R_DrawPic)(int x, int y, qhandle_t pic)
Definition: refresh.c:419
uiStatic_s::cursorHandle
qhandle_t cursorHandle
Definition: ui.h:308
IN_WarpMouse
void IN_WarpMouse(int x, int y)
Definition: input.c:161
uiStatic_s::weaponModel
char weaponModel[32]
Definition: ui.h:304
Cmd_Register
void Cmd_Register(const cmdreg_t *reg)
Definition: cmd.c:1572
QMS_OUT
@ QMS_OUT
Definition: ui.h:72
UI_DrawString
void UI_DrawString(int x, int y, int flags, const char *string)
Definition: ui.c:314
Menu_MouseMove
menuSound_t Menu_MouseMove(menuCommon_t *item)
Definition: menu.c:2386
M_Menu_Servers
void M_Menu_Servers(void)
Definition: servers.c:1073
R_DrawString
int(* R_DrawString)(int x, int y, int flags, size_t maxChars, const char *string, qhandle_t font)
Definition: refresh.c:417
uiStatic_s::activeMenu
menuFrameWork_t * activeMenu
Definition: ui.h:296
menuSound_t
menuSound_t
Definition: ui.h:67
Con_Close
void Con_Close(qboolean force)
Definition: console.c:124
uiStatic_s::menuDepth
int menuDepth
Definition: ui.h:294
ui_menus
list_t ui_menus
UI_ModeChanged
void UI_ModeChanged(void)
Definition: ui.c:602
UI_ForceMenuOff
void UI_ForceMenuOff(void)
Definition: ui.c:119
QMS_BEEP
@ QMS_BEEP
Definition: ui.h:73
UI_LoadScript
void UI_LoadScript(void)
Definition: script.c:789
uiStatic_s::selection
color_t selection
Definition: ui.h:317
S_StartLocalSound
void S_StartLocalSound(const char *sound)
Definition: main.c:911
cls
client_static_t cls
Definition: main.c:98
c
statCounters_t c
Definition: main.c:30
uiStatic_s::color
struct uiStatic_s::@9 color
menuCommon_s::flags
int flags
Definition: ui.h:152
R_GetPicSize
qboolean R_GetPicSize(int *w, int *h, qhandle_t pic)
Definition: images.c:1289
uiStatic_s::disabled
color_t disabled
Definition: ui.h:318
uiStatic_s::mouseCoords
int mouseCoords[2]
Definition: ui.h:298
Key_GetDest
keydest_t Key_GetDest(void)
Definition: keys.c:168
uiStatic_s::normal
color_t normal
Definition: ui.h:315
UI_Resize
static void UI_Resize(void)
Definition: ui.c:98
MAX_COLUMNS
#define MAX_COLUMNS
Definition: ui.h:185
uiStatic_s::width
int width
Definition: ui.h:292
uiStatic_s::background
color_t background
Definition: ui.h:314
uiStatic_s::active
color_t active
Definition: ui.h:316
uiStatic_s::realtime
int realtime
Definition: ui.h:291
UI_FindMenu
menuFrameWork_t * UI_FindMenu(const char *name)
Definition: ui.c:190
R_SetScale
void(* R_SetScale)(float scale)
Definition: refresh.c:415
QMS_IN
@ QMS_IN
Definition: ui.h:70
UI_IsItemSelectable
#define UI_IsItemSelectable(item)
Definition: ui.h:85
uiStatic_s::cursorWidth
int cursorWidth
Definition: ui.h:309
ui_scale
static cvar_t * ui_scale
Definition: ui.c:30
NUM_CURSOR_FRAMES
#define NUM_CURSOR_FRAMES
Definition: ui.h:287
R_DrawChar
void(* R_DrawChar)(int x, int y, int flags, int ch, qhandle_t font)
Definition: refresh.c:416
UI_PushMenu_f
static void UI_PushMenu_f(void)
Definition: ui.c:563
menuFrameWork_s::draw
void(* draw)(struct menuFrameWork_s *)
Definition: ui.h:134
PlayerModel_Free
void PlayerModel_Free(void)
Definition: playermodels.c:186
Menu_ItemAtCursor
menuCommon_t * Menu_ItemAtCursor(menuFrameWork_t *m)
Definition: menu.c:2042
uiStatic_s::cursorHeight
int cursorHeight
Definition: ui.h:309
menuFrameWork_s::pop
void(* pop)(struct menuFrameWork_s *)
Definition: ui.h:132
menuFrameWork_s::transparent
qboolean transparent
Definition: ui.h:107
r_config
refcfg_t r_config
Definition: refresh.c:401
MAX_MENU_DEPTH
#define MAX_MENU_DEPTH
Definition: ui.h:281
UI_PushMenu
void UI_PushMenu(menuFrameWork_t *menu)
Definition: ui.c:39
c_ui
static const cmdreg_t c_ui[]
Definition: ui.c:589
Menu_Init
void Menu_Init(menuFrameWork_t *menu)
Definition: menu.c:1817