#include "../../common/scripts.h"
Go to the source code of this file.
Defines | |
#define | V_UI_MASK 0x8F00 |
#define | V_UI 0x8000 |
#define | V_NOT_UI 0 |
#define | V_UI_ACTION (V_UI + 0) |
#define | V_UI_EXCLUDERECT (V_UI + 1) |
#define | V_UI_ICONREF (V_UI + 2) |
#define | V_UI_IF (V_UI + 3) |
#define | V_UI_DATAID (V_UI + 4) |
#define | V_UI_CVAR (V_UI + 0x0100) |
#define | V_UI_REF (V_UI + 0x0200) |
#define | V_UI_NODEMETHOD (V_UI + 0x0400) |
#define | V_UI_ALIGN V_INT |
#define | V_CVAR_OR_FLOAT (V_UI_CVAR + V_FLOAT) |
#define | V_CVAR_OR_STRING (V_UI_CVAR + V_STRING) |
#define | V_CVAR_OR_LONGSTRING (V_UI_CVAR + V_LONGSTRING) |
#define | V_REF_OF_STRING (V_UI_REF + V_STRING) |
Functions | |
void | UI_ParseWindow (const char *type, const char *name, const char **text) |
Parse a window. | |
void | UI_ParseComponent (const char *type, const char **text) |
Parse a component. | |
void | UI_ParseIcon (const char *name, const char **text) |
void | UI_ParseUIModel (const char *name, const char **text) |
parses the models.ufo and all files where UI models (menu_model) are defined | |
float | UI_GetReferenceFloat (const struct uiNode_s *const node, const void *ref) |
const char * | UI_GetReferenceString (const struct uiNode_s *const node, const char *ref) __attribute__((warn_unused_result)) |
const value_t * | UI_FindPropertyByName (const value_t *propertyList, const char *name) __attribute__((warn_unused_result)) |
Find a value_t by name into a array of value_t. | |
char * | UI_AllocStaticString (const char *string, int size) __attribute__((warn_unused_result)) |
Allocate a string into the UI static memory. | |
float * | UI_AllocStaticFloat (int count) __attribute__((warn_unused_result)) |
Allocate a float into the UI static memory. | |
vec4_t * | UI_AllocStaticColor (int count) __attribute__((warn_unused_result)) |
Allocate a color into the UI static memory. | |
struct uiAction_s * | UI_AllocStaticAction (void) __attribute__((warn_unused_result)) |
Allocate an action. | |
qboolean | UI_InitRawActionValue (struct uiAction_s *action, struct uiNode_s *node, const struct value_s *property, const char *string) |
Definition in file ui_parse.h.
#define V_CVAR_OR_FLOAT (V_UI_CVAR + V_FLOAT) |
Definition at line 65 of file ui_parse.h.
Referenced by UI_GetFloatFromNodeProperty(), UI_GetStringFromNodeProperty(), and UI_NodeSetProperty().
#define V_CVAR_OR_LONGSTRING (V_UI_CVAR + V_LONGSTRING) |
Definition at line 67 of file ui_parse.h.
Referenced by UI_GetStringFromNodeProperty(), and UI_NodeSetProperty().
#define V_CVAR_OR_STRING (V_UI_CVAR + V_STRING) |
Definition at line 66 of file ui_parse.h.
Referenced by UI_GetStringFromNodeProperty(), and UI_NodeSetProperty().
#define V_NOT_UI 0 |
Definition at line 51 of file ui_parse.h.
Referenced by UI_GetStringFromNodeProperty(), UI_NodeSetProperty(), UI_NodeSetPropertyFromRAW(), and UI_ParseProperty().
#define V_REF_OF_STRING (V_UI_REF + V_STRING) |
Definition at line 68 of file ui_parse.h.
#define V_UI 0x8000 |
#define V_UI_ACTION (V_UI + 0) |
Identify an action type into the value_t structure
Definition at line 52 of file ui_parse.h.
Referenced by UI_AddListener_f(), UI_ExecuteCallAction(), UI_FuncNodeLoaded(), UI_NodeSetPropertyFromRAW(), UI_ParseProperty(), UI_ParseSetAction(), and UI_RemoveListener_f().
#define V_UI_ALIGN V_INT |
Definition at line 62 of file ui_parse.h.
#define V_UI_CVAR (V_UI + 0x0100) |
Property is a CVAR string (mix this flag with base type, see bellow)
Definition at line 57 of file ui_parse.h.
Referenced by UI_DeleteNode(), UI_GetStringFromNodeProperty(), UI_InitRawActionValue(), UI_NodeSetProperty(), UI_NodeSetPropertyFromRAW(), and UI_ParseProperty().
#define V_UI_DATAID (V_UI + 4) |
Definition at line 56 of file ui_parse.h.
Referenced by UI_ParseProperty().
#define V_UI_EXCLUDERECT (V_UI + 1) |
Identify a special attribute, use special parse function
Definition at line 53 of file ui_parse.h.
Referenced by UI_ParseProperty().
#define V_UI_ICONREF (V_UI + 2) |
Identify a special attribute, use special parse function
Definition at line 54 of file ui_parse.h.
Referenced by UI_InitRawActionValue(), UI_NodeSetPropertyFromRAW(), and UI_ParseProperty().
#define V_UI_IF (V_UI + 3) |
Identify a special attribute, use special parse function
Definition at line 55 of file ui_parse.h.
Referenced by UI_ParseProperty().
#define V_UI_MASK 0x8F00 |
Mask for all UI bits
Definition at line 49 of file ui_parse.h.
Referenced by UI_DeleteNode(), UI_GetStringFromNodeProperty(), UI_InitRawActionValue(), UI_NodeSetProperty(), UI_NodeSetPropertyFromRAW(), and UI_ParseProperty().
#define V_UI_NODEMETHOD (V_UI + 0x0400) |
Property is a function
Definition at line 59 of file ui_parse.h.
Referenced by UI_ExecuteCallAction(), UI_InitializeNodeBehaviour(), UI_KeyPressedInWindow(), and UI_SetKeyBinding().
#define V_UI_REF (V_UI + 0x0200) |
Property is a ref into a value (mix this flag with base type, see bellow)
Definition at line 58 of file ui_parse.h.
Referenced by UI_ParseProperty().
struct uiAction_s* UI_AllocStaticAction | ( | void | ) | [read] |
Allocate an action.
Definition at line 225 of file ui_parse.c.
References uiGlobal_s::actions, Com_Error(), ERR_FATAL, uiGlobal_s::numActions, ui_global, and UI_MAX_ACTIONS.
Referenced by UI_AllocStaticCommandAction(), UI_ParseActionList(), UI_ParseExpression(), UI_ParseSetAction(), and UI_ParseValueExpression().
vec4_t* UI_AllocStaticColor | ( | int | count | ) |
Allocate a color into the UI static memory.
[in] | count | number of element need to allocate |
Definition at line 185 of file ui_parse.c.
References uiGlobal_s::adata, uiGlobal_s::adataize, Com_Error(), uiGlobal_s::curadata, ERR_FATAL, and ui_global.
float* UI_AllocStaticFloat | ( | int | count | ) |
Allocate a float into the UI static memory.
[in] | count | number of element need to allocate |
Definition at line 167 of file ui_parse.c.
References uiGlobal_s::adata, uiGlobal_s::adataize, Com_Error(), uiGlobal_s::curadata, ERR_FATAL, and ui_global.
Referenced by UI_CloneCvarOrFloat(), and UI_InitCvarOrFloat().
char* UI_AllocStaticString | ( | const char * | string, | |
int | size | |||
) |
Allocate a string into the UI static memory.
[in] | string | Use to initialize the string |
[in] | size | request a fixed memory size, if 0 the string size is used |
Definition at line 204 of file ui_parse.c.
References uiGlobal_s::adata, uiGlobal_s::adataize, Com_Error(), uiGlobal_s::curadata, ERR_FATAL, and ui_global.
Referenced by UI_AutoGenerateIcon(), UI_InitRawActionValue(), UI_ModelNodeClone(), UI_ModelNodeLoaded(), UI_ParseActionList(), UI_ParseSetAction(), and UI_ParseValueExpression().
Find a value_t by name into a array of value_t.
[in] | propertyList | Array of value_t, with null termination |
[in] | name | Property name we search |
Definition at line 150 of file ui_parse.c.
References Q_strcasecmp, and value_s::string.
Referenced by UI_GetPropertyFromBehaviour(), UI_MaterialEditorChangeValue_f(), UI_ParseIcon(), and UI_ParseUIModel().
float UI_GetReferenceFloat | ( | const struct uiNode_s *const | node, | |
const void * | ref | |||
) |
const char* UI_GetReferenceString | ( | const struct uiNode_s *const | node, | |
const char * | ref | |||
) |
qboolean UI_InitRawActionValue | ( | struct uiAction_s * | action, | |
struct uiNode_s * | node, | |||
const struct value_s * | property, | |||
const char * | string | |||
) |
void UI_ParseComponent | ( | const char * | type, | |
const char ** | text | |||
) |
Parse a component.
component panel componentName { }
Definition at line 1256 of file ui_parse.c.
References Com_Error(), Com_Parse(), Com_UnParseLastToken(), ERR_FATAL, UI_InsertComponent(), and UI_ParseNode().
Referenced by CL_ParseClientData().
void UI_ParseIcon | ( | const char * | name, | |
const char ** | text | |||
) |
Definition at line 1207 of file ui_parse.c.
References Com_Parse(), Com_Printf(), mn_iconProperties, uiIcon_s::name, qtrue, UI_AllocStaticIcon(), UI_FindPropertyByName(), and UI_ParseProperty().
Referenced by CL_ParseClientData().
void UI_ParseUIModel | ( | const char * | name, | |
const char ** | text | |||
) |
parses the models.ufo and all files where UI models (menu_model) are defined
Definition at line 1131 of file ui_parse.c.
References uiModel_s::color, Com_DPrintf(), Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), DEBUG_CLIENT, i, uiModel_s::id, Mem_PoolStrDup, Mem_PoolStrDupTo, uiGlobal_s::models, uiModel_s::need, uiModel_s::next, uiGlobal_s::numModels, value_s::ofs, value_s::size, value_s::string, value_s::type, UI_FindPropertyByName(), UI_GetUIModel(), ui_global, UI_MAX_MODELS, ui_sysPool, V_CLIENT_HUNK_STRING, V_NULL, and Vector4Set.
Referenced by CL_ParseClientData().
void UI_ParseWindow | ( | const char * | type, | |
const char * | name, | |||
const char ** | text | |||
) |
Parse a window.
window windowName { }
Definition at line 1285 of file ui_parse.c.
References uiNode_s::behaviour, Com_Error(), Com_Parse(), Com_ParsedTokenIsQuoted(), Com_Printf(), ERR_FATAL, i, uiBehaviour_s::loaded, uiNode_s::name, uiGlobal_s::numWindows, qfalse, qtrue, uiNode_s::root, Sys_Error(), UI_AllocNode(), UI_CloneNode(), UI_GetWindow(), ui_global, UI_InsertWindow(), UI_MAX_WINDOWS, UI_ParseNodeBody(), UI_TokenIsName(), UI_TokenIsReserved(), and uiGlobal_s::windows.
Referenced by CL_ParseClientData().