25 #include "../ui_main.h"
26 #include "../ui_parse.h"
27 #include "../ui_behaviour.h"
28 #include "../ui_sprite.h"
32 #include "../../client.h"
34 #include "../../../common/scripts_lua.h"
41 #define EXTRADATA_TYPE optionExtraData_t
42 #define EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE)
43 #define EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE)
58 assert(option->
behaviour == ui_optionBehaviour);
60 option = option->
next;
65 option = option->
next;
72 count += 1 + localCount;
73 option = option->
next;
83 while (child && child->
behaviour == ui_optionBehaviour) {
99 if (property == propertyCollapsed) {
115 assert(option->
behaviour == ui_optionBehaviour);
149 behaviour->
name =
"option";
174 ui_optionBehaviour = behaviour;
void UI_Validate(uiNode_t *node)
Validate a node tree.
static void UI_InitOption(uiNode_t *option, const char *label, const char *value)
Initializes an option with a very little set of values.
void UI_Invalidate(uiNode_t *node)
Invalidate a node and all his parent to request a layout update.
uiBehaviour_t * behaviour
void UI_Option_SetIconByName(uiNode_t *node, const char *name)
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
uiNode_t * UI_AllocNode(const char *name, const char *type, bool isDynamic)
Allocate a node into the UI memory.
void Q_strncpyz(char *dest, const char *src, size_t destsize)
Safe strncpy that ensures a trailing zero.
uiNode_t * UI_AllocOptionNode(const char *name, const char *label, const char *value)
Initializes an option with a very little set of values.
#define OPTIONEXTRADATA(node)
void onPropertyChanged(uiNode_t *node, const value_t *property) override
SharedPtr< uiNode > UINodePtr
void UI_Option_SetLabel(uiNode_t *node, const char *text)
int UI_OptionUpdateCache(uiNode_t *option)
update option cache about child, according to collapse and visible status
Atomic structure used to define most of 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_RegisterOptionNode(uiBehaviour_t *behaviour)
node behaviour, how a node work
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
void UI_Option_SetValue(uiNode_t *node, const char *text)
virtual void onPropertyChanged(uiNode_t *node, const value_t *property)
uiSprite_t * UI_GetSpriteByName(const char *name)
Return an sprite by is name.
const uiBehaviour_t * ui_optionBehaviour
static const value_t * propertyCollapsed
void doLayout(uiNode_t *node) override
Call to update the node layout. This common code revalidates the node tree.