37 #include "../ui_main.h"
38 #include "../ui_actions.h"
39 #include "../ui_sprite.h"
40 #include "../ui_parse.h"
41 #include "../ui_behaviour.h"
42 #include "../ui_input.h"
43 #include "../ui_render.h"
44 #include "../ui_lua.h"
49 #include "../../../common/scripts_lua.h"
51 #define EXTRADATA_TYPE radioButtonExtraData_t
52 #define EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE)
53 #define EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE)
55 #define EPSILON 0.001f
58 #define UI_4STATUS_TEX_HEIGHT 64
87 }
else if (isSelected) {
90 }
else if (node->
state) {
104 texX + node->
box.
size[0], texY + node->
box.
size[1], texX, texY, image);
123 Com_Printf(
"UI_RadioButtonNodeClick: node '%s' doesn't have a valid cvar assigned\n",
UI_GetPath(node));
195 behaviour->
name =
"radiobutton";
struct uiAction_s * onChange
uiBehaviour_t * behaviour
bool UI_ExecuteLuaEventScript(uiNode_t *node, LUA_EVENT event)
Executes a lua event handler.
void UI_DrawSpriteInBox(bool flip, const uiSprite_t *sprite, uiSpriteStatus_t status, int posX, int posY, int sizeX, int sizeY)
void Com_Printf(const char *const fmt,...)
struct uiAction_s * onClick
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
const image_t * UI_DrawNormImageByName(bool flip, float x, float y, float w, float h, float sh, float th, float sl, float tl, const char *name)
Draws an image or parts of it.
SharedPtr< uiNode > UINodePtr
const char * UI_GetPath(const uiNode_t *node)
Return a path from a window to a node.
char const * Q_strstart(char const *str, char const *start)
Matches the start of a string.
void UI_ExecuteEventActions(uiNode_t *source, const uiAction_t *firstAction)
bool UI_ExecuteLuaEventScript_XY(uiNode_t *node, LUA_EVENT event, int x, int y)
Executes a lua event handler with (x,y) argument.
const char * UI_GetReferenceString(const uiNode_t *const node, const char *ref)
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_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
float UI_GetReferenceFloat(const uiNode_t *const node, const void *ref)
Returns the value of the reference variable.
node behaviour, how a node work
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.
uiSprite_t * UI_GetSpriteByName(const char *name)
Return an sprite by is name.
void Cvar_SetValue(const char *varName, float value)
Expands value to a string and calls Cvar_Set.