#include "../game/q_shared.h"#include "../cgame/tr_types.h"#include "keycodes.h"#include "../../ui/menudef.h"#include "../namespace_begin.h"#include "../namespace_end.h"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 | textScrollDef_s |
| struct | windowDef_t |
Defines | |
| #define | MAX_MENUNAME 32 |
| #define | MAX_ITEMTEXT 64 |
| #define | MAX_ITEMACTION 64 |
| #define | MAX_MENUDEFFILE 4096 |
| #define | MAX_MENUFILE 32768 |
| #define | MAX_MENUS 64 |
| #define | MAX_MENUITEMS 256 |
| #define | MAX_COLOR_RANGES 10 |
| #define | MAX_OPEN_MENUS 16 |
| #define | MAX_TEXTSCROLL_LINES 256 |
| #define | WINDOW_MOUSEOVER 0x00000001 |
| #define | WINDOW_HASFOCUS 0x00000002 |
| #define | WINDOW_VISIBLE 0x00000004 |
| #define | WINDOW_INACTIVE 0x00000008 |
| #define | WINDOW_DECORATION 0x00000010 |
| #define | WINDOW_FADINGOUT 0x00000020 |
| #define | WINDOW_FADINGIN 0x00000040 |
| #define | WINDOW_MOUSEOVERTEXT 0x00000080 |
| #define | WINDOW_INTRANSITION 0x00000100 |
| #define | WINDOW_FORECOLORSET 0x00000200 |
| #define | WINDOW_HORIZONTAL 0x00000400 |
| #define | WINDOW_LB_LEFTARROW 0x00000800 |
| #define | WINDOW_LB_RIGHTARROW 0x00001000 |
| #define | WINDOW_LB_THUMB 0x00002000 |
| #define | WINDOW_LB_PGUP 0x00004000 |
| #define | WINDOW_LB_PGDN 0x00008000 |
| #define | WINDOW_ORBITING 0x00010000 |
| #define | WINDOW_OOB_CLICK 0x00020000 |
| #define | WINDOW_WRAPPED 0x00040000 |
| #define | WINDOW_AUTOWRAPPED 0x00080000 |
| #define | WINDOW_FORCED 0x00100000 |
| #define | WINDOW_POPUP 0x00200000 |
| #define | WINDOW_BACKCOLORSET 0x00400000 |
| #define | WINDOW_TIMEDVISIBLE 0x00800000 |
| #define | WINDOW_PLAYERCOLOR 0x01000000 |
| #define | WINDOW_INTRANSITIONMODEL 0x04000000 |
| #define | CURSOR_NONE 0x00000001 |
| #define | CURSOR_ARROW 0x00000002 |
| #define | CURSOR_SIZER 0x00000004 |
| #define | STRING_POOL_SIZE 384*1024 |
| #define | MAX_STRING_HANDLES 4096 |
| #define | MAX_SCRIPT_ARGS 12 |
| #define | MAX_EDITFIELD 256 |
| #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 | ART_FX_ORANGE "menu/art/fx_orange" |
| #define | ART_FX_PURPLE "menu/art/fx_purple" |
| #define | ASSET_GRADIENTBAR "ui/assets/gradientbar2.tga" |
| #define | ASSET_SCROLLBAR "gfx/menus/scrollbar.tga" |
| #define | ASSET_SCROLLBAR_ARROWDOWN "gfx/menus/scrollbar_arrow_dwn_a.tga" |
| #define | ASSET_SCROLLBAR_ARROWUP "gfx/menus/scrollbar_arrow_up_a.tga" |
| #define | ASSET_SCROLLBAR_ARROWLEFT "gfx/menus/scrollbar_arrow_left.tga" |
| #define | ASSET_SCROLLBAR_ARROWRIGHT "gfx/menus/scrollbar_arrow_right.tga" |
| #define | ASSET_SCROLL_THUMB "gfx/menus/scrollbar_thumb.tga" |
| #define | ASSET_SLIDER_BAR "menu/new/slider" |
| #define | ASSET_SLIDER_THUMB "menu/new/sliderthumb" |
| #define | SCROLLBAR_SIZE 16.0 |
| #define | SLIDER_WIDTH 96.0 |
| #define | SLIDER_HEIGHT 16.0 |
| #define | SLIDER_THUMB_WIDTH 12.0 |
| #define | SLIDER_THUMB_HEIGHT 20.0 |
| #define | NUM_CROSSHAIRS 9 |
| #define | MAX_LB_COLUMNS 16 |
| #define | MAX_MULTI_CVARS 32 |
| #define | ITEM_ALIGN_LEFT 0 |
| #define | ITEM_ALIGN_CENTER 1 |
| #define | ITEM_ALIGN_RIGHT 2 |
| #define | CVAR_ENABLE 0x00000001 |
| #define | CVAR_DISABLE 0x00000002 |
| #define | CVAR_SHOW 0x00000004 |
| #define | CVAR_HIDE 0x00000008 |
| #define | ITF_G2VALID 0x0001 |
| #define | ITF_ISCHARACTER 0x0002 |
| #define | ITF_ISSABER 0x0004 |
| #define | ITF_ISSABER2 0x0008 |
| #define | ITF_ISANYSABER (ITF_ISSABER|ITF_ISSABER2) |
Typedefs | |
| typedef rectDef_t | Rectangle |
| typedef windowDef_t | Window |
| typedef columnInfo_s | columnInfo_t |
| typedef listBoxDef_s | listBoxDef_t |
| typedef editFieldDef_s | editFieldDef_t |
| typedef multiDef_s | multiDef_t |
| typedef modelDef_s | modelDef_t |
| typedef textScrollDef_s | textScrollDef_t |
| typedef itemDef_s | itemDef_t |
Functions | |
| const char * | String_Alloc (const char *p) |
| void | String_Init () |
| void | String_Report () |
| void | Init_Display (displayContextDef_t *dc) |
| void | Display_ExpandMacros (char *buff) |
| void | Menu_Init (menuDef_t *menu) |
| void | Item_Init (itemDef_t *item) |
| void | Menu_PostParse (menuDef_t *menu) |
| 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_ScrollFeeder (menuDef_t *menu, int feeder, qboolean down) |
| qboolean | Float_Parse (char **p, float *f) |
| qboolean | Color_Parse (char **p, vec4_t *c) |
| qboolean | Int_Parse (char **p, int *i) |
| qboolean | Rect_Parse (char **p, rectDef_t *r) |
| qboolean | String_Parse (char **p, const char **out) |
| qboolean | Script_Parse (char **p, const char **out) |
| qboolean | PC_Float_Parse (int handle, float *f) |
| qboolean | PC_Color_Parse (int handle, vec4_t *c) |
| qboolean | PC_Int_Parse (int handle, int *i) |
| qboolean | PC_Rect_Parse (int handle, rectDef_t *r) |
| qboolean | PC_String_Parse (int handle, const char **out) |
| qboolean | PC_Script_Parse (int handle, const char **out) |
| int | Menu_Count () |
| void | Menu_New (int handle) |
| void | Menu_PaintAll () |
| menuDef_t * | Menus_ActivateByName (const char *p) |
| void | Menu_Reset () |
| qboolean | Menus_AnyFullScreenVisible () |
| void | Menus_Activate (menuDef_t *menu) |
| itemDef_t * | Menu_FindItemByName (menuDef_t *menu, const char *p) |
| displayContextDef_t * | Display_GetContext () |
| void * | Display_CaptureItem (int x, int y) |
| qboolean | Display_MouseMove (void *p, int x, int y) |
| int | Display_CursorType (int x, int y) |
| qboolean | Display_KeyBindPending () |
| void | Menus_OpenByName (const char *p) |
| menuDef_t * | Menus_FindByName (const char *p) |
| void | Menus_ShowByName (const char *p) |
| void | Menus_CloseByName (const char *p) |
| void | Display_HandleKey (int key, qboolean down, int x, int y) |
| void | LerpColor (vec4_t a, vec4_t b, vec4_t c, float t) |
| void | Menus_CloseAll () |
| void | Menu_Paint (menuDef_t *menu, qboolean forcePaint) |
| void | Menu_SetFeederSelection (menuDef_t *menu, int feeder, int index, const char *name) |
| void | Display_CacheAll () |
| void | Menu_SetItemBackground (const menuDef_t *menu, const char *itemName, const char *background) |
| void * | UI_Alloc (int size) |
| void | UI_InitMemory (void) |
| qboolean | UI_OutOfMemory () |
| void | Controls_GetConfig (void) |
| void | Controls_SetConfig (qboolean restart) |
| int | trap_PC_AddGlobalDefine (char *define) |
| int | trap_PC_LoadSource (const char *filename) |
| int | trap_PC_FreeSource (int handle) |
| int | trap_PC_ReadToken (int handle, pc_token_t *pc_token) |
| int | trap_PC_SourceFileAndLine (int handle, char *filename, int *line) |
| int | trap_PC_LoadGlobalDefines (const char *filename) |
| void | trap_PC_RemoveAllGlobalDefines (void) |
| int | trap_R_Font_StrLenPixels (const char *text, const int iFontIndex, const float scale) |
| int | trap_R_Font_StrLenChars (const char *text) |
| int | trap_R_Font_HeightPixels (const int iFontIndex, const float scale) |
| void | trap_R_Font_DrawString (int ox, int oy, const char *text, const float *rgba, const int setIndex, int iCharLimit, const float scale) |
| qboolean | trap_Language_IsAsian (void) |
| qboolean | trap_Language_UsesSpaces (void) |
| unsigned int | trap_AnyLanguage_ReadCharFromString (const char *psText, int *piAdvanceCount, qboolean *pbIsTrailingPunctuation) |
| int | trap_SP_GetStringTextString (const char *text, char *buffer, int bufferLength) |
| int | trap_SP_GetNumLanguages (void) |
| void | trap_GetLanguageName (const int languageIndex, char *buffer) |
| void | trap_G2API_CollisionDetect (CollisionRecord_t *collRecMap, void *ghoul2, const vec3_t angles, const vec3_t position, int frameNumber, int entNum, const vec3_t rayStart, const vec3_t rayEnd, const vec3_t scale, int traceFlags, int useLod, float fRadius) |
| void | trap_G2API_CollisionDetectCache (CollisionRecord_t *collRecMap, void *ghoul2, const vec3_t angles, const vec3_t position, int frameNumber, int entNum, const vec3_t rayStart, const vec3_t rayEnd, const vec3_t scale, int traceFlags, int useLod, float fRadius) |
| void | trap_G2_ListModelSurfaces (void *ghlInfo) |
| void | trap_G2_ListModelBones (void *ghlInfo, int frame) |
| void | trap_G2_SetGhoul2ModelIndexes (void *ghoul2, qhandle_t *modelList, qhandle_t *skinList) |
| qboolean | trap_G2_HaveWeGhoul2Models (void *ghoul2) |
| qboolean | trap_G2API_GetBoltMatrix (void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) |
| qboolean | trap_G2API_GetBoltMatrix_NoReconstruct (void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) |
| qboolean | trap_G2API_GetBoltMatrix_NoRecNoRot (void *ghoul2, const int modelIndex, const int boltIndex, mdxaBone_t *matrix, const vec3_t angles, const vec3_t position, const int frameNum, qhandle_t *modelList, vec3_t scale) |
| int | trap_G2API_InitGhoul2Model (void **ghoul2Ptr, const char *fileName, int modelIndex, qhandle_t customSkin, qhandle_t customShader, int modelFlags, int lodBias) |
| qboolean | trap_G2API_SetSkin (void *ghoul2, int modelIndex, qhandle_t customSkin, qhandle_t renderSkin) |
| qboolean | trap_G2API_AttachG2Model (void *ghoul2From, int modelIndexFrom, void *ghoul2To, int toBoltIndex, int toModel) |
| int | trap_G2API_CopyGhoul2Instance (void *g2From, void *g2To, int modelIndex) |
| void | trap_G2API_CopySpecificGhoul2Model (void *g2From, int modelFrom, void *g2To, int modelTo) |
| void | trap_G2API_DuplicateGhoul2Instance (void *g2From, void **g2To) |
| qboolean | trap_G2API_HasGhoul2ModelOnIndex (void *ghlInfo, int modelIndex) |
| qboolean | trap_G2API_RemoveGhoul2Model (void *ghlInfo, int modelIndex) |
| int | trap_G2API_AddBolt (void *ghoul2, int modelIndex, const char *boneName) |
| void | trap_G2API_SetBoltInfo (void *ghoul2, int modelIndex, int boltInfo) |
| void | trap_G2API_CleanGhoul2Models (void **ghoul2Ptr) |
| qboolean | trap_G2API_SetBoneAngles (void *ghoul2, int modelIndex, const char *boneName, const vec3_t angles, const int flags, const int up, const int right, const int forward, qhandle_t *modelList, int blendTime, int currentTime) |
| void | trap_G2API_GetGLAName (void *ghoul2, int modelIndex, char *fillBuf) |
| qboolean | trap_G2API_SetBoneAnim (void *ghoul2, const int modelIndex, const char *boneName, const int startFrame, const int endFrame, const int flags, const float animSpeed, const int currentTime, const float setFrame, const int blendTime) |
| qboolean | trap_G2API_GetBoneAnim (void *ghoul2, const char *boneName, const int currentTime, float *currentFrame, int *startFrame, int *endFrame, int *flags, float *animSpeed, int *modelList, const int modelIndex) |
| qboolean | trap_G2API_GetBoneFrame (void *ghoul2, const char *boneName, const int currentTime, float *currentFrame, int *modelList, const int modelIndex) |
| qboolean | trap_G2API_SetRootSurface (void *ghoul2, const int modelIndex, const char *surfaceName) |
| qboolean | trap_G2API_SetSurfaceOnOff (void *ghoul2, const char *surfaceName, const int flags) |
| qboolean | trap_G2API_SetNewOrigin (void *ghoul2, const int boltIndex) |
| int | trap_G2API_GetTime (void) |
| void | trap_G2API_SetTime (int time, int clock) |
| void | trap_G2API_SetRagDoll (void *ghoul2, sharedRagDollParams_t *params) |
| void | trap_G2API_AnimateG2Models (void *ghoul2, int time, sharedRagDollUpdateParams_t *params) |
| qboolean | trap_G2API_SetBoneIKState (void *ghoul2, int time, const char *boneName, int ikState, sharedSetBoneIKStateParams_t *params) |
| qboolean | trap_G2API_IKMove (void *ghoul2, int time, sharedIKMoveParams_t *params) |
| void | trap_G2API_GetSurfaceName (void *ghoul2, int surfNumber, int modelIndex, char *fillBuf) |
|
|
Definition at line 79 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 80 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 81 of file ui_shared.h. Referenced by CG_AssetCache(). |
|
|
Definition at line 82 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 87 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 88 of file ui_shared.h. Referenced by AssetCache(). |
|
|
Definition at line 83 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 84 of file ui_shared.h. Referenced by CG_AssetCache(). |
|
|
Definition at line 85 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 86 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 90 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 96 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 91 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 92 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 94 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 95 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 93 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 97 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 98 of file ui_shared.h. Referenced by AssetCache(), and CG_AssetCache(). |
|
|
Definition at line 54 of file ui_shared.h. Referenced by CG_MouseEvent(), and Display_CursorType(). |
|
|
Definition at line 53 of file ui_shared.h. |
|
|
Definition at line 55 of file ui_shared.h. Referenced by CG_MouseEvent(), and Display_CursorType(). |
|
|
Definition at line 247 of file ui_shared.h. Referenced by Item_MouseEnter(), Item_OwnerDraw_Paint(), Item_SetFocus(), Item_TextColor(), ItemParse_disableCvar(), and Menu_HandleMouseMove(). |
|
|
Definition at line 246 of file ui_shared.h. Referenced by Item_MouseEnter(), Item_OwnerDraw_Paint(), Item_SetFocus(), Item_TextColor(), ItemParse_enableCvar(), and Menu_HandleMouseMove(). |
|
|
Definition at line 249 of file ui_shared.h. Referenced by Item_MouseEnter(), Item_Paint(), Item_SetFocus(), ItemParse_hideCvar(), and Menu_HandleMouseMove(). |
|
|
Definition at line 248 of file ui_shared.h. Referenced by Item_MouseEnter(), Item_Paint(), Item_SetFocus(), ItemParse_showCvar(), and Menu_HandleMouseMove(). |
|
|
Definition at line 243 of file ui_shared.h. Referenced by Item_Paint(), Item_SetTextExtents(), and Item_Text_AutoWrapped_Paint(). |
|
|
Definition at line 242 of file ui_shared.h. Referenced by Item_Text_AutoWrapped_Paint(). |
|
|
Definition at line 244 of file ui_shared.h. Referenced by Item_Paint(), Item_SetTextExtents(), and Item_Text_AutoWrapped_Paint(). |
|
|
Definition at line 251 of file ui_shared.h. Referenced by ItemParse_asset_model_go(). |
|
|
Definition at line 256 of file ui_shared.h. Referenced by Item_Model_Paint(). |
|
|
Definition at line 252 of file ui_shared.h. Referenced by Item_Model_Paint(), ItemParse_isCharacter(), and UI_SaberDrawBlades(). |
|
|
Definition at line 253 of file ui_shared.h. Referenced by ItemParse_isSaber(), UI_SaberDrawBlade(), and UI_SaberDrawBlades(). |
|
|
Definition at line 254 of file ui_shared.h. Referenced by ItemParse_isSaber2(), and UI_SaberDrawBlades(). |
|
|
Definition at line 18 of file ui_shared.h. Referenced by ItemParse_addColorRange(). |
|
|
Definition at line 77 of file ui_shared.h. Referenced by Item_TextField_HandleKey(), and Item_ValidateTypeData(). |
|
|
Definition at line 13 of file ui_shared.h. |
|
|
Definition at line 12 of file ui_shared.h. |
|
|
Definition at line 164 of file ui_shared.h. Referenced by ItemParse_columns(). |
|
|
Definition at line 14 of file ui_shared.h. Referenced by CG_LoadMenus(). |
|
|
Definition at line 15 of file ui_shared.h. Referenced by CG_GetMenuBuffer(), GetMenuBuffer(), and UI_SaberLoadParms(). |
|
|
Definition at line 17 of file ui_shared.h. |
|
|
Definition at line 11 of file ui_shared.h. |
|
|
Definition at line 16 of file ui_shared.h. Referenced by Menu_New(). |
|
|
Definition at line 198 of file ui_shared.h. Referenced by ItemParse_cvarFloatList(), and ItemParse_cvarStrList(). |
|
|
Definition at line 19 of file ui_shared.h. Referenced by Menus_ActivateByName(). |
|
|
Definition at line 76 of file ui_shared.h. |
|
|
Definition at line 75 of file ui_shared.h. |
|
|
Definition at line 20 of file ui_shared.h. |
|
|
Definition at line 104 of file ui_shared.h. |
|
|
Definition at line 99 of file ui_shared.h. Referenced by Item_ListBox_MouseEnter(), Item_ListBox_OverLB(), Item_ListBox_Paint(), Item_ListBox_ThumbDrawPosition(), Item_ListBox_ThumbPosition(), Item_TextScroll_OverLB(), Item_TextScroll_Paint(), Item_TextScroll_ThumbDrawPosition(), and Item_TextScroll_ThumbPosition(). |
|
|
Definition at line 101 of file ui_shared.h. Referenced by Item_Slider_Paint(). |
|
|
Definition at line 103 of file ui_shared.h. Referenced by Item_Slider_OverSlider(), and Item_Slider_Paint(). |
|
|
Definition at line 102 of file ui_shared.h. Referenced by Item_Slider_HandleKey(), Item_Slider_OverSlider(), and Item_Slider_Paint(). |
|
|
Definition at line 100 of file ui_shared.h. Referenced by Item_Slider_HandleKey(), Item_Slider_Paint(), and Item_Slider_ThumbPosition(). |
|
|
Definition at line 70 of file ui_shared.h. Referenced by String_Alloc(), and String_Report(). |
|
|
Definition at line 41 of file ui_shared.h. Referenced by Item_Text_Paint(), and ItemParse_autowrapped(). |
|
|
Definition at line 44 of file ui_shared.h. Referenced by Script_SetColor(). |
|
|
Definition at line 26 of file ui_shared.h. Referenced by Item_SetFocus(), ItemParse_decoration(), and Script_SetFocus(). |
|
|
Definition at line 28 of file ui_shared.h. Referenced by Fade(), and Menu_FadeItemByName(). |
|
|
Definition at line 27 of file ui_shared.h. Referenced by Fade(), IsVisible(), and Menu_FadeItemByName(). |
|
|
Definition at line 42 of file ui_shared.h. Referenced by Display_VisibleMenuCount(), Menu_HandleMouseMove(), and Menu_Paint(). |
|
|
Definition at line 31 of file ui_shared.h. Referenced by ItemParse_forecolor(), MenuParse_forecolor(), Script_SetColor(), Script_SetItemColor(), Script_SetItemColorCvar(), and Window_Paint(). |
|
|
|
Definition at line 32 of file ui_shared.h. Referenced by Item_ListBox_HandleKey(), Item_ListBox_MaxScroll(), Item_ListBox_MouseEnter(), Item_ListBox_OverLB(), Item_ListBox_Paint(), Item_ListBox_ThumbDrawPosition(), Item_ListBox_ThumbPosition(), and ItemParse_horizontalscroll(). |
|
|
Definition at line 25 of file ui_shared.h. |
|
|
Definition at line 30 of file ui_shared.h. Referenced by Item_Paint(), and Menu_TransitionItemByName(). |
|
|
Definition at line 49 of file ui_shared.h. Referenced by Item_Paint(), and Menu_Transition3ItemByName(). |
|
|
Definition at line 33 of file ui_shared.h. Referenced by Item_ListBox_HandleKey(), Item_ListBox_MouseEnter(), Item_ListBox_OverLB(), Item_MouseLeave(), Item_StartCapture(), Item_TextScroll_HandleKey(), Item_TextScroll_MouseEnter(), and Item_TextScroll_OverLB(). |
|
|
Definition at line 37 of file ui_shared.h. Referenced by Item_ListBox_HandleKey(), Item_ListBox_MouseEnter(), Item_ListBox_OverLB(), Item_TextScroll_HandleKey(), Item_TextScroll_MouseEnter(), and Item_TextScroll_OverLB(). |
|
|
Definition at line 36 of file ui_shared.h. Referenced by Item_ListBox_HandleKey(), Item_ListBox_MouseEnter(), Item_ListBox_OverLB(), Item_TextScroll_HandleKey(), Item_TextScroll_MouseEnter(), and Item_TextScroll_OverLB(). |
|
|
Definition at line 34 of file ui_shared.h. Referenced by Item_ListBox_HandleKey(), Item_ListBox_MouseEnter(), Item_ListBox_OverLB(), Item_MouseLeave(), Item_StartCapture(), Item_TextScroll_HandleKey(), Item_TextScroll_MouseEnter(), and Item_TextScroll_OverLB(). |
|
|
Definition at line 35 of file ui_shared.h. Referenced by Item_ListBox_HandleKey(), Item_ListBox_MouseEnter(), Item_ListBox_OverLB(), Item_Slider_OverSlider(), Item_StartCapture(), Item_TextScroll_HandleKey(), Item_TextScroll_MouseEnter(), and Item_TextScroll_OverLB(). |
|
|
Definition at line 22 of file ui_shared.h. Referenced by Item_MouseEnter(), Item_Paint(), Item_SetMouseOver(), Menu_HandleMouseMove(), and Menu_ItemDisable(). |
|
|
Definition at line 29 of file ui_shared.h. Referenced by Item_MouseEnter(), and Item_MouseLeave(). |
|
|
Definition at line 39 of file ui_shared.h. Referenced by MenuParse_outOfBounds(), and Menus_HandleOOBClick(). |
|
|
Definition at line 38 of file ui_shared.h. Referenced by Item_Paint(), and Menu_OrbitItemByName(). |
|
|
Definition at line 46 of file ui_shared.h. Referenced by Item_ListBox_Paint(), ItemParse_forecolor(), MenuParse_forecolor(), and Window_Paint(). |
|
|
Definition at line 43 of file ui_shared.h. Referenced by Display_MouseMove(), Menu_HandleKey(), and MenuParse_popup(). |
|
|
Definition at line 45 of file ui_shared.h. Referenced by Item_Paint(). |
|
|
|
Definition at line 40 of file ui_shared.h. Referenced by Item_Text_Paint(), and ItemParse_wrapped(). |
|
|
|
|
|
|
|
|
|
Referenced by Item_Multi_CountSettings(), Item_Multi_FindCvarByValue(), Item_Multi_HandleKey(), Item_Multi_Setting(), Item_ValidateTypeData(), ItemParse_cvarFloatList(), and ItemParse_cvarStrList(). |
|
|
Definition at line 119 of file ui_shared.h. |
|
|
|
Definition at line 146 of file ui_shared.h. Referenced by Window_Init(), and Window_Paint(). |
|
||||||||||||
|
Definition at line 492 of file ui_shared.c. References Float_Parse(), qboolean, qfalse, qtrue, and vec4_t. Referenced by Script_SetItemColor().
00492 {
00493 int i;
00494 float f;
00495
00496 for (i = 0; i < 4; i++) {
00497 if (!Float_Parse(p, &f)) {
00498 return qfalse;
00499 }
00500 (*c)[i] = f;
00501 }
00502 return qtrue;
00503 }
|
|
|
Definition at line 5332 of file ui_shared.c. References bind_t::bind1, and bind_t::bind2. Referenced by String_Init().
05333 {
05334 int i;
05335 int twokeys[2];
05336
05337 // iterate each command, get its numeric binding
05338 for (i=0; i < g_bindCount; i++)
05339 {
05340
05341 Controls_GetKeyAssignment(g_bindings[i].command, twokeys);
05342
05343 g_bindings[i].bind1 = twokeys[0];
05344 g_bindings[i].bind2 = twokeys[1];
05345 }
05346
05347 //s_controls.invertmouse.curvalue = DC->getCVarValue( "m_pitch" ) < 0;
05348 //s_controls.smoothmouse.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "m_filter" ) );
05349 //s_controls.alwaysrun.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cl_run" ) );
05350 //s_controls.autoswitch.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cg_autoswitch" ) );
05351 //s_controls.sensitivity.curvalue = UI_ClampCvar( 2, 30, Controls_GetCvarValue( "sensitivity" ) );
05352 //s_controls.joyenable.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "in_joystick" ) );
05353 //s_controls.joythreshold.curvalue = UI_ClampCvar( 0.05, 0.75, Controls_GetCvarValue( "joy_threshold" ) );
05354 //s_controls.freelook.curvalue = UI_ClampCvar( 0, 1, Controls_GetCvarValue( "cl_freelook" ) );
05355 }
|
|
|
Definition at line 5362 of file ui_shared.c. References bind_t::bind1, bind_t::bind2, DC, and displayContextDef_t::setBinding. Referenced by Item_Bind_HandleKey().
05363 {
05364 int i;
05365
05366 // iterate each command, get its numeric binding
05367 for (i=0; i < g_bindCount; i++)
05368 {
05369 if (g_bindings[i].bind1 != -1)
05370 {
05371 DC->setBinding( g_bindings[i].bind1, g_bindings[i].command );
05372
05373 if (g_bindings[i].bind2 != -1)
05374 DC->setBinding( g_bindings[i].bind2, g_bindings[i].command );
05375 }
05376 }
05377
05378 //if ( s_controls.invertmouse.curvalue )
05379 // DC->setCVar("m_pitch", va("%f),-fabs( DC->getCVarValue( "m_pitch" ) ) );
05380 //else
05381 // trap_Cvar_SetValue( "m_pitch", fabs( trap_Cvar_VariableValue( "m_pitch" ) ) );
05382
05383 //trap_Cvar_SetValue( "m_filter", s_controls.smoothmouse.curvalue );
05384 //trap_Cvar_SetValue( "cl_run", s_controls.alwaysrun.curvalue );
05385 //trap_Cvar_SetValue( "cg_autoswitch", s_controls.autoswitch.curvalue );
05386 //trap_Cvar_SetValue( "sensitivity", s_controls.sensitivity.curvalue );
05387 //trap_Cvar_SetValue( "in_joystick", s_controls.joyenable.curvalue );
05388 //trap_Cvar_SetValue( "joy_threshold", s_controls.joythreshold.curvalue );
05389 //trap_Cvar_SetValue( "cl_freelook", s_controls.freelook.curvalue );
05390 //
05391 // DC->executeText(EXEC_APPEND, "in_restart\n");
05392 // ^--this is bad, it shows the cursor during map load, if you need to, add it as an exec cmd to use_joy or something.
05393 }
|
|
|
Definition at line 9960 of file ui_shared.c. References menuCount, and Menus.
09960 {
09961 int i;
09962 for (i = 0; i < menuCount; i++) {
09963 Menu_CacheContents(&Menus[i]);
09964 }
09965 }
|
|
||||||||||||
|
Definition at line 9858 of file ui_shared.c. References menuCount, Menus, NULL, and Rect_ContainsPoint(). Referenced by CG_KeyEvent(), and Display_HandleKey().
09858 {
09859 int i;
09860
09861 for (i = 0; i < menuCount; i++) {
09862 // turn off focus each item
09863 // menu->items[i].window.flags &= ~WINDOW_HASFOCUS;
09864 if (Rect_ContainsPoint(&Menus[i].window.rect, x, y)) {
09865 return &Menus[i];
09866 }
09867 }
09868 return NULL;
09869 }
|
|
||||||||||||
|
Definition at line 9903 of file ui_shared.c. References CURSOR_ARROW, CURSOR_SIZER, rectDef_t::h, menuCount, Menus, windowDef_t::rect, Rect_ContainsPoint(), rectDef_t::w, menuDef_t::window, rectDef_t::x, and rectDef_t::y. Referenced by CG_MouseEvent().
09903 {
09904 int i;
09905 for (i = 0; i < menuCount; i++) {
09906 rectDef_t r2;
09907 r2.x = Menus[i].window.rect.x - 3;
09908 r2.y = Menus[i].window.rect.y - 3;
09909 r2.w = r2.h = 7;
09910 if (Rect_ContainsPoint(&r2, x, y)) {
09911 return CURSOR_SIZER;
09912 }
09913 }
09914 return CURSOR_ARROW;
09915 }
|
|
|
|
|
|
Definition at line 9854 of file ui_shared.c. References DC.
09854 {
09855 return DC;
09856 }
|
|
||||||||||||||||||||
|
Definition at line 9918 of file ui_shared.c. References Display_CaptureItem(), Menu_GetFocused(), Menu_HandleKey(), and NULL. Referenced by CG_KeyEvent().
09918 {
09919 menuDef_t *menu = (menuDef_t *) Display_CaptureItem(x, y);
09920 if (menu == NULL) {
09921 menu = Menu_GetFocused();
09922 }
09923 if (menu) {
09924 Menu_HandleKey(menu, key, down );
09925 }
09926 }
|
|
|
Definition at line 5548 of file ui_shared.c. References qboolean. Referenced by Item_Paint().
05548 {
05549 return g_waitingForKey;
05550 }
|
|
||||||||||||||||
|
Definition at line 9873 of file ui_shared.c. References windowDef_t::flags, Menu_GetFocused(), Menu_HandleMouseMove(), Menu_UpdatePosition(), menuCount, Menus, NULL, qboolean, qtrue, windowDef_t::rect, menuDef_t::window, WINDOW_POPUP, rectDef_t::x, and rectDef_t::y. Referenced by _UI_MouseEvent(), CG_MouseEvent(), and Menu_HandleKey().
09873 {
09874
09875 //JLFMOUSE AGAIN I THINK THIS SHOULD BE MOOT
09876 #ifdef _XBOX
09877 return qtrue;
09878 #endif
09879 //END JLF
09880 int i;
09881 menuDef_t *menu = (menuDef_t *) p;
09882
09883 if (menu == NULL) {
09884 menu = Menu_GetFocused();
09885 if (menu) {
09886 if (menu->window.flags & WINDOW_POPUP) {
09887 Menu_HandleMouseMove(menu, x, y);
09888 return qtrue;
09889 }
09890 }
09891 for (i = 0; i < menuCount; i++) {
09892 Menu_HandleMouseMove(&Menus[i], x, y);
09893 }
09894 } else {
09895 menu->window.rect.x += x;
09896 menu->window.rect.y += y;
09897 Menu_UpdatePosition(menu);
09898 }
09899 return qtrue;
09900
09901 }
|
|
||||||||||||
|
Definition at line 449 of file ui_shared.c. References atof(), COM_ParseExt(), qboolean, qfalse, and qtrue. Referenced by Color_Parse(), Rect_Parse(), Script_Orbit(), Script_Scale(), Script_SetColor(), and Script_Transition().
00449 {
00450 char *token;
00451 token = COM_ParseExt((const char **)p, qfalse);
00452 if (token && token[0] != 0) {
00453 *f = atof(token);
00454 return qtrue;
00455 } else {
00456 return qfalse;
00457 }
00458 }
|
|
|
Definition at line 693 of file ui_shared.c. References DC. Referenced by _UI_Init(), and CG_LoadHudMenu().
00693 {
00694 DC = dc;
00695 }
|
|
||||||||||||
|
Definition at line 528 of file ui_shared.c. References atoi(), COM_ParseExt(), qboolean, qfalse, and qtrue. Referenced by Script_Disable(), Script_Orbit(), Script_Transition(), and Script_Transition2().
00528 {
00529 char *token;
00530 token = COM_ParseExt((const char **)p, qfalse);
00531
00532 if (token && token[0] != 0) {
00533 *i = atoi(token);
00534 return qtrue;
00535 } else {
00536 return qfalse;
00537 }
00538 }
|
|
|
Definition at line 7120 of file ui_shared.c. References itemDef_t, memset(), itemDef_s::textscale, itemDef_s::window, and Window_Init(). Referenced by MenuParse_itemDef().
07120 {
07121 memset(item, 0, sizeof(itemDef_t));
07122 item->textscale = 0.55f;
07123 Window_Init(&item->window);
07124 }
|
|
||||||||||||||||||||
|
Definition at line 429 of file ui_shared.c. References vec4_t. Referenced by Item_Bind_Paint(), Item_Multi_Paint(), Item_OwnerDraw_Paint(), Item_Slider_Paint(), Item_TextColor(), Item_TextField_Paint(), and Item_YesNo_Paint().
00430 {
00431 int i;
00432
00433 // lerp and clamp each component
00434 for (i=0; i<4; i++)
00435 {
00436 c[i] = a[i] + t*(b[i]-a[i]);
00437 if (c[i] < 0)
00438 c[i] = 0;
00439 else if (c[i] > 1.0)
00440 c[i] = 1.0;
00441 }
00442 }
|
|
|
Definition at line 9829 of file ui_shared.c. References menuCount. Referenced by _UI_KeyEvent(), _UI_MouseEvent(), _UI_Refresh(), _UI_SetActiveMenu(), and Menu_PaintAll().
09829 {
09830 return menuCount;
09831 }
|
|
||||||||||||
|
|
Definition at line 7036 of file ui_shared.c. References windowDef_t::flags, menuCount, Menus, NULL, menuDef_t::window, WINDOW_HASFOCUS, and WINDOW_VISIBLE. Referenced by _UI_KeyEvent(), Display_HandleKey(), Display_MouseMove(), Menu_SetFeederSelection(), Menus_ActivateByName(), Script_Disable(), UI_FindCurrentSiegeTeamClass(), UI_Load(), UI_UpdateCharacterSkin(), UI_UpdateSiegeObjectiveGraphics(), UI_UpdateSiegeStatusIcons(), and UpdateBotButtons().
|
|
||||||||||||||||
|
Definition at line 4490 of file ui_shared.c. References A_AUX0, A_AUX1, A_AUX10, A_AUX11, A_AUX12, A_AUX13, A_AUX14, A_AUX15, A_AUX16, A_AUX2, A_AUX3, A_AUX4, A_AUX5, A_AUX6, A_AUX7, A_AUX8, A_AUX9, A_CURSOR_DOWN, A_CURSOR_LEFT, A_CURSOR_RIGHT, A_CURSOR_UP, A_ENTER, A_ESCAPE, A_F11, A_F12, A_JOY0, A_JOY1, A_JOY2, A_JOY3, A_JOY4, A_KP_2, A_KP_8, A_KP_ENTER, A_MOUSE1, A_MOUSE2, A_MOUSE3, A_TAB, itemDef_s::cursorPos, displayContextDef_t::cursorx, displayContextDef_t::cursory, DC, itemDef_s::disabled, Display_MouseMove(), EXEC_APPEND, displayContextDef_t::executeText, windowDef_t::flags, displayContextDef_t::getCVarValue, Item_Action(), Item_Bind_HandleKey(), Item_HandleAccept(), Item_HandleKey(), Item_RunScript(), Item_TextField_HandleKey(), ITEM_TYPE_EDITFIELD, ITEM_TYPE_MULTI, ITEM_TYPE_NUMERICFIELD, ITEM_TYPE_SLIDER, ITEM_TYPE_TEXT, ITEM_TYPE_YESNO, menuDef_t::itemCount, itemDef_t, menuDef_t::items, Leaving_EditField(), Menu_SetNextCursorItem(), Menu_SetPrevCursorItem(), Menus_HandleOOBClick(), NULL, menuDef_t::onAccept, menuDef_t::onESC, itemDef_s::parent, qboolean, qfalse, qtrue, windowDef_t::rect, Rect_ContainsPoint(), displayContextDef_t::setOverstrikeMode, itemDef_s::type, itemDef_s::window, menuDef_t::window, WINDOW_HASFOCUS, and WINDOW_POPUP. Referenced by _UI_KeyEvent(), Display_HandleKey(), and Menus_HandleOOBClick().
04490 {
04491 int i;
04492 itemDef_t *item = NULL;
04493 qboolean inHandler = qfalse;
04494
04495 if (inHandler) {
04496 return;
04497 }
04498
04499 inHandler = qtrue;
04500 if (g_waitingForKey && down) {
04501 Item_Bind_HandleKey(g_bindItem, key, down);
04502 inHandler = qfalse;
04503 return;
04504 }
04505
04506 if (g_editingField && down)
04507 {
04508 if (!Item_TextField_HandleKey(g_editItem, key))
04509 {
04510 g_editingField = qfalse;
04511 g_editItem = NULL;
04512 inHandler = qfalse;
04513 return;
04514 }
04515 else if (key == A_MOUSE1 || key == A_MOUSE2 || key == A_MOUSE3)
04516 {
04517 // switching fields so reset printed text of edit field
04518 Leaving_EditField(g_editItem);
04519 g_editingField = qfalse;
04520 g_editItem = NULL;
04521 Display_MouseMove(NULL, DC->cursorx, DC->cursory);
04522 }
04523 else if (key == A_TAB || key == A_CURSOR_UP || key == A_CURSOR_DOWN)
04524 {
04525 return;
04526 }
04527 }
04528
04529 if (menu == NULL) {
04530 inHandler = qfalse;
04531 return;
04532 }
04533 //JLFMOUSE
04534 // see if the mouse is within the window bounds and if so is this a mouse click
04535 #ifndef _XBOX
04536 if (down && !(menu->window.flags & WINDOW_POPUP) && !Rect_ContainsPoint(&menu->window.rect, DC->cursorx, DC->cursory))
04537 #else
04538 if (down)
04539 #endif
04540 {
04541 static qboolean inHandleKey = qfalse;
04542 // bk001206 - parentheses
04543 if (!inHandleKey && ( key == A_MOUSE1 || key == A_MOUSE2 || key == A_MOUSE3 ) ) {
04544 inHandleKey = qtrue;
04545 Menus_HandleOOBClick(menu, key, down);
04546 inHandleKey = qfalse;
04547 inHandler = qfalse;
04548 return;
04549 }
04550 }
04551
04552 // get the item with focus
04553 for (i = 0; i < menu->itemCount; i++) {
04554 if (menu->items[i]->window.flags & WINDOW_HASFOCUS) {
04555 item = menu->items[i];
04556 }
04557 }
04558
04559 // Ignore if disabled
04560 if (item && item->disabled)
04561 {
04562 return;
04563 }
04564
04565 if (item != NULL) {
04566 if (Item_HandleKey(item, key, down))
04567 {
04568
04569 #ifdef _XBOX
04570 if (key == A_MOUSE1 || key == A_MOUSE2 ||(item->type == ITEM_TYPE_MULTI && (key == A_CURSOR_RIGHT || key == A_CURSOR_LEFT)))
04571 {
04572 #endif
04573 // It is possible for an item to be disable after Item_HandleKey is run (like in Voice Chat)
04574 if (!item->disabled)
04575 {
04576 Item_Action(item);
04577 }
04578 #ifdef _XBOX
04579 }
04580 #endif
04581 inHandler = qfalse;
04582 return;
04583 }
04584 }
04585
04586 if (!down) {
04587 inHandler = qfalse;
04588 return;
04589 }
04590
04591 // default handling
04592 switch ( key ) {
04593
04594 case A_F11:
04595 if (DC->getCVarValue("developer")) {
04596 debugMode ^= 1;
04597 }
04598 break;
04599
04600 case A_F12:
04601 if (DC->getCVarValue("developer")) {
04602 DC->executeText(EXEC_APPEND, "screenshot\n");
04603 }
04604 break;
04605 case A_KP_8:
04606 case A_CURSOR_UP:
04607 Menu_SetPrevCursorItem(menu);
04608 break;
04609
04610 case A_ESCAPE:
04611 if (!g_waitingForKey && menu->onESC) {
04612 itemDef_t it;
04613 it.parent = menu;
04614 Item_RunScript(&it, menu->onESC);
04615 }
04616 g_waitingForKey = qfalse;
04617 break;
04618 case A_TAB:
04619 case A_KP_2:
04620 case A_CURSOR_DOWN:
04621 Menu_SetNextCursorItem(menu);
04622 break;
04623
04624 case A_MOUSE1:
04625 case A_MOUSE2:
04626 if (item) {
04627 if (item->type == ITEM_TYPE_TEXT) {
04628 //JLFMOUSE
04629 #ifndef _XBOX
04630 if (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory))
04631 #endif
04632 {
04633 Item_Action(item);
04634 }
04635 } else if (item->type == ITEM_TYPE_EDITFIELD || item->type == ITEM_TYPE_NUMERICFIELD) {
04636 //JLFMOUSE
04637 #ifndef _XBOX
04638 if (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory))
04639 #endif
04640 {
04641 Item_Action(item);
04642 item->cursorPos = 0;
04643 g_editingField = qtrue;
04644 g_editItem = item;
04645 DC->setOverstrikeMode(qtrue);
04646 }
04647 }
04648
04649 //JLFACCEPT
04650 // add new types here as needed
04651 /* Notes:
04652 Most controls will use the dpad to move through the selection possibilies. Buttons are the only exception.
04653 Buttons will be assumed to all be on one menu together. If the start or A button is pressed on a control focus, that
04654 means that the menu is accepted and move onto the next menu. If the start or A button is pressed on a button focus it
04655 should just process the action and not support the accept functionality.
04656 */
04657
04658 //JLFACCEPT MPMOVED
04659 else if ( item->type == ITEM_TYPE_MULTI || item->type == ITEM_TYPE_YESNO || item->type == ITEM_TYPE_SLIDER)
04660 {
04661 if (Item_HandleAccept(item))
04662 {
04663 //Item processed it overriding the menu processing
04664 return;
04665 }
04666 else if (menu->onAccept)
04667 {
04668 itemDef_t it;
04669 it.parent = menu;
04670 Item_RunScript(&it, menu->onAccept);
04671 }
04672 }
04673 //END JLFACCEPT
04674 else {
04675 //JLFMOUSE
04676 #ifndef _XBOX
04677 if (Rect_ContainsPoint(&item->window.rect, DC->cursorx, DC->cursory))
04678 #endif
04679 {
04680
04681 Item_Action(item);
04682 }
04683 }
04684 }
04685 break;
04686
04687 case A_JOY0:
04688 case A_JOY1:
04689 case A_JOY2:
04690 case A_JOY3:
04691 case A_JOY4:
04692 case A_AUX0:
04693 case A_AUX1:
04694 case A_AUX2:
04695 case A_AUX3:
04696 case A_AUX4:
04697 case A_AUX5:
04698 case A_AUX6:
04699 case A_AUX7:
04700 case A_AUX8:
04701 case A_AUX9:
04702 case A_AUX10:
04703 case A_AUX11:
04704 case A_AUX12:
04705 case A_AUX13:
04706 case A_AUX14:
04707 case A_AUX15:
04708 case A_AUX16:
04709 break;
04710 case A_KP_ENTER:
04711 case A_ENTER:
04712 if (item) {
04713 if (item->type == ITEM_TYPE_EDITFIELD || item->type == ITEM_TYPE_NUMERICFIELD) {
04714 item->cursorPos = 0;
04715 g_editingField = qtrue;
04716 g_editItem = item;
04717 DC->setOverstrikeMode(qtrue);
04718 } else {
04719 Item_Action(item);
04720 }
04721 }
04722 break;
04723 }
04724 inHandler = qfalse;
04725 }
|
|
||||||||||||||||
|
Definition at line 7126 of file ui_shared.c. References CVAR_DISABLE, CVAR_ENABLE, CVAR_HIDE, CVAR_SHOW, itemDef_s::cvarFlags, itemDef_s::disabled, windowDef_t::flags, IsVisible(), Item_EnableShowViaCvar(), Item_MouseEnter(), Item_MouseLeave(), Item_SetFocus(), Item_SetMouseOver(), ITEM_TYPE_TEXT, menuDef_t::itemCount, itemDef_t, menuDef_t::items, NULL, qboolean, qfalse, windowDef_t::rect, Rect_ContainsPoint(), itemDef_s::text, itemDef_s::type, itemDef_s::window, menuDef_t::window, WINDOW_FORCED, WINDOW_MOUSEOVER, and WINDOW_VISIBLE. Referenced by Display_MouseMove(), Menu_SetNextCursorItem(), Menu_SetPrevCursorItem(), Menus_ActivateByName(), and Menus_HandleOOBClick().
07126 {
07127
07128 //JLFMOUSE I THINK THIS JUST SETS THE FOCUS BASED ON THE MOUSE
07129 #ifdef _XBOX
07130 return ;
07131 #endif
07132 //END JLF
07133
07134
07135 int i, pass;
07136 qboolean focusSet = qfalse;
07137
07138 itemDef_t *overItem;
07139 if (menu == NULL) {
07140 return;
07141 }
07142
07143 if (!(menu->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED))) {
07144 return;
07145 }
07146
07147 if (itemCapture) {
07148 //Item_MouseMove(itemCapture, x, y);
07149 return;
07150 }
07151
07152 if (g_waitingForKey || g_editingField) {
07153 return;
07154 }
07155
07156 // FIXME: this is the whole issue of focus vs. mouse over..
07157 // need a better overall solution as i don't like going through everything twice
07158 for (pass = 0; pass < 2; pass++) {
07159 for (i = 0; i < menu->itemCount; i++) {
07160 // turn off focus each item
07161 // menu->items[i].window.flags &= ~WINDOW_HASFOCUS;
07162
07163 if (!(menu->items[i]->window.flags & (WINDOW_VISIBLE | WINDOW_FORCED))) {
07164 continue;
07165 }
07166
07167 if (menu->items[i]->disabled)
07168 {
07169 continue;
07170 }
07171
07172 // items can be enabled and disabled based on cvars
07173 if (menu->items[i]->cvarFlags & (CVAR_ENABLE | CVAR_DISABLE) && !Item_EnableShowViaCvar(menu->items[i], CVAR_ENABLE)) {
07174 continue;
07175 }
07176
07177 if (menu->items[i]->cvarFlags & (CVAR_SHOW | CVAR_HIDE) && !Item_EnableShowViaCvar(menu->items[i], CVAR_SHOW)) {
07178 continue;
07179 }
07180
07181
07182
07183 if (Rect_ContainsPoint(&menu->items[i]->window.rect, x, y)) {
07184 if (pass == 1) {
07185 overItem = menu->items[i];
07186 if (overItem->type == ITEM_TYPE_TEXT && overItem->text) {
07187 if (!Rect_ContainsPoint(&overItem->window.rect, x, y)) {
07188 continue;
07189 }
07190 }
07191 // if we are over an item
07192 if (IsVisible(overItem->window.flags)) {
07193 // different one
07194 Item_MouseEnter(overItem, x, y);
07195 // Item_SetMouseOver(overItem, qtrue);
07196
07197 // if item is not a decoration see if it can take focus
07198 if (!focusSet) {
07199 focusSet = Item_SetFocus(overItem, x, y);
07200 }
07201 }
07202 }
07203 } else if (menu->items[i]->window.flags & WINDOW_MOUSEOVER) {
07204 Item_MouseLeave(menu->items[i]);
07205 Item_SetMouseOver(menu->items[i], qfalse);
07206 }
07207 }
07208 }
07209
07210 }
|
|
|
Definition at line 7015 of file ui_shared.c. References displayContextDef_t::Assets, menuDef_t::cursorItem, DC, cachedAssets_t::fadeAmount, menuDef_t::fadeAmount, cachedAssets_t::fadeClamp, menuDef_t::fadeClamp, cachedAssets_t::fadeCycle, menuDef_t::fadeCycle, memset(), menuDef_t::window, and Window_Init(). Referenced by Menu_New().
07015 {
07016 memset(menu, 0, sizeof(menuDef_t));
07017 menu->cursorItem = -1;
07018 menu->fadeAmount = DC->Assets.fadeAmount;
07019 menu->fadeClamp = DC->Assets.fadeClamp;
07020 menu->fadeCycle = DC->Assets.fadeCycle;
07021 Window_Init(&menu->window);
07022 }
|
|
|
Definition at line 9817 of file ui_shared.c. References MAX_MENUS, Menu_Init(), Menu_Parse(), Menu_PostParse(), menuCount, and Menus. Referenced by CG_ParseMenu(), and UI_ParseMenu().
09817 {
09818 menuDef_t *menu = &Menus[menuCount];
09819
09820 if (menuCount < MAX_MENUS) {
09821 Menu_Init(menu);
09822 if (Menu_Parse(handle, menu)) {
09823 Menu_PostParse(menu);
09824 menuCount++;
09825 }
09826 }
09827 }
|
|
||||||||||||
|
Definition at line 7212 of file ui_shared.c. References menuDef_t::appearanceCnt, menuDef_t::appearanceIncrement, itemDef_s::appearanceSlot, menuDef_t::appearanceTime, windowDef_t::background, DC, displayContextDef_t::drawHandlePic, displayContextDef_t::drawRect, menuDef_t::fadeAmount, menuDef_t::fadeClamp, menuDef_t::fadeCycle, windowDef_t::flags, menuDef_t::fullScreen, rectDef_t::h, Item_Paint(), menuDef_t::itemCount, menuDef_t::items, NULL, windowDef_t::ownerDrawFlags, displayContextDef_t::ownerDrawVisible, displayContextDef_t::realTime, windowDef_t::rect, SCREEN_HEIGHT, SCREEN_WIDTH, vec4_t, rectDef_t::w, menuDef_t::window, WINDOW_FORCED, Window_Paint(), WINDOW_VISIBLE, rectDef_t::x, and rectDef_t::y. Referenced by Menu_PaintAll(), and UI_DrawConnectScreen().
07212 {
07213 int i;
07214
07215 if (menu == NULL) {
07216 return;
07217 }
07218
07219 if (!(menu->window.flags & WINDOW_VISIBLE) && !forcePaint) {
07220 return;
07221 }
07222
07223 if (menu->window.ownerDrawFlags && DC->ownerDrawVisible && !DC->ownerDrawVisible(menu->window.ownerDrawFlags)) {
07224 return;
07225 }
07226
07227 if (forcePaint) {
07228 menu->window.flags |= WINDOW_FORCED;
07229 }
07230
07231 // draw the background if necessary
07232 if (menu->fullScreen) {
07233 // implies a background shader
07234 // FIXME: make sure we have a default shader if fullscreen is set with no background
07235 DC->drawHandlePic( 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, menu->window.background );
07236 } else if (menu->window.background) {
07237 // this allows a background shader without being full screen
07238 //UI_DrawHandlePic(menu->window.rect.x, menu->window.rect.y, menu->window.rect.w, menu->window.rect.h, menu->backgroundShader);
07239 }
07240
07241 // paint the background and or border
07242 Window_Paint(&menu->window, menu->fadeAmount, menu->fadeClamp, menu->fadeCycle );
07243
07244 // Loop through all items for the menu and paint them
07245 for (i = 0; i < menu->itemCount; i++)
07246 {
07247 if (!menu->items[i]->appearanceSlot)
07248 {
07249 Item_Paint(menu->items[i]);
07250 }
07251 else // Timed order of appearance
07252 {
07253 if (menu->appearanceTime < DC->realTime) // Time to show another item
07254 {
07255 menu->appearanceTime = DC->realTime + menu->appearanceIncrement;
07256 menu->appearanceCnt++;
07257 }
07258
07259 if (menu->items[i]->appearanceSlot<=menu->appearanceCnt)
07260 {
07261 Item_Paint(menu->items[i]);
07262 }
07263 }
07264 }
07265
07266 if (debugMode) {
07267 vec4_t color;
07268 color[0] = color[2] = color[3] = 1;
07269 color[1] = 0;
07270 DC->drawRect(menu->window.rect.x, menu->window.rect.y, menu->window.rect.w, menu->window.rect.h, 1, color);
07271 }
07272 }
|
|
|
Definition at line 9833 of file ui_shared.c. References displayContextDef_t::cursorx, displayContextDef_t::cursory, DC, displayContextDef_t::drawText, displayContextDef_t::FPS, Menu_Count(), Menu_Paint(), Menus, qfalse, va(), and vec4_t. Referenced by _UI_Refresh().
09833 {
09834 int i;
09835 if (captureFunc) {
09836 captureFunc(captureData);
09837 }
09838
09839 for (i = 0; i < Menu_Count(); i++) {
09840 Menu_Paint(&Menus[i], qfalse);
09841 }
09842
09843 if (debugMode) {
09844 vec4_t v = {1, 1, 1, 1};
09845 DC->drawText(5, 25, .75, v, va("fps: %f", DC->FPS), 0, 0, 0, 0);
09846 DC->drawText(5, 45, .75, v, va("x: %d y:%d", DC->cursorx,DC->cursory), 0, 0, 0, 0);
09847 }
09848 }
|
|
|
Definition at line 979 of file ui_shared.c. References menuDef_t::fullScreen, rectDef_t::h, Menu_UpdatePosition(), NULL, windowDef_t::rect, rectDef_t::w, menuDef_t::window, rectDef_t::x, and rectDef_t::y. Referenced by Menu_New().
|
|
|
Definition at line 9850 of file ui_shared.c. References menuCount.
09850 {
09851 menuCount = 0;
09852 }
|
|
||||||||||||||||
|
Definition at line 7046 of file ui_shared.c. References A_CURSOR_DOWN, A_CURSOR_UP, Item_ListBox_HandleKey(), menuDef_t::itemCount, menuDef_t::items, qtrue, and itemDef_s::special.
07046 {
07047 if (menu) {
07048 int i;
07049 for (i = 0; i < menu->itemCount; i++) {
07050 if (menu->items[i]->special == feeder) {
07051 Item_ListBox_HandleKey(menu->items[i], (down) ? A_CURSOR_DOWN : A_CURSOR_UP, qtrue, qtrue);
07052 return;
07053 }
07054 }
07055 }
07056 }
|
|
||||||||||||||||||||
|
Definition at line 7060 of file ui_shared.c. References itemDef_s::cursorPos, listBoxDef_s::cursorPos, DC, displayContextDef_t::feederSelection, menuDef_t::itemCount, menuDef_t::items, listBoxDef_t, Menu_GetFocused(), Menus_FindByName(), name, NULL, itemDef_s::special, listBoxDef_s::startPos, and itemDef_s::typeData. Referenced by CG_SetScoreSelection(), UI_FeederSelection(), UI_ForceSide_HandleKey(), UI_SaveForceTemplate(), UI_SetSiegeTeams(), and UI_UpdateCvarsForClass().
07060 {
07061 if (menu == NULL) {
07062 if (name == NULL) {
07063 menu = Menu_GetFocused();
07064 } else {
07065 menu = Menus_FindByName(name);
07066 }
07067 }
07068
07069 if (menu) {
07070 int i;
07071 for (i = 0; i < menu->itemCount; i++) {
07072 if (menu->items[i]->special == feeder) {
07073 if (index == 0) {
07074 listBoxDef_t *listPtr = (listBoxDef_t*)menu->items[i]->typeData;
07075 listPtr->cursorPos = 0;
07076 listPtr->startPos = 0;
07077 }
07078 menu->items[i]->cursorPos = index;
07079 DC->feederSelection(menu->items[i]->special, menu->items[i]->cursorPos, NULL);
07080 return;
07081 }
07082 }
07083 }
07084 }
|
|
||||||||||||||||
|
Definition at line 2231 of file ui_shared.c. References windowDef_t::background, DC, itemDef_t, Menu_GetMatchingItemByNumber(), Menu_ItemsMatchingGroup(), NULL, displayContextDef_t::registerShaderNoMip, and itemDef_s::window. Referenced by Script_SetItemBackground(), UI_UpdateSiegeObjectiveGraphics(), and UI_UpdateSiegeStatusIcons().
02232 {
02233 itemDef_t *item;
02234 int j, count;
02235
02236 if (!menu) // No menu???
02237 {
02238 return;
02239 }
02240
02241 count = Menu_ItemsMatchingGroup( (menuDef_t *) menu, itemName);
02242
02243 for (j = 0; j < count; j++)
02244 {
02245 item = Menu_GetMatchingItemByNumber( (menuDef_t *) menu, j, itemName);
02246 if (item != NULL)
02247 {
02248 item->window.background = DC->registerShaderNoMip(background);
02249 }
02250 }
02251 }
|
|
|
Definition at line 4416 of file ui_shared.c. References menuDef_t::appearanceTime, DC, windowDef_t::flags, Item_RunScript(), itemDef_t, menuDef_t::onOpen, itemDef_s::parent, qfalse, displayContextDef_t::setCVar, menuDef_t::soundName, displayContextDef_t::startBackgroundTrack, menuDef_t::window, WINDOW_HASFOCUS, and WINDOW_VISIBLE. Referenced by Menus_ActivateByName(), Menus_HandleOOBClick(), and Menus_ShowByName().
04416 {
04417
04418 //JLFCALLOUT MPMOVED
04419 #ifdef _XBOX
04420 DC->setCVar("ui_hideAcallout" ,"0");
04421 DC->setCVar("ui_hideBcallout" ,"0");
04422 DC->setCVar("ui_hideCcallout" ,"0");
04423 #endif
04424 //JLF END
04425 menu->window.flags |= (WINDOW_HASFOCUS | WINDOW_VISIBLE);
04426 if (menu->onOpen) {
04427 itemDef_t item;
04428 item.parent = menu;
04429 Item_RunScript(&item, menu->onOpen);
04430 }
04431
04432 if (menu->soundName && *menu->soundName) {
04433 // DC->stopBackgroundTrack(); // you don't want to do this since it will reset s_rawend
04434 DC->startBackgroundTrack(menu->soundName, menu->soundName, qfalse);
04435 }
04436
04437 menu->appearanceTime = 0;
04438 Display_CloseCinematics();
04439
04440 }
|
|
|
Definition at line 7096 of file ui_shared.c. References displayContextDef_t::cursorx, displayContextDef_t::cursory, DC, windowDef_t::flags, MAX_OPEN_MENUS, Menu_GetFocused(), Menu_HandleMouseMove(), menuCount, Menus, Menus_Activate(), menuStack, NULL, openMenuCount, Q_stricmp(), menuDef_t::window, and WINDOW_HASFOCUS. Referenced by _UI_SetActiveMenu(), Menus_OpenByName(), UI_ConsoleCommand(), and UI_Load().
07096 {
07097 int i;
07098 menuDef_t *m = NULL;
07099 menuDef_t *focus = Menu_GetFocused();
07100 for (i = 0; i < menuCount; i++) {
07101 if (Q_stricmp(Menus[i].window.name, p) == 0) {
07102 m = &Menus[i];
07103 Menus_Activate(m);
07104 if (openMenuCount < MAX_OPEN_MENUS && focus != NULL) {
07105 menuStack[openMenuCount++] = focus;
07106 }
07107 } else {
07108 Menus[i].window.flags &= ~WINDOW_HASFOCUS;
07109 }
07110 }
07111 Display_CloseCinematics();
07112
07113 // Want to handle a mouse move on the new menu in case your already over an item
07114 Menu_HandleMouseMove ( m, DC->cursorx, DC->cursory );
07115
07116 return m;
07117 }
|
|
|
Definition at line 7086 of file ui_shared.c. References windowDef_t::flags, menuDef_t::fullScreen, menuCount, Menus, qboolean, qfalse, qtrue, menuDef_t::window, and WINDOW_VISIBLE. Referenced by _UI_IsFullscreen(), and _UI_KeyEvent().
07086 {
07087 int i;
07088 for (i = 0; i < menuCount; i++) {
07089 if (Menus[i].window.flags & WINDOW_VISIBLE && Menus[i].fullScreen) {
07090 return qtrue;
07091 }
07092 }
07093 return qfalse;
07094 }
|
|
|
Definition at line 1573 of file ui_shared.c. References windowDef_t::flags, FPMessageTime, menuCount, Menus, openMenuCount, qfalse, menuDef_t::window, WINDOW_HASFOCUS, and WINDOW_VISIBLE. Referenced by _UI_Init(), _UI_KeyEvent(), _UI_SetActiveMenu(), Script_Close(), UI_ConsoleCommand(), and UI_Load().
01574 {
01575 int i;
01576
01577 g_waitingForKey = qfalse;
01578
01579 for (i = 0; i < menuCount; i++)
01580 {
01581 Menu_RunCloseScript ( &Menus[i] );
01582 Menus[i].window.flags &= ~(WINDOW_HASFOCUS | WINDOW_VISIBLE);
01583 }
01584
01585 // Clear the menu stack
01586 openMenuCount = 0;
01587
01588 FPMessageTime = 0;
01589 }
|
|
|
Definition at line 1535 of file ui_shared.c. References windowDef_t::flags, Menus_FindByName(), menuStack, NULL, openMenuCount, menuDef_t::window, WINDOW_HASFOCUS, and WINDOW_VISIBLE. Referenced by CG_DrawTimedMenus(), CG_HideTeamMenu(), and Script_Close().
01536 {
01537 menuDef_t *menu = Menus_FindByName(p);
01538
01539 // If the menu wasnt found just exit
01540 if (menu == NULL)
01541 {
01542 return;
01543 }
01544
01545 // Run the close script for the menu
01546 Menu_RunCloseScript(menu);
01547
01548 // If this window had the focus then take it away
01549 if ( menu->window.flags & WINDOW_HASFOCUS )
01550 {
01551 // If there is something still in the open menu list then
01552 // set it to have focus now
01553 if ( openMenuCount )
01554 {
01555 // Subtract one from the open menu count to prepare to
01556 // remove the top menu from the list
01557 openMenuCount -= 1;
01558
01559 // Set the top menu to have focus now
01560 menuStack[openMenuCount]->window.flags |= WINDOW_HASFOCUS;
01561
01562 // Remove the top menu from the list
01563 menuStack[openMenuCount] = NULL;
01564 }
01565 }
01566
01567 // Window is now invisible and doenst have focus
01568 menu->window.flags &= ~(WINDOW_VISIBLE | WINDOW_HASFOCUS);
01569 }
|
|
|
Definition at line 1506 of file ui_shared.c. References menuCount, Menus, NULL, and Q_stricmp(). Referenced by CG_DrawHUD(), CG_DrawVehicleDamageHUD(), CG_DrawVehicleHud(), Menu_SetFeederSelection(), Menus_CloseByName(), Menus_ShowByName(), UI_DrawConnectScreen(), UI_FeederSelection(), UpdateForceStatus(), and UpdateForceUsed().
|
|
|
Definition at line 1523 of file ui_shared.c. References Menus_ActivateByName(). Referenced by CG_ShowResponseHead(), CG_ShowTeamMenu(), and Script_Open().
01523 {
01524 Menus_ActivateByName(p);
01525 }
|
|
|
Definition at line 1516 of file ui_shared.c. References Menus_Activate(), and Menus_FindByName().
01516 {
01517 menuDef_t *menu = Menus_FindByName(p);
01518 if (menu) {
01519 Menus_Activate(menu);
01520 }
01521 }
|
|
||||||||||||
|
Definition at line 510 of file ui_shared.c. References PC_Float_Parse(), qboolean, qfalse, qtrue, and vec4_t. Referenced by Asset_Parse(), CG_Asset_Parse(), ItemParse_addColorRange(), ItemParse_outlinecolor(), and MenuParse_outlinecolor().
00510 {
00511 int i;
00512 float f;
00513
00514 for (i = 0; i < 4; i++) {
00515 if (!PC_Float_Parse(handle, &f)) {
00516 return qfalse;
00517 }
00518 (*c)[i] = f;
00519 }
00520 return qtrue;
00521 }
|
|
||||||||||||
|
||||||||||||
|
||||||||||||
|
Definition at line 589 of file ui_shared.c. References rectDef_t::h, PC_Float_Parse(), qboolean, qfalse, qtrue, rectDef_t::w, rectDef_t::x, and rectDef_t::y. Referenced by ItemParse_rect(), and MenuParse_rect().
00589 {
00590 if (PC_Float_Parse(handle, &r->x)) {
00591 if (PC_Float_Parse(handle, &r->y)) {
00592 if (PC_Float_Parse(handle, &r->w)) {
00593 if (PC_Float_Parse(handle, &r->h)) {
00594 return qtrue;
00595 }
00596 }
00597 }
00598 }
00599 return qfalse;
00600 }
|
|
||||||||||||
|
Definition at line 650 of file ui_shared.c. References pc_token_t, Q_strcat(), Q_stricmp(), qboolean, qfalse, qtrue, pc_token_s::string, String_Alloc(), trap_PC_ReadToken(), and va(). Referenced by Asset_Parse(), ItemParse_action(), ItemParse_disableCvar(), ItemParse_doubleClick(), ItemParse_enableCvar(), ItemParse_hideCvar(), ItemParse_leaveFocus(), ItemParse_mouseEnter(), ItemParse_mouseEnterText(), ItemParse_mouseExit(), ItemParse_mouseExitText(), ItemParse_onFocus(), ItemParse_showCvar(), MenuParse_onAccept(), MenuParse_onClose(), MenuParse_onESC(), and MenuParse_onOpen().
00650 {
00651 char script[2048];
00652 pc_token_t token;
00653
00654 script[0] = 0;
00655 // scripts start with { and have ; separated command lists.. commands are command, arg..
00656 // basically we want everything between the { } as it will be interpreted at run time
00657
00658 if (!trap_PC_ReadToken(handle, &token))
00659 return qfalse;
00660 if (Q_stricmp(token.string, "{") != 0) {
00661 return qfalse;
00662 }
00663
00664 while ( 1 ) {
00665 if (!trap_PC_ReadToken(handle, &token))
00666 return qfalse;
00667
00668 if (Q_stricmp(token.string, "}") == 0) {
00669 *out = String_Alloc(script);
00670 return qtrue;
00671 }
00672
00673 if (token.string[1] != '\0') {
00674 Q_strcat(script, 2048, va("\"%s\"", token.string));
00675 } else {
00676 Q_strcat(script, 2048, token.string);
00677 }
00678 Q_strcat(script, 2048, " ");
00679 }
00680 return qfalse; // bk001105 - LCC missing return value
00681 }
|
|
||||||||||||
|
Definition at line 623 of file ui_shared.c. References pc_token_t, Q_stricmp(), qboolean, qfalse, qtrue, pc_token_s::string, String_Alloc(), and trap_PC_ReadToken(). Referenced by Asset_Parse(), CG_Asset_Parse(), ItemParse_cinematic(), ItemParse_cvar(), ItemParse_cvarFloat(), ItemParse_cvarFloatList(), ItemParse_cvarStrList(), ItemParse_cvarTest(), ItemParse_descText(), ItemParse_group(), ItemParse_name(), ItemParse_text(), ItemParse_text2(), MenuParse_cinematic(), MenuParse_font(), MenuParse_name(), and MenuParse_soundLoop().
00624 {
00625 static char* squiggy = "}";
00626 pc_token_t token;
00627
00628 if (!trap_PC_ReadToken(handle, &token))
00629 {
00630 return qfalse;
00631 }
00632
00633 // Save some memory by not return the end squiggy as an allocated string
00634 if ( !Q_stricmp ( token.string, "}" ) )
00635 {
00636 *(out) = squiggy;
00637 }
00638 else
00639 {
00640 *(out) = String_Alloc(token.string);
00641 }
00642 return qtrue;
00643 }
|
|
||||||||||||
|
Definition at line 571 of file ui_shared.c. References Float_Parse(), rectDef_t::h, qboolean, qfalse, qtrue, rectDef_t::w, rectDef_t::x, and rectDef_t::y. Referenced by Script_SetItemRect(), and Script_Transition().
00571 {
00572 if (Float_Parse(p, &r->x)) {
00573 if (Float_Parse(p, &r->y)) {
00574 if (Float_Parse(p, &r->w)) {
00575 if (Float_Parse(p, &r->h)) {
00576 return qtrue;
00577 }
00578 }
00579 }
00580 }
00581 return qfalse;
00582 }
|
|
||||||||||||
|
|
|
|
Definition at line 291 of file ui_shared.c. References stringDef_s::next, NULL, stringDef_s::str, strcmp(), strcpy(), STRING_POOL_SIZE, stringDef_t, strlen(), and UI_Alloc(). Referenced by ItemParse_cvarStrList(), PC_Script_Parse(), PC_String_Parse(), String_Parse(), UI_LoadArenas(), and UI_SaberGetHiltInfo().
00291 {
00292 int len;
00293 long hash;
00294 stringDef_t *str, *last;
00295 static const char *staticNULL = "";
00296
00297 if (p == NULL) {
00298 return NULL;
00299 }
00300
00301 if (*p == 0) {
00302 return staticNULL;
00303 }
00304
00305 hash = hashForString(p);
00306
00307 str = strHandle[hash];
00308 while (str) {
00309 if (strcmp(p, str->str) == 0) {
00310 return str->str;
00311 }
00312 str = str->next;
00313 }
00314
00315 len = strlen(p);
00316 if (len + strPoolIndex + 1 < STRING_POOL_SIZE) {
00317 int ph = strPoolIndex;
00318 strcpy(&strPool[strPoolIndex], p);
00319 strPoolIndex += len + 1;
00320
00321 str = strHandle[hash];
00322 last = str;
00323 while (last && last->next)
00324 {
00325 last = last->next;
00326 }
00327
00328 str = (stringDef_t *) UI_Alloc(sizeof(stringDef_t));
00329 str->next = NULL;
00330 str->str = &strPool[ph];
00331 if (last) {
00332 last->next = str;
00333 } else {
00334 strHandle[hash] = str;
00335 }
00336 return &strPool[ph];
00337 }
00338
00339 //Increase STRING_POOL_SIZE.
00340 assert(0);
00341 return NULL;
00342 }
|
|
|
Definition at line 363 of file ui_shared.c. References Controls_GetConfig(), DC, displayContextDef_t::getBindingBuf, HASH_TABLE_SIZE, Item_SetupKeywordHash(), Menu_SetupKeywordHash(), menuCount, openMenuCount, and UI_InitMemory(). Referenced by _UI_Init(), CG_Init(), and UI_Load().
00363 {
00364 int i;
00365 for (i = 0; i < HASH_TABLE_SIZE; i++) {
00366 strHandle[i] = 0;
00367 }
00368 strHandleCount = 0;
00369 strPoolIndex = 0;
00370 menuCount = 0;
00371 openMenuCount = 0;
00372 UI_InitMemory();
00373 Item_SetupKeywordHash();
00374 Menu_SetupKeywordHash();
00375 if (DC && DC->getBindingBuf) {
00376 Controls_GetConfig();
00377 }
00378 }
|
|
||||||||||||
|
|
Definition at line 344 of file ui_shared.c. References Com_Printf(), MEM_POOL_SIZE, and STRING_POOL_SIZE. Referenced by UI_Report().
00344 {
00345 float f;
00346 Com_Printf("Memory/String Pool Info\n");
00347 Com_Printf("----------------\n");
00348 f = strPoolIndex;
00349 f /= STRING_POOL_SIZE;
00350 f *= 100;
00351 Com_Printf("String Pool is %.1f%% full, %i bytes out of %i used.\n", f, strPoolIndex, STRING_POOL_SIZE);
00352 f = allocPoint;
00353 f /= MEM_POOL_SIZE;
00354 f *= 100;
00355 Com_Printf("Memory Pool is %.1f%% full, %i bytes out of %i used.\n", f, allocPoint, MEM_POOL_SIZE);
00356 }
|
|
||||||||||||||||
|
Definition at line 317 of file cg_syscalls.c. References CG_ANYLANGUAGE_READCHARFROMSTRING, and UI_ANYLANGUAGE_READCHARFROMSTRING.
00318 {
00319 return syscall( CG_ANYLANGUAGE_READCHARFROMSTRING, psText, piAdvanceCount, pbIsTrailingPunctuation);
00320 }
|
|
|
Definition at line 786 of file cg_syscalls.c. References CG_G2_HAVEWEGHOULMODELS, qboolean, and UI_G2_HAVEWEGHOULMODELS. Referenced by CG_DestroyAllGhoul2(), CG_EntityEvent(), CG_GetClientWeaponMuzzleBoltPoint(), CG_LoadClientInfo(), CG_NewClientInfo(), CG_Player(), CG_ResetPlayerEntity(), CG_SetInitialSnapshot(), ClientDisconnect(), ClientThink_real(), G_FreeEntity(), G_ShutdownGame(), SetupGameGhoul2Model(), and UI_CleanupGhoul2().
00787 {
00788 return (qboolean)(syscall(CG_G2_HAVEWEGHOULMODELS, ghoul2));
00789 }
|
|
||||||||||||
|
Definition at line 776 of file cg_syscalls.c. References CG_G2_LISTBONES, and UI_G2_LISTBONES.
00777 {
00778 syscall( CG_G2_LISTBONES, ghlInfo, frame);
00779 }
|
|
|
Definition at line 771 of file cg_syscalls.c. References CG_G2_LISTSURFACES, and UI_G2_LISTSURFACES.
00772 {
00773 syscall( CG_G2_LISTSURFACES, ghlInfo);
00774 }
|
|
||||||||||||||||
|
Definition at line 781 of file cg_syscalls.c. References CG_G2_SETMODELS, qhandle_t, and UI_G2_SETMODELS.
00782 {
00783 syscall( CG_G2_SETMODELS, ghoul2, modelList, skinList);
00784 }
|
|
||||||||||||||||
|
||||||||||||||||
|
Definition at line 1003 of file cg_syscalls.c. References CG_G2_ANIMATEG2MODELS, and UI_G2_ANIMATEG2MODELS. Referenced by CG_RagDoll(), and strap_G2API_AnimateG2Models().
01004 {
01005 syscall(CG_G2_ANIMATEG2MODELS, ghoul2, time, params);
01006 }
|
|
||||||||||||||||||||||||
|
Definition at line 661 of file ui_syscalls.c. References qboolean, and UI_G2_ATTACHG2MODEL. Referenced by UI_SaberAttachToChar().
00662 {
00663 return syscall(UI_G2_ATTACHG2MODEL, ghoul2From, modelIndexFrom, ghoul2To, toBoltIndex, toModel);
00664 }
|
|
|
Definition at line 856 of file cg_syscalls.c. References CG_G2_CLEANMODELS, and UI_G2_CLEANMODELS. Referenced by BG_ModelCache(), CG_CacheG2AnimInfo(), CG_CleanJetpackGhoul2(), CG_CopyG2WeaponInstance(), CG_DestroyAllGhoul2(), CG_EntityEvent(), CG_G2AnimEntModelLoad(), CG_LoadClientInfo(), CG_NewClientInfo(), CG_Player(), CG_ShutDownG2Weapons(), ClientDisconnect(), G_FreeEntity(), G_SaberModelSetup(), G_ShutdownGame(), ItemParse_asset_model_go(), NPC_VehiclePrecache(), SetupGameGhoul2Model(), and UI_CleanupGhoul2().
00857 {
00858 syscall(CG_G2_CLEANMODELS, ghoul2Ptr);
00859 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 820 of file cg_syscalls.c. References CG_G2_COLLISIONDETECT, PASSFLOAT(), UI_G2_COLLISIONDETECT, and vec3_t. Referenced by CG_G2TraceCollide().
00834 {
00835 syscall ( CG_G2_COLLISIONDETECT, collRecMap, ghoul2, angles, position, frameNumber, entNum, rayStart, rayEnd, scale, traceFlags, useLod, PASSFLOAT(fRadius) );
00836 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 838 of file cg_syscalls.c. References CG_G2_COLLISIONDETECTCACHE, PASSFLOAT(), UI_G2_COLLISIONDETECTCACHE, and vec3_t. Referenced by CG_G2TraceCollide().
00852 {
00853 syscall ( CG_G2_COLLISIONDETECTCACHE, collRecMap, ghoul2, angles, position, frameNumber, entNum, rayStart, rayEnd, scale, traceFlags, useLod, PASSFLOAT(fRadius) );
00854 }
|
|
||||||||||||||||
|
Definition at line 890 of file cg_syscalls.c. References CG_G2_COPYGHOUL2INSTANCE, and UI_G2_COPYGHOUL2INSTANCE.
00891 {
00892 return syscall(CG_G2_COPYGHOUL2INSTANCE, g2From, g2To, modelIndex);
00893 }
|
|
||||||||||||||||||||
|
Definition at line 895 of file cg_syscalls.c. References CG_G2_COPYSPECIFICGHOUL2MODEL, and UI_G2_COPYSPECIFICGHOUL2MODEL. Referenced by CG_CopyG2WeaponInstance(), CG_Player(), G_SaberModelSetup(), and SetupGameGhoul2Model().
00896 {
00897 syscall(CG_G2_COPYSPECIFICGHOUL2MODEL, g2From, modelFrom, g2To, modelTo);
00898 }
|
|
||||||||||||
|
Definition at line 900 of file cg_syscalls.c. References CG_G2_DUPLICATEGHOUL2INSTANCE, and UI_G2_DUPLICATEGHOUL2INSTANCE. Referenced by CG_LoadClientInfo(), CG_NewClientInfo(), CG_Player(), CG_ResetPlayerEntity(), CG_SetInitialSnapshot(), and SetupGameGhoul2Model().
00901 {
00902 syscall(CG_G2_DUPLICATEGHOUL2INSTANCE, g2From, g2To);
00903 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 803 of file cg_syscalls.c. References CG_G2_GETBOLT_NOREC_NOROT, qboolean, qhandle_t, UI_G2_GETBOLT_NOREC_NOROT, and vec3_t. Referenced by CG_CalcEWebMuzzlePoint(), CG_CalcVehMuzzle(), CG_CheckPassengerTurretView(), strap_G2API_GetBoltMatrix_NoRecNoRot(), and WP_CalcVehMuzzle().
00805 { //Same as above but force it to not reconstruct the skeleton before getting the bolt position
00806 return (qboolean)(syscall(CG_G2_GETBOLT_NOREC_NOROT, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale));
00807 }
|
|
||||||||||||||||||||||||||||||||||||||||
|
Definition at line 797 of file cg_syscalls.c. References CG_G2_GETBOLT_NOREC, qboolean, qhandle_t, UI_G2_GETBOLT_NOREC, and vec3_t. Referenced by strap_G2API_GetBoltMatrix_NoReconstruct().
00799 { //Same as above but force it to not reconstruct the skeleton before getting the bolt position
00800 return (qboolean)(syscall(CG_G2_GETBOLT_NOREC, ghoul2, modelIndex, boltIndex, matrix, angles, position, frameNum, modelList, scale));
00801 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 874 of file cg_syscalls.c. References CG_G2_GETBONEANIM, qboolean, and UI_G2_GETBONEANIM. Referenced by CG_RagDoll(), and strap_G2API_GetBoneAnim().
00876 {
00877 return syscall(CG_G2_GETBONEANIM, ghoul2, boneName, currentTime, currentFrame, startFrame, endFrame, flags, animSpeed, modelList, modelIndex);
00878 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 880 of file cg_syscalls.c. References CG_G2_GETBONEFRAME, qboolean, and UI_G2_GETBONEFRAME. Referenced by CG_TriggerAnimSounds().
00881 {
00882 return syscall(CG_G2_GETBONEFRAME, ghoul2, boneName, currentTime, currentFrame, modelList, modelIndex);
00883 }
|
|
||||||||||||||||
|
Definition at line 885 of file cg_syscalls.c. References CG_G2_GETGLANAME, and UI_G2_GETGLANAME. Referenced by CG_CacheG2AnimInfo(), CG_G2AnimEntModelLoad(), CG_G2EvIndexForModel(), CG_G2SkelForModel(), ItemParse_asset_model_go(), NPC_VehiclePrecache(), and SetupGameGhoul2Model().
00886 {
00887 syscall(CG_G2_GETGLANAME, ghoul2, modelIndex, fillBuf);
00888 }
|
|
||||||||||||||||||||
|
Definition at line 1080 of file cg_syscalls.c. References CG_G2_GETSURFACENAME, and UI_G2_GETSURFACENAME. Referenced by G_CheckForDismemberment(), G_Damage(), and G_LocationBasedDamageModifier().
01081 {
01082 syscall(CG_G2_GETSURFACENAME, ghoul2, surfNumber, modelIndex, fillBuf);
01083 }
|
|
|
Definition at line 981 of file cg_syscalls.c. References CG_G2_GETTIME, and UI_G2_GETTIME.
00982 {
00983 return syscall(CG_G2_GETTIME);
00984 }
|
|
||||||||||||
|
Definition at line 905 of file cg_syscalls.c. References CG_G2_HASGHOUL2MODELONINDEX, qboolean, and UI_G2_HASGHOUL2MODELONINDEX. Referenced by CG_AddPlayerWeapon(), CG_CopyG2WeaponInstance(), CG_EntityEvent(), CG_GetClientWeaponMuzzleBoltPoint(), CG_Player(), UI_SaberAttachToChar(), and UI_SaberDrawBlade().
00906 {
00907 return syscall(CG_G2_HASGHOUL2MODELONINDEX, ghlInfo, modelIndex);
00908 }
|
|
||||||||||||||||
|
Definition at line 1045 of file cg_syscalls.c. References CG_G2_IKMOVE, qboolean, and UI_G2_IKMOVE. Referenced by strap_G2API_IKMove().
01046 {
01047 return syscall(CG_G2_IKMOVE, ghoul2, time, params);
01048 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 809 of file cg_syscalls.c. References CG_G2_INITGHOUL2MODEL, qhandle_t, and UI_G2_INITGHOUL2MODEL. Referenced by BG_ModelCache(), CG_CacheG2AnimInfo(), CG_G2AnimEntModelLoad(), CG_InitG2Weapons(), CG_InitJetpackGhoul2(), CG_Player(), CG_RegisterItemVisuals(), EWeb_Create(), G_SaberModelSetup(), ItemParse_asset_model_go(), NPC_VehiclePrecache(), SetupGameGhoul2Model(), SP_misc_G2model(), SP_worldspawn(), TurretClientRun(), turretG2_set_models(), UI_SaberAttachToChar(), and WP_SaberAddG2Model().
00811 {
00812 return syscall(CG_G2_INITGHOUL2MODEL, ghoul2Ptr, fileName, modelIndex, customSkin, customShader, modelFlags, lodBias);
00813 }
|
|
||||||||||||
|
Definition at line 910 of file cg_syscalls.c. References CG_G2_REMOVEGHOUL2MODEL, qboolean, and UI_G2_REMOVEGHOUL2MODEL. Referenced by CG_CopyG2WeaponInstance(), CG_EntityEvent(), CG_Player(), turretG2_set_models(), and UI_SaberAttachToChar().
00911 {
00912 return syscall(CG_G2_REMOVEGHOUL2MODEL, ghlInfo, modelIndex);
00913 }
|
|
||||||||||||||||
|
Definition at line 950 of file cg_syscalls.c. References CG_G2_SETBOLTON, and UI_G2_SETBOLTON. Referenced by CG_InitG2Weapons(), CG_InitJetpackGhoul2(), G_SaberModelSetup(), SetupGameGhoul2Model(), and SP_worldspawn().
00951 {
00952 syscall(CG_G2_SETBOLTON, ghoul2, modelIndex, boltInfo);
00953 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 861 of file cg_syscalls.c. References CG_G2_ANGLEOVERRIDE, qboolean, qhandle_t, UI_G2_ANGLEOVERRIDE, and vec3_t. Referenced by CG_G2ServerBoneAngles(), CG_G2SetBoneAngles(), CG_Player(), EWeb_SetBoneAngles(), G2Tur_SetBoneAngles(), NPC_SetBoneAngles(), SetupGameGhoul2Model(), strap_G2API_SetBoneAngles(), and TurretClientRun().
00864 {
00865 return (syscall(CG_G2_ANGLEOVERRIDE, ghoul2, modelIndex, boneName, angles, flags, up, right, forward, modelList, blendTime, currentTime));
00866 }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 868 of file cg_syscalls.c. References CG_G2_PLAYANIM, PASSFLOAT(), qboolean, and UI_G2_PLAYANIM. Referenced by CG_EntityEvent(), CG_NewClientInfo(), CG_Player(), CG_RagDoll(), EWeb_SetBoneAnim(), G_UpdateClientAnims(), ItemParse_asset_model_go(), SetupGameGhoul2Model(), SP_misc_G2model(), strap_G2API_SetBoneAnim(), TurboLaser_SetBoneAnim(), and TurretClientRun().
|
|
||||||||||||||||||||||||
|
Definition at line 1040 of file cg_syscalls.c. References CG_G2_SETBONEIKSTATE, qboolean, and UI_G2_SETBONEIKSTATE. Referenced by CG_RagDoll(), and strap_G2API_SetBoneIKState().
01041 {
01042 return syscall(CG_G2_SETBONEIKSTATE, ghoul2, time, boneName, ikState, params);
01043 }
|
|
||||||||||||
|
Definition at line 965 of file cg_syscalls.c. References CG_G2_SETNEWORIGIN, qboolean, and UI_G2_SETNEWORIGIN.
00966 {
00967 return syscall(CG_G2_SETNEWORIGIN, ghoul2, boltIndex);
00968 }
|
|
||||||||||||
|
Definition at line 998 of file cg_syscalls.c. References CG_G2_SETRAGDOLL, and UI_G2_SETRAGDOLL. Referenced by CG_Player(), CG_RagDoll(), and strap_G2API_SetRagDoll().
00999 {
01000 syscall(CG_G2_SETRAGDOLL, ghoul2, params);
01001 }
|
|
||||||||||||||||
|
Definition at line 955 of file cg_syscalls.c. References CG_G2_SETROOTSURFACE, qboolean, and UI_G2_SETROOTSURFACE.
00956 {
00957 return syscall(CG_G2_SETROOTSURFACE, ghoul2, modelIndex, surfaceName);
00958 }
|
|
||||||||||||||||||||
|
Definition at line 815 of file cg_syscalls.c. References CG_G2_SETSKIN, qboolean, qhandle_t, and UI_G2_SETSKIN. Referenced by CG_G2AnimEntModelLoad(), CG_ReattachLimb(), G_SaberModelSetup(), ItemParse_asset_model_go(), ItemParse_model_g2skin_go(), SetupGameGhoul2Model(), SP_worldspawn(), and UI_SaberAttachToChar().
00816 {
00817 return syscall(CG_G2_SETSKIN, ghoul2, modelIndex, customSkin, renderSkin);
00818 }
|
|
||||||||||||||||
|
Definition at line 960 of file cg_syscalls.c. References CG_G2_SETSURFACEONOFF, qboolean, and UI_G2_SETSURFACEONOFF. Referenced by CG_EntityEvent(), CG_G2Animated(), G_Dismember(), NPC_SetMiscDefaultData(), and NPC_SetSurfaceOnOff().
00961 {
00962 return syscall(CG_G2_SETSURFACEONOFF, ghoul2, surfaceName, flags);
00963 }
|
|
||||||||||||
|
Definition at line 986 of file cg_syscalls.c. References CG_G2_SETTIME, and UI_G2_SETTIME. Referenced by _UI_Refresh().
00987 {
00988 syscall(CG_G2_SETTIME, time, clock);
00989 }
|
|
||||||||||||
|
Definition at line 443 of file ui_syscalls.c. References UI_SP_GETLANGUAGENAME. Referenced by ItemParse_cvarStrList().
00444 {
00445 syscall( UI_SP_GETLANGUAGENAME, languageIndex, buffer);
00446 }
|
|
|
Definition at line 307 of file cg_syscalls.c. References CG_LANGUAGE_ISASIAN, qboolean, and UI_LANGUAGE_ISASIAN.
00308 {
00309 return syscall( CG_LANGUAGE_ISASIAN );
00310 }
|
|
|
Definition at line 312 of file cg_syscalls.c. References CG_LANGUAGE_USESSPACES, qboolean, and UI_LANGUAGE_USESSPACES.
00313 {
00314 return syscall( CG_LANGUAGE_USESSPACES );
00315 }
|
|
|
Definition at line 541 of file cg_syscalls.c. References CG_PC_ADD_GLOBAL_DEFINE, and UI_PC_ADD_GLOBAL_DEFINE.
00541 {
00542 return syscall( CG_PC_ADD_GLOBAL_DEFINE, define );
00543 }
|
|
|
Definition at line 549 of file cg_syscalls.c. References CG_PC_FREE_SOURCE, and UI_PC_FREE_SOURCE. Referenced by CG_ParseMenu(), UI_LoadMenus(), and UI_ParseMenu().
00549 {
00550 return syscall( CG_PC_FREE_SOURCE, handle );
00551 }
|
|
|
Definition at line 561 of file cg_syscalls.c. References CG_PC_LOAD_GLOBAL_DEFINES, and UI_PC_LOAD_GLOBAL_DEFINES. Referenced by UI_LoadMenus().
00562 {
00563 return syscall ( CG_PC_LOAD_GLOBAL_DEFINES, filename );
00564 }
|
|
|
Definition at line 545 of file cg_syscalls.c. References CG_PC_LOAD_SOURCE, and UI_PC_LOAD_SOURCE. Referenced by CG_ParseMenu(), UI_LoadMenus(), and UI_ParseMenu().
00545 {
00546 return syscall( CG_PC_LOAD_SOURCE, filename );
00547 }
|
|
||||||||||||
|
Definition at line 553 of file cg_syscalls.c. References CG_PC_READ_TOKEN, pc_token_t, and UI_PC_READ_TOKEN. Referenced by Asset_Parse(), CG_Asset_Parse(), CG_ParseMenu(), Item_Parse(), ItemParse_asset_model(), ItemParse_asset_shader(), ItemParse_background(), ItemParse_cvarFloatList(), ItemParse_cvarStrList(), ItemParse_flag(), ItemParse_focusSound(), ItemParse_model_g2anim(), ItemParse_model_g2skin(), ItemParse_rectcvar(), Load_Menu(), Menu_Parse(), MenuParse_background(), PC_Float_Parse(), PC_Int_Parse(), PC_Script_Parse(), PC_String_Parse(), UI_LoadMenus(), and UI_ParseMenu().
00553 {
00554 return syscall( CG_PC_READ_TOKEN, handle, pc_token );
00555 }
|
|
|
Definition at line 566 of file cg_syscalls.c. References CG_PC_REMOVE_ALL_GLOBAL_DEFINES, and UI_PC_REMOVE_ALL_GLOBAL_DEFINES.
00567 {
00568 syscall ( CG_PC_REMOVE_ALL_GLOBAL_DEFINES );
00569 }
|
|
||||||||||||||||
|
Definition at line 557 of file cg_syscalls.c. References CG_PC_SOURCE_FILE_AND_LINE, and UI_PC_SOURCE_FILE_AND_LINE. Referenced by PC_SourceError(), and PC_SourceWarning().
00557 {
00558 return syscall( CG_PC_SOURCE_FILE_AND_LINE, handle, filename, line );
00559 }
|
|
||||||||||||||||||||||||||||||||
|
Definition at line 302 of file cg_syscalls.c. References CG_R_FONT_DRAWSTRING, PASSFLOAT(), and UI_R_FONT_DRAWSTRING. Referenced by CG_Text_Paint(), and Text_Paint().
00303 {
00304 syscall( CG_R_FONT_DRAWSTRING, ox, oy, text, rgba, setIndex, iCharLimit, PASSFLOAT(scale));
00305 }
|
|
||||||||||||
|
Definition at line 297 of file cg_syscalls.c. References CG_R_FONT_STRHEIGHTPIXELS, PASSFLOAT(), and UI_R_FONT_STRHEIGHTPIXELS. Referenced by CG_Text_Height(), and Text_Height().
00298 {
00299 return syscall( CG_R_FONT_STRHEIGHTPIXELS, iFontIndex, PASSFLOAT(scale));
00300 }
|
|
|
Definition at line 292 of file cg_syscalls.c. References CG_R_FONT_STRLENCHARS, and UI_R_FONT_STRLENCHARS.
00293 {
00294 return syscall( CG_R_FONT_STRLENCHARS, text);
00295 }
|
|
||||||||||||||||
|
Definition at line 287 of file cg_syscalls.c. References CG_R_FONT_STRLENPIXELS, PASSFLOAT(), and UI_R_FONT_STRLENPIXELS. Referenced by CG_Text_Width(), Text_PaintWithCursor(), and Text_Width().
00288 {
00289 return syscall( CG_R_FONT_STRLENPIXELS, text, iFontIndex, PASSFLOAT(scale));
00290 }
|
|
|
Definition at line 438 of file ui_syscalls.c. References UI_SP_GETNUMLANGUAGES. Referenced by _UI_Init().
00439 {
00440 return syscall( UI_SP_GETNUMLANGUAGES );
00441 }
|
|
||||||||||||||||
|
Definition at line 725 of file cg_syscalls.c. References CG_SP_GETSTRINGTEXTSTRING, and UI_SP_GETSTRINGTEXTSTRING. Referenced by BindingFromName(), CG_DrawInformation(), CG_DrawInvenSelect(), CG_DrawOldScoreboard(), CG_DrawSiegeMessageNonMenu(), CG_DrawWeaponSelect(), CG_GetGameStatusText(), CG_GetLocationString(), CG_GetStringEdString(), CG_InitSiegeMode(), CG_PlaceString(), Item_ListBox_Paint(), Item_Multi_Paint(), Item_Paint(), Item_Text_AutoWrapped_Paint(), Item_Text_Paint(), Item_Text_Wrapped_Paint(), Item_TextField_Paint(), Item_YesNo_Paint(), UI_DrawConnectScreen(), UI_GetStringEdString(), and UI_SaberProperNameForSaber().
00726 {
00727 return syscall( CG_SP_GETSTRINGTEXTSTRING, text, buffer, bufferLength );
00728 }
|
|
|
Definition at line 209 of file ui_shared.c. References DC, MEM_POOL_SIZE, NULL, displayContextDef_t::Print, qfalse, qtrue, and UI_ALLOCATION_TAG. Referenced by Item_ValidateTypeData(), MenuParse_itemDef(), String_Alloc(), and UI_ParseInfos().
00209 {
00210 #ifdef _XBOX
00211
00212 allocPoint += size;
00213 return Z_Malloc(size, UI_ALLOCATION_TAG, qfalse, 4);
00214
00215 #else // _XBOX
00216
00217 char *p;
00218
00219 if ( allocPoint + size > MEM_POOL_SIZE ) {
00220 outOfMemory = qtrue;
00221 if (DC->Print) {
00222 DC->Print("UI_Alloc: Failure. Out of memory!\n");
00223 }
00224 //DC->trap_Print(S_COLOR_YELLOW"WARNING: UI Out of Memory!\n");
00225 return NULL;
00226 }
00227
00228 p = &memoryPool[allocPoint];
00229
00230 allocPoint += ( size + 15 ) & ~15;
00231
00232 return p;
00233 #endif
00234 }
|
|
|
Definition at line 241 of file ui_shared.c. References qfalse, and UI_ALLOCATION_TAG. Referenced by _UI_Init(), and String_Init().
00241 {
00242 allocPoint = 0;
00243 outOfMemory = qfalse;
00244 #ifdef _XBOX
00245 Z_TagFree(UI_ALLOCATION_TAG);
00246 #endif
00247 }
|
|
|
Definition at line 249 of file ui_shared.c. References qboolean. Referenced by UI_LoadArenas().
00249 {
00250 return outOfMemory;
00251 }
|