Quake II RTX doxygen
1.0 dev
|
|
#include "shared/shared.h"
#include "shared/list.h"
#include "common/cmd.h"
#include "common/common.h"
#include "common/cvar.h"
#include "common/field.h"
#include "common/zone.h"
#include "client/keys.h"
#include "client/sound/sound.h"
#include "client/client.h"
#include "client/ui.h"
#include "refresh/refresh.h"
Go to the source code of this file.
|
enum | menuType_t {
MTYPE_BAD,
MTYPE_SLIDER,
MTYPE_LIST,
MTYPE_ACTION,
MTYPE_SPINCONTROL,
MTYPE_SEPARATOR,
MTYPE_FIELD,
MTYPE_BITFIELD,
MTYPE_PAIRS,
MTYPE_STRINGS,
MTYPE_VALUES,
MTYPE_TOGGLE,
MTYPE_STATIC,
MTYPE_KEYBIND,
MTYPE_BITMAP,
MTYPE_SAVEGAME,
MTYPE_LOADGAME
} |
|
enum | menuSound_t {
QMS_NOTHANDLED,
QMS_SILENT,
QMS_IN,
QMS_MOVE,
QMS_OUT,
QMS_BEEP
} |
|
|
void | PlayerModel_Load (void) |
|
void | PlayerModel_Free (void) |
|
void | UI_PushMenu (menuFrameWork_t *menu) |
|
void | UI_ForceMenuOff (void) |
|
void | UI_PopMenu (void) |
|
void | UI_StartSound (menuSound_t sound) |
|
qboolean | UI_DoHitTest (void) |
|
qboolean | UI_CursorInRect (vrect_t *rect) |
|
void * | UI_FormatColumns (int extrasize,...) q_sentinel |
|
char * | UI_GetColumn (char *s, int n) |
|
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_DrawRect8 (const vrect_t *rect, int border, int c) |
|
void | UI_StringDimensions (vrect_t *rc, int flags, const char *string) |
|
void | UI_LoadScript (void) |
|
menuFrameWork_t * | UI_FindMenu (const char *name) |
|
void | Menu_Init (menuFrameWork_t *menu) |
|
void | Menu_Size (menuFrameWork_t *menu) |
|
void | Menu_Draw (menuFrameWork_t *menu) |
|
void | Menu_AddItem (menuFrameWork_t *menu, void *item) |
|
menuSound_t | Menu_SelectItem (menuFrameWork_t *menu) |
|
menuSound_t | Menu_SlideItem (menuFrameWork_t *menu, int dir) |
|
menuSound_t | Menu_KeyEvent (menuCommon_t *item, int key) |
|
menuSound_t | Menu_CharEvent (menuCommon_t *item, int key) |
|
menuSound_t | Menu_MouseMove (menuCommon_t *item) |
|
menuSound_t | Menu_Keydown (menuFrameWork_t *menu, int key) |
|
void | Menu_SetFocus (menuCommon_t *item) |
|
menuSound_t | Menu_AdjustCursor (menuFrameWork_t *menu, int dir) |
|
menuCommon_t * | Menu_ItemAtCursor (menuFrameWork_t *menu) |
|
menuCommon_t * | Menu_HitTest (menuFrameWork_t *menu) |
|
void | MenuList_Init (menuList_t *l) |
|
void | MenuList_SetValue (menuList_t *l, int value) |
|
void | MenuList_Sort (menuList_t *l, int offset, int(*cmpfunc)(const void *, const void *)) |
|
void | SpinControl_Init (menuSpinControl_t *s) |
|
qboolean | Menu_Push (menuFrameWork_t *menu) |
|
void | Menu_Pop (menuFrameWork_t *menu) |
|
void | Menu_Free (menuFrameWork_t *menu) |
|
void | M_Menu_PlayerConfig (void) |
|
void | M_Menu_Demos (void) |
|
void | M_Menu_Servers (void) |
|
◆ CURSOR_OFFSET
Definition at line 285 of file ui.h.
◆ CURSOR_WIDTH
Definition at line 284 of file ui.h.
◆ DOUBLE_CLICK_DELAY
#define DOUBLE_CLICK_DELAY 300 |
Definition at line 83 of file ui.h.
◆ GENERIC_SPACING
#define GENERIC_SPACING |
( |
|
x | ) |
((x) + (x) / 4) |
Definition at line 79 of file ui.h.
◆ LCOLUMN_OFFSET
Definition at line 77 of file ui.h.
◆ MAX_COLUMNS
Definition at line 185 of file ui.h.
◆ MAX_MENU_DEPTH
Definition at line 281 of file ui.h.
◆ MAX_PLAYERMODELS
#define MAX_PLAYERMODELS 1024 |
Definition at line 270 of file ui.h.
◆ MAXMENUITEMS
Definition at line 37 of file ui.h.
◆ MENU_SPACING
Definition at line 81 of file ui.h.
◆ MLF_COLOR
#define MLF_COLOR 0x00000004 |
Definition at line 195 of file ui.h.
◆ MLF_HEADER
#define MLF_HEADER 0x00000001 |
Definition at line 193 of file ui.h.
◆ MLF_SCROLLBAR
#define MLF_SCROLLBAR 0x00000002 |
Definition at line 194 of file ui.h.
◆ MLIST_BORDER_WIDTH
#define MLIST_BORDER_WIDTH 1 |
Definition at line 188 of file ui.h.
◆ MLIST_PADDING
Definition at line 191 of file ui.h.
◆ MLIST_PRESTEP
Definition at line 190 of file ui.h.
◆ MLIST_SCROLLBAR_WIDTH
Definition at line 189 of file ui.h.
◆ MLIST_SPACING
Definition at line 187 of file ui.h.
◆ NUM_CURSOR_FRAMES
#define NUM_CURSOR_FRAMES 15 |
Definition at line 287 of file ui.h.
◆ QMF_CUSTOM_COLOR
#define QMF_CUSTOM_COLOR 0x00000040 |
Definition at line 65 of file ui.h.
◆ QMF_DISABLED
#define QMF_DISABLED 0x00000020 |
Definition at line 64 of file ui.h.
◆ QMF_GRAYED
#define QMF_GRAYED 0x00000002 |
Definition at line 60 of file ui.h.
◆ QMF_HASFOCUS
#define QMF_HASFOCUS 0x00000008 |
Definition at line 62 of file ui.h.
◆ QMF_HIDDEN
#define QMF_HIDDEN 0x00000010 |
Definition at line 63 of file ui.h.
◆ QMF_LEFT_JUSTIFY
#define QMF_LEFT_JUSTIFY 0x00000001 |
Definition at line 59 of file ui.h.
◆ QMF_NUMBERSONLY
#define QMF_NUMBERSONLY 0x00000004 |
Definition at line 61 of file ui.h.
◆ RCOLUMN_OFFSET
#define RCOLUMN_OFFSET (CHAR_WIDTH * 2) |
Definition at line 76 of file ui.h.
◆ SLIDER_RANGE
Definition at line 170 of file ui.h.
◆ UI_CopyString
Definition at line 35 of file ui.h.
◆ UI_IsItemSelectable
#define UI_IsItemSelectable |
( |
|
item | ) |
|
Value:
Definition at line 85 of file ui.h.
◆ UI_Malloc
Definition at line 33 of file ui.h.
◆ UI_Mallocz
Definition at line 34 of file ui.h.
◆ confirmAction_t
typedef void(* confirmAction_t) (qboolean) |
Definition at line 90 of file ui.h.
◆ menuAction_t
◆ menuBitmap_t
◆ menuCommon_t
◆ menuCondition_t
◆ menuField_t
◆ menuFrameWork_t
◆ menuKeybind_t
◆ menuList_t
◆ menuListColumn_t
◆ menuSeparator_t
◆ menuSlider_t
◆ menuSpinControl_t
◆ menuStatic_t
◆ playerModelInfo_t
◆ uiStatic_t
◆ menuSound_t
Enumerator |
---|
QMS_NOTHANDLED | |
QMS_SILENT | |
QMS_IN | |
QMS_MOVE | |
QMS_OUT | |
QMS_BEEP | |
Definition at line 67 of file ui.h.
◆ menuType_t
Enumerator |
---|
MTYPE_BAD | |
MTYPE_SLIDER | |
MTYPE_LIST | |
MTYPE_ACTION | |
MTYPE_SPINCONTROL | |
MTYPE_SEPARATOR | |
MTYPE_FIELD | |
MTYPE_BITFIELD | |
MTYPE_PAIRS | |
MTYPE_STRINGS | |
MTYPE_VALUES | |
MTYPE_TOGGLE | |
MTYPE_STATIC | |
MTYPE_KEYBIND | |
MTYPE_BITMAP | |
MTYPE_SAVEGAME | |
MTYPE_LOADGAME | |
Definition at line 39 of file ui.h.
◆ M_Menu_Demos()
◆ M_Menu_PlayerConfig()
Definition at line 322 of file playerconfig.c.
324 static const vec3_t
origin = { 40.0f, 0.0f, 0.0f };
325 static const vec3_t angles = { 0.0f, 260.0f, 0.0f };
Referenced by UI_Init().
◆ M_Menu_Servers()
◆ Menu_AddItem()
Definition at line 1785 of file menu.c.
1788 Com_Error(ERR_FATAL,
"Menu_AddItem: too many items");
Referenced by M_Menu_Demos(), M_Menu_PlayerConfig(), M_Menu_Servers(), Parse_Action(), Parse_Bind(), Parse_Bitmap(), Parse_Blank(), Parse_Field(), Parse_Pairs(), Parse_Range(), Parse_Savegame(), Parse_Spin(), and Parse_Toggle().
◆ Menu_AdjustCursor()
Definition at line 2101 of file menu.c.
2108 for (i = 0; i <
m->nitems; i++) {
2124 if (cursor >=
m->nitems)
2130 }
while (cursor != pos);
2135 cursor =
m->nitems - 1;
2140 }
while (cursor != pos);
Referenced by Menu_DefaultKey().
◆ Menu_CharEvent()
◆ Menu_Draw()
◆ Menu_Free()
◆ Menu_HitTest()
◆ Menu_Init()
Definition at line 1817 of file menu.c.
1827 for (i = 0; i < menu->
nitems; i++) {
1828 item = menu->
items[i];
1831 if (condition->
cvar)
1833 qboolean equals = condition->
cvar->integer == condition->
value;
1834 if (equals == condition->
equals)
1846 for (i = 0; i < menu->
nitems; i++) {
1847 item = menu->
items[i];
1886 Com_Error(ERR_FATAL,
"Menu_Init: unknown item type");
1892 if (!focus && menu->
nitems) {
1893 for (i = 0; i < menu->
nitems; i++) {
1894 item = menu->
items[i];
1908 for (i = 0; i < menu->
nitems; i++) {
1909 item = menu->
items[i];
1922 if (menu->
mins[0] < 0) menu->
mins[0] = 0;
1923 if (menu->
mins[1] < 0) menu->
mins[1] = 0;
Referenced by UI_PushMenu(), and UI_Resize().
◆ Menu_ItemAtCursor()
◆ Menu_Keydown()
◆ Menu_KeyEvent()
◆ Menu_MouseMove()
◆ Menu_Pop()
◆ Menu_Push()
◆ Menu_SelectItem()
◆ Menu_SetFocus()
◆ Menu_Size()
Definition at line 1928 of file menu.c.
1935 for (i = 0, h = 0; i < menu->
nitems; i++) {
1936 item = menu->
items[i];
1942 if (widest < item->
width) {
1943 widest = item->
width;
1997 h += menu->
logo_rc.height + 5;
2011 for (i = 0; i < menu->
nitems; i++) {
2012 item = menu->
items[i];
Referenced by Menu_Init().
◆ Menu_SlideItem()
◆ MenuList_Init()
◆ MenuList_SetValue()
◆ MenuList_Sort()
◆ PlayerModel_Free()
◆ PlayerModel_Load()
Definition at line 67 of file playermodels.c.
69 char scratch[MAX_QPATH];
82 if (!(list = (
char **)
FS_ListFiles(NULL,
"players/*/tris.md2", FS_SEARCH_BYFILTER | FS_SEARCH_SAVEPATH, &numFiles))) {
86 for (i = 0; i < numFiles; i++) {
87 len =
Q_strlcpy(scratch, list[i],
sizeof(scratch));
88 if (len >=
sizeof(scratch))
92 if (!(s = strchr(scratch,
'/')))
96 if (!(p = strchr(s,
'/')))
100 for (j = 0; j < ndirs; j++) {
101 if (!strcmp(dirnames[j], s)) {
123 for (i = 0; i < ndirs; i++) {
131 Q_concat(scratch,
sizeof(scratch),
"players/", dirnames[i],
"/tris.md2", NULL);
132 if (!FS_FileExists(scratch)) {
137 Q_concat(scratch,
sizeof(scratch),
"players/", dirnames[i], NULL);
138 pcxnames = (
char **)
FS_ListFiles(scratch,
".pcx", 0, &npcxfiles);
144 for (k = 0; k < npcxfiles; k++) {
145 if (!strstr(pcxnames[k],
"_i.pcx")) {
157 skinnames =
UI_Malloc(
sizeof(
char *) * (nskins + 1));
158 skinnames[nskins] = NULL;
161 for (s = 0, k = 0; k < npcxfiles; k++) {
162 if (!strstr(pcxnames[k],
"_i.pcx")) {
Referenced by Push().
◆ SpinControl_Init()
Definition at line 543 of file menu.c.
546 int maxLength, length;
562 if (maxLength < length) {
570 maxLength * CHAR_WIDTH;
Referenced by Change(), and Menu_Init().
◆ UI_CursorInRect()
qboolean UI_CursorInRect |
( |
vrect_t * |
rect | ) |
|
◆ UI_DoHitTest()
qboolean UI_DoHitTest |
( |
void |
| ) |
|
◆ UI_DrawChar()
◆ UI_DrawRect8()
void UI_DrawRect8 |
( |
const vrect_t * |
rect, |
|
|
int |
border, |
|
|
int |
c |
|
) |
| |
Definition at line 342 of file ui.c.
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);
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.
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;
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()
◆ UI_ForceMenuOff()
◆ UI_FormatColumns()
void* UI_FormatColumns |
( |
int |
extrasize, |
|
|
|
... |
|
) |
| |
◆ UI_GetColumn()
char* UI_GetColumn |
( |
char * |
s, |
|
|
int |
n |
|
) |
| |
◆ UI_LoadScript()
◆ UI_PopMenu()
◆ UI_PushMenu()
◆ UI_StartSound()
◆ UI_StringDimensions()
void UI_StringDimensions |
( |
vrect_t * |
rc, |
|
|
int |
flags, |
|
|
const char * |
string |
|
) |
| |
◆ ui_debug
◆ ui_menus
◆ uis
Definition at line 24 of file ui.c.
static void ui_sortservers_changed(cvar_t *self)
static const char * viewmodes[]
static cvar_t * ui_listalldemos
menuCommon_t * mouseTracker
static void Size(menuFrameWork_t *self)
static int pmicmpfnc(const void *_a, const void *_b)
static void Free(menuFrameWork_t *self)
void Key_SetDest(keydest_t dest)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
static void Free(menuFrameWork_t *self)
static menuSound_t Activate(menuCommon_t *self)
static void Pop(menuFrameWork_t *self)
void FS_FreeList(void **list)
static void Expose(menuFrameWork_t *self)
static void ui_colorservers_changed(cvar_t *self)
static cvar_t * ui_colorservers
static qboolean IconOfSkinExists(char *skin, char **pcxfiles, int npcxfiles)
static qboolean Push(menuFrameWork_t *self)
void(* R_DrawFill8)(int x, int y, int w, int h, int c)
void CL_WriteConfig(void)
static void ui_sortdemos_changed(cvar_t *self)
static void Expose(menuFrameWork_t *self)
static menuSound_t Keydown(menuFrameWork_t *self, int key)
#define GENERIC_SPACING(x)
static void Draw(menuFrameWork_t *self)
qboolean UI_DoHitTest(void)
static m_player_t m_player
#define MLIST_SCROLLBAR_WIDTH
static dlight_t dlights[]
static void Draw(menuFrameWork_t *self)
static void Pop(menuFrameWork_t *self)
void Com_Error(error_type_t type, const char *fmt,...)
static void Size(menuFrameWork_t *self)
menuFrameWork_t * layers[MAX_MENU_DEPTH]
void UI_StringDimensions(vrect_t *rc, int flags, const char *string)
static menuSound_t Sort(menuList_t *self)
void(* R_DrawPic)(int x, int y, qhandle_t pic)
static void Draw(menuFrameWork_t *self)
static menuSound_t Change(menuCommon_t *self)
void UI_DrawString(int x, int y, int flags, const char *string)
void ** FS_ListFiles(const char *path, const char *filter, unsigned flags, int *count_p)
int(* R_DrawString)(int x, int y, int flags, size_t maxChars, const char *string, qhandle_t font)
menuFrameWork_t * activeMenu
static void Pop(menuFrameWork_t *self)
size_t Q_strlcpy(char *dst, const char *src, size_t size)
static menuSound_t Keydown(menuFrameWork_t *self, int key)
void Con_Close(qboolean force)
void UI_DrawRect8(const vrect_t *rc, int border, int c)
void(* R_DrawFill32)(int x, int y, int w, int h, uint32_t color)
static void Free(menuFrameWork_t *self)
void UI_ForceMenuOff(void)
static menuSound_t Change(menuCommon_t *self)
static const char * handedness[]
static qboolean Push(menuFrameWork_t *self)
void S_StartLocalSound(const char *sound)
static m_servers_t m_servers
playerModelInfo_t pmi[MAX_PLAYERMODELS]
struct uiStatic_s::@9 color
void COM_StripExtension(const char *in, char *out, size_t size)
void * names[MAX_STATUS_SERVERS]
static void Size(menuFrameWork_t *self)
keydest_t Key_GetDest(void)
static cvar_t * ui_sortservers
static cvar_t * ui_pingrate
void(* R_DrawStretchPic)(int x, int y, int w, int h, qhandle_t pic)
qhandle_t backgroundHandle
static qboolean Parse_File(const char *path, int depth)
static menuSound_t Change(menuCommon_t *self)
qboolean UI_CursorInRect(vrect_t *rect)
#define UI_IsItemSelectable(item)
void(* R_DrawChar)(int x, int y, int flags, int ch, qhandle_t font)
size_t Q_concat(char *dest, size_t size,...)
static menuSound_t Sort(menuList_t *self)
static menuSound_t Connect(menuCommon_t *self)
static cvar_t * ui_sortdemos