#include "../game/q_shared.h"
#include "../cgame/tr_types.h"
#include "keycodes.h"
#include "../../ui/menudef.h"
Include dependency graph for ui_shared.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Data Structures | |
| struct | cachedAssets_t |
| struct | colorRangeDef_t |
| struct | columnInfo_s |
| struct | commandDef_t |
| struct | displayContextDef_t |
| struct | editFieldDef_s |
| struct | itemDef_s |
| struct | listBoxDef_s |
| struct | menuDef_t |
| struct | modelDef_s |
| struct | multiDef_s |
| struct | rectDef_t |
| struct | scriptDef_t |
| struct | windowDef_t |
Defines | |
| #define | ART_FX_BASE "menu/art/fx_base" |
| #define | ART_FX_BLUE "menu/art/fx_blue" |
| #define | ART_FX_CYAN "menu/art/fx_cyan" |
| #define | ART_FX_GREEN "menu/art/fx_grn" |
| #define | ART_FX_RED "menu/art/fx_red" |
| #define | ART_FX_TEAL "menu/art/fx_teal" |
| #define | ART_FX_WHITE "menu/art/fx_white" |
| #define | ART_FX_YELLOW "menu/art/fx_yel" |
| #define | ASSET_GRADIENTBAR "ui/assets/gradientbar2.tga" |
| #define | ASSET_SCROLL_THUMB "ui/assets/scrollbar_thumb.tga" |
| #define | ASSET_SCROLLBAR "ui/assets/scrollbar.tga" |
| #define | ASSET_SCROLLBAR_ARROWDOWN "ui/assets/scrollbar_arrow_dwn_a.tga" |
| #define | ASSET_SCROLLBAR_ARROWLEFT "ui/assets/scrollbar_arrow_left.tga" |
| #define | ASSET_SCROLLBAR_ARROWRIGHT "ui/assets/scrollbar_arrow_right.tga" |
| #define | ASSET_SCROLLBAR_ARROWUP "ui/assets/scrollbar_arrow_up_a.tga" |
| #define | ASSET_SLIDER_BAR "ui/assets/slider2.tga" |
| #define | ASSET_SLIDER_THUMB "ui/assets/sliderbutt_1.tga" |
| #define | CURSOR_ARROW 0x00000002 |
| #define | CURSOR_NONE 0x00000001 |
| #define | CURSOR_SIZER 0x00000004 |
| #define | CVAR_DISABLE 0x00000002 |
| #define | CVAR_ENABLE 0x00000001 |
| #define | CVAR_HIDE 0x00000008 |
| #define | CVAR_SHOW 0x00000004 |
| #define | MAX_COLOR_RANGES 10 |
| #define | MAX_EDITFIELD 256 |
| #define | MAX_ITEMACTION 64 |
| #define | MAX_ITEMTEXT 64 |
| #define | MAX_LB_COLUMNS 16 |
| #define | MAX_MENUDEFFILE 4096 |
| #define | MAX_MENUFILE 32768 |
| #define | MAX_MENUITEMS 96 |
| #define | MAX_MENUNAME 32 |
| #define | MAX_MENUS 64 |
| #define | MAX_MULTI_CVARS 32 |
| #define | MAX_OPEN_MENUS 16 |
| #define | MAX_SCRIPT_ARGS 12 |
| #define | MAX_STRING_HANDLES 4096 |
| #define | NUM_CROSSHAIRS 10 |
| #define | SCROLLBAR_SIZE 16.0 |
| #define | SLIDER_HEIGHT 16.0 |
| #define | SLIDER_THUMB_HEIGHT 20.0 |
| #define | SLIDER_THUMB_WIDTH 12.0 |
| #define | SLIDER_WIDTH 96.0 |
| #define | STRING_POOL_SIZE 384*1024 |
| #define | WINDOW_AUTOWRAPPED 0x00080000 |
| #define | WINDOW_BACKCOLORSET 0x00400000 |
| #define | WINDOW_DECORATION 0x00000010 |
| #define | WINDOW_FADINGIN 0x00000040 |
| #define | WINDOW_FADINGOUT 0x00000020 |
| #define | WINDOW_FORCED 0x00100000 |
| #define | WINDOW_FORECOLORSET 0x00000200 |
| #define | WINDOW_GREY 0x00000008 |
| #define | WINDOW_HASFOCUS 0x00000002 |
| #define | WINDOW_HORIZONTAL 0x00000400 |
| #define | WINDOW_INTRANSITION 0x00000100 |
| #define | WINDOW_LB_LEFTARROW 0x00000800 |
| #define | WINDOW_LB_PGDN 0x00008000 |
| #define | WINDOW_LB_PGUP 0x00004000 |
| #define | WINDOW_LB_RIGHTARROW 0x00001000 |
| #define | WINDOW_LB_THUMB 0x00002000 |
| #define | WINDOW_MOUSEOVER 0x00000001 |
| #define | WINDOW_MOUSEOVERTEXT 0x00000080 |
| #define | WINDOW_OOB_CLICK 0x00020000 |
| #define | WINDOW_ORBITING 0x00010000 |
| #define | WINDOW_POPUP 0x00200000 |
| #define | WINDOW_TIMEDVISIBLE 0x00800000 |
| #define | WINDOW_VISIBLE 0x00000004 |
| #define | WINDOW_WRAPPED 0x00040000 |
Typedefs | |
| typedef columnInfo_s | columnInfo_t |
| typedef editFieldDef_s | editFieldDef_t |
| typedef itemDef_s | itemDef_t |
| typedef listBoxDef_s | listBoxDef_t |
| typedef modelDef_s | modelDef_t |
| typedef multiDef_s | multiDef_t |
| typedef rectDef_t | Rectangle |
| typedef windowDef_t | Window |
Functions | |
| qboolean | Color_Parse (char **p, vec4_t *c) |
| void | Controls_GetConfig (void) |
| void | Controls_SetConfig (qboolean restart) |
| void | Controls_SetDefaults (void) |
| void | Display_CacheAll () |
| void * | Display_CaptureItem (int x, int y) |
| int | Display_CursorType (int x, int y) |
| void | Display_ExpandMacros (char *buff) |
| displayContextDef_t * | Display_GetContext () |
| void | Display_HandleKey (int key, qboolean down, int x, int y) |
| qboolean | Display_KeyBindPending () |
| qboolean | Display_MouseMove (void *p, int x, int y) |
| qboolean | Float_Parse (char **p, float *f) |
| void | Init_Display (displayContextDef_t *dc) |
| qboolean | Int_Parse (char **p, int *i) |
| void | Item_Init (itemDef_t *item) |
| void | LerpColor (vec4_t a, vec4_t b, vec4_t c, float t) |
| int | Menu_Count () |
| menuDef_t * | Menu_GetFocused () |
| void | Menu_HandleKey (menuDef_t *menu, int key, qboolean down) |
| void | Menu_HandleMouseMove (menuDef_t *menu, float x, float y) |
| void | Menu_Init (menuDef_t *menu) |
| void | Menu_New (int handle) |
| void | Menu_Paint (menuDef_t *menu, qboolean forcePaint) |
| void | Menu_PaintAll () |
| void | Menu_PostParse (menuDef_t *menu) |
| void | Menu_Reset () |
| void | Menu_ScrollFeeder (menuDef_t *menu, int feeder, qboolean down) |
| void | Menu_SetFeederSelection (menuDef_t *menu, int feeder, int index, const char *name) |
| void | Menus_Activate (menuDef_t *menu) |
| menuDef_t * | Menus_ActivateByName (const char *p) |
| qboolean | Menus_AnyFullScreenVisible () |
| void | Menus_CloseAll () |
| void | Menus_CloseByName (const char *p) |
| menuDef_t * | Menus_FindByName (const char *p) |
| void | Menus_OpenByName (const char *p) |
| void | Menus_ShowByName (const char *p) |
| qboolean | PC_Color_Parse (int handle, vec4_t *c) |
| qboolean | PC_Float_Parse (int handle, float *f) |
| qboolean | PC_Int_Parse (int handle, int *i) |
| qboolean | PC_Rect_Parse (int handle, rectDef_t *r) |
| qboolean | PC_Script_Parse (int handle, const char **out) |
| qboolean | PC_String_Parse (int handle, const char **out) |
| qboolean | Rect_Parse (char **p, rectDef_t *r) |
| qboolean | Script_Parse (char **p, const char **out) |
| const char * | String_Alloc (const char *p) |
| void | String_Init () |
| qboolean | String_Parse (char **p, const char **out) |
| void | String_Report () |
| int | trap_PC_AddGlobalDefine (char *define) |
| int | trap_PC_FreeSource (int handle) |
| int | trap_PC_LoadSource (const char *filename) |
| int | trap_PC_ReadToken (int handle, pc_token_t *pc_token) |
| int | trap_PC_SourceFileAndLine (int handle, char *filename, int *line) |
| void * | UI_Alloc (int size) |
| void | UI_InitMemory (void) |
| qboolean | UI_OutOfMemory () |
|
|
Definition at line 83 of file ui_shared.h. |
|
|
Definition at line 84 of file ui_shared.h. |
|
|
Definition at line 85 of file ui_shared.h. |
|
|
Definition at line 86 of file ui_shared.h. |
|
|
Definition at line 87 of file ui_shared.h. |
|
|
Definition at line 88 of file ui_shared.h. |
|
|
Definition at line 89 of file ui_shared.h. |
|
|
Definition at line 90 of file ui_shared.h. |
|
|
Definition at line 92 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 98 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 93 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 94 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 96 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 97 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 95 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 99 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 100 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 70 of file ui_shared.h. |
|
|
Definition at line 69 of file ui_shared.h. |
|
|
Definition at line 71 of file ui_shared.h. |
|
|
Definition at line 217 of file ui_shared.h. |
|
|
Definition at line 216 of file ui_shared.h. Referenced by Item_MouseEnter(), Item_OwnerDraw_Paint(), Item_SetFocus(), Item_TextColor(), and Menu_HandleMouseMove(). |
|
|
Definition at line 219 of file ui_shared.h. |
|
|
Definition at line 218 of file ui_shared.h. Referenced by Item_MouseEnter(), Item_Paint(), Item_SetFocus(), and Menu_HandleMouseMove(). |
|
|
Definition at line 39 of file ui_shared.h. |
|
|
Definition at line 81 of file ui_shared.h. Referenced by Item_TextField_HandleKey(). |
|
|
Definition at line 34 of file ui_shared.h. |
|
|
Definition at line 33 of file ui_shared.h. |
|
|
Definition at line 166 of file ui_shared.h. |
|
|
Definition at line 35 of file ui_shared.h. |
|
|
Definition at line 36 of file ui_shared.h. Referenced by GetMenuBuffer(). |
|
|
Definition at line 38 of file ui_shared.h. |
|
|
Definition at line 32 of file ui_shared.h. |
|
|
Definition at line 37 of file ui_shared.h. |
|
|
Definition at line 198 of file ui_shared.h. |
|
|
Definition at line 40 of file ui_shared.h. Referenced by Menus_ActivateByName(). |
|
|
Definition at line 80 of file ui_shared.h. |
|
|
Definition at line 78 of file ui_shared.h. |
|
|
Definition at line 106 of file ui_shared.h. |
|
|
Definition at line 101 of file ui_shared.h. Referenced by Item_ListBox_Paint(), Item_ListBox_ThumbDrawPosition(), Item_ListBox_ThumbPosition(), and Scroll_ListBox_ThumbFunc(). |
|
|
Definition at line 103 of file ui_shared.h. Referenced by Item_Slider_Paint(). |
|
|
Definition at line 105 of file ui_shared.h. Referenced by Item_Slider_Paint(). |
|
|
Definition at line 104 of file ui_shared.h. Referenced by Item_Slider_HandleKey(), Item_Slider_OverSlider(), and Item_Slider_Paint(). |
|
|
Definition at line 102 of file ui_shared.h. Referenced by Item_Slider_HandleKey(), and Item_Slider_Paint(). |
|
|
Definition at line 76 of file ui_shared.h. Referenced by String_Report(). |
|
|
Definition at line 61 of file ui_shared.h. |
|
|
Definition at line 64 of file ui_shared.h. |
|
|
Definition at line 46 of file ui_shared.h. Referenced by Item_SetFocus(). |
|
|
Definition at line 48 of file ui_shared.h. |
|
|
Definition at line 47 of file ui_shared.h. Referenced by Fade(), and Menu_FadeItemByName(). |
|
|
Definition at line 62 of file ui_shared.h. Referenced by Display_VisibleMenuCount(). |
|
|
Definition at line 51 of file ui_shared.h. |
|
|
Definition at line 45 of file ui_shared.h. |
|
|
Definition at line 43 of file ui_shared.h. Referenced by Item_Multi_HandleKey(), Item_SetFocus(), Item_Slider_HandleKey(), Item_TextField_Paint(), Item_YesNo_HandleKey(), Menu_GetFocused(), Menus_Activate(), Menus_CloseAll(), and Menus_HandleOOBClick(). |
|
|
Definition at line 52 of file ui_shared.h. |
|
|
Definition at line 50 of file ui_shared.h. Referenced by Menu_TransitionItemByName(). |
|
|
Definition at line 53 of file ui_shared.h. Referenced by Item_ListBox_MouseEnter(), and Item_StartCapture(). |
|
|
Definition at line 57 of file ui_shared.h. |
|
|
Definition at line 56 of file ui_shared.h. Referenced by Item_ListBox_MouseEnter(). |
|
|
Definition at line 54 of file ui_shared.h. Referenced by Item_ListBox_MouseEnter(), and Item_MouseLeave(). |
|
|
Definition at line 55 of file ui_shared.h. Referenced by Item_ListBox_MouseEnter(). |
|
|
Definition at line 42 of file ui_shared.h. |
|
|
Definition at line 49 of file ui_shared.h. |
|
|
Definition at line 59 of file ui_shared.h. |
|
|
Definition at line 58 of file ui_shared.h. Referenced by Menu_OrbitItemByName(). |
|
|
Definition at line 63 of file ui_shared.h. |
|
|
Definition at line 65 of file ui_shared.h. |
|
|
Definition at line 44 of file ui_shared.h. Referenced by IsVisible(), Menu_FadeItemByName(), Menu_HandleMouseMove(), Menu_OverActiveItem(), Menu_RunCloseScript(), Menus_AnyFullScreenVisible(), and Menus_CloseByName(). |
|
|
Definition at line 60 of file ui_shared.h. |
|
|
|
|
|
|
|
|
|
Referenced by Item_Multi_CountSettings(), Item_Multi_FindCvarByValue(), Item_Multi_HandleKey(), Item_Multi_Setting(), Item_ValidateTypeData(), ItemParse_cvarFloatList(), and ItemParse_cvarStrList(). |
|
|
Definition at line 121 of file ui_shared.h. |
|
|
Definition at line 148 of file ui_shared.h. Referenced by CreateNullCursor(), GLW_SetMode(), Window_Init(), and Window_Paint(). |
|
||||||||||||
|
Definition at line 361 of file ui_shared.c. References f, Float_Parse(), i, p, and qboolean. Referenced by Script_SetItemColor(). 00361 {
00362 int i;
00363 float f;
00364
00365 for (i = 0; i < 4; i++) {
00366 if (!Float_Parse(p, &f)) {
00367 return qfalse;
00368 }
00369 (*c)[i] = f;
00370 }
00371 return qtrue;
00372 }
|
Here is the call graph for this function:

|
|
Definition at line 3251 of file ui_shared.c. References bind_t::bind1, bind_t::bind2, Controls_GetKeyAssignment(), g_bindings, and i. 03252 {
03253 int i;
03254 int twokeys[2];
03255
03256 // iterate each command, get its numeric binding
03257 for (i=0; i < g_bindCount; i++)
03258 {
03259
03260 Controls_GetKeyAssignment(g_bindings[i].command, twokeys);
03261
03262 g_bindings[i].bind1 = twokeys[0];
03263 g_bindings[i].bind2 = twokeys[1];
03264 }
03265
03266 //s_controls.invertmouse.curvalue = DC->getCVarValue( "m_pitch" ) < 0;
03267 //s_controls.smoothmouse.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "m_filter" ) );
03268 //s_controls.alwaysrun.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cl_run" ) );
03269 //s_controls.autoswitch.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cg_autoswitch" ) );
03270 //s_controls.sensitivity.curvalue = UI_ClampCvar( 2, 30, Controls_GetCvarValue( "sensitivity" ) );
03271 //s_controls.joyenable.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "in_joystick" ) );
03272 //s_controls.joythreshold.curvalue = UI_ClampCvar( 0.05, 0.75, Controls_GetCvarValue( "joy_threshold" ) );
03273 //s_controls.freelook.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cl_freelook" ) );
03274 }
|
Here is the call graph for this function:

|
|
Definition at line 3281 of file ui_shared.c. References bind_t::bind1, bind_t::bind2, DC, EXEC_APPEND, displayContextDef_t::executeText, g_bindings, i, and displayContextDef_t::setBinding. 03282 {
03283 int i;
03284
03285 // iterate each command, get its numeric binding
03286 for (i=0; i < g_bindCount; i++)
03287 {
03288
03289 if (g_bindings[i].bind1 != -1)
03290 {
03291 DC->setBinding( g_bindings[i].bind1, g_bindings[i].command );
03292
03293 if (g_bindings[i].bind2 != -1)
03294 DC->setBinding( g_bindings[i].bind2, g_bindings[i].command );
03295 }
03296 }
03297
03298 //if ( s_controls.invertmouse.curvalue )
03299 // DC->setCVar("m_pitch", va("%f),-fabs( DC->getCVarValue( "m_pitch" ) ) );
03300 //else
03301 // trap_Cvar_SetValue( "m_pitch", fabs( trap_Cvar_VariableValue( "m_pitch" ) ) );
03302
03303 //trap_Cvar_SetValue( "m_filter", s_controls.smoothmouse.curvalue );
03304 //trap_Cvar_SetValue( "cl_run", s_controls.alwaysrun.curvalue );
03305 //trap_Cvar_SetValue( "cg_autoswitch", s_controls.autoswitch.curvalue );
03306 //trap_Cvar_SetValue( "sensitivity", s_controls.sensitivity.curvalue );
03307 //trap_Cvar_SetValue( "in_joystick", s_controls.joyenable.curvalue );
03308 //trap_Cvar_SetValue( "joy_threshold", s_controls.joythreshold.curvalue );
03309 //trap_Cvar_SetValue( "cl_freelook", s_controls.freelook.curvalue );
03310 DC->executeText(EXEC_APPEND, "in_restart\n");
03311 //trap_Cmd_ExecuteText( EXEC_APPEND, "in_restart\n" );
03312 }
|
|
|
Definition at line 3319 of file |