38#define EXTRADATA_TYPE abstractOptionExtraData_t
39#define EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE)
54 option = option->
next;
62 Com_Printf(
"UI_AbstractOptionGetCurrentValue: node [%s] doesn't have a valid cvar assigned\n",
UI_GetPath(node));
77 const char* cvarName = &
EXTRADATA(node).cvar[6];
89 EXTRADATA(node).lua_onViewChange = LUA_NOREF;
102 option = option->
next;
127 option = option->
next;
213 behaviour->
name =
"abstractoption";
int getCellHeight(uiNode_t *node) override
Return size of the cell, which is the size (in virtual "pixel") which represents 1 in the scroll valu...
void doLayout(uiNode_t *node) override
Call to update the node layout. This common code revalidates the node tree.
void initNode(uiNode_t *node) override
int getCellWidth(uiNode_t *node) override
Return size of the cell, which is the size (in virtual "pixel") which represents 1 in the scroll valu...
virtual void initNode(uiNode_t *node)
void Com_Printf(const char *const fmt,...)
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
QGL_EXTERN int GLboolean GLfloat * v
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Header for lua script functions.
char const * Q_strstart(char const *str, char const *start)
Matches the start of a string.
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
node behaviour, how a node work
Atomic structure used to define most of the UI.
uiBehaviour_t * behaviour
struct uiAction_s * onChange
void UI_ExecuteEventActions(uiNode_t *source, const uiAction_t *firstAction)
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
int UI_GetDataIDByName(const char *name)
Return a dataId by name.
uiNode_t * UI_GetOption(int dataId)
void UI_SortOptions(uiNode_t **first)
Sort options by alphabet.
int UI_GetDataVersion(int textId)
Data and interface to share data.
Internal data use by the UI package.
bool UI_ExecuteLuaEventScript(uiNode_t *node, LUA_EVENT event)
Executes a lua event handler.
Basic lua initialization for the ui.
void * UI_SWIG_TypeQuery(const char *name)
This function queries the SWIG type table for a type information structure. It is used in combination...
void UI_Validate(uiNode_t *node)
Validate a node tree.
bool UI_Node_IsOptionContainer(uiNode_t const *node)
SharedPtr< uiNode > UINodePtr
void UI_AbstractOption_Scroll_SetCurrent(uiNode_t *node, int pos)
int UI_AbstractOption_GetCount(uiNode_t *node)
int UI_AbstractOption_Scroll_ViewSize(uiNode_t *node)
uiNode_t * UI_AbstractOption_GetFirstOption(uiNode_t *node)
Return the first option of the node.
const char * UI_AbstractOption_GetCurrentValue(uiNode_t *node)
int UI_AbstractOption_GetDataId(uiNode_t *node)
void UI_AbstractOption_Scroll_SetViewSize(uiNode_t *node, int size)
void UI_AbstractOption_SetCvar(uiNode_t *node, const char *name)
int UI_AbstractOption_Scroll_Current(uiNode_t *node)
void UI_AbstractOption_SetDataId(uiNode_t *node, int id)
void UI_AbstractOption_SetDataIdByName(uiNode_t *node, const char *name)
void UI_AbstractOption_Scroll_SetFullSize(uiNode_t *node, int size)
void UI_AbstractOption_SetBackgroundByName(uiNode_t *node, const char *name)
const char * UI_AbstractOption_GetCvar(uiNode_t *node)
void UI_RegisterAbstractOptionNode(uiBehaviour_t *behaviour)
void UI_AbstractOption_SetCurrentValue(uiNode_t *node, const char *value)
void UI_AbstractOption_SortOptions(uiNode_t *node)
Sort options by alphabet.
int UI_AbstractOption_Scroll_FullSize(uiNode_t *node)
const uiBehaviour_t * ui_optionBehaviour
const char * UI_GetPath(const uiNode_t *node)
Return a path from a window to a node.
#define UI_EXTRADATA(NODE, TYPE)
const char * UI_GetReferenceString(const uiNode_t *const node, const char *ref)
uiSprite_t * UI_GetSpriteByName(const char *name)
Return an sprite by is name.