The checkbox node is a three state widget. If the value is 0, checkbox is unchecked, if value is bigger than 0, the value is checked; but if the value is under 0, the checkbox display an "invalidate" status. More...
#include "../ui_nodes.h"
#include "../ui_parse.h"
#include "../ui_main.h"
#include "../ui_actions.h"
#include "../ui_render.h"
#include "ui_node_checkbox.h"
#include "ui_node_abstractnode.h"
#include "ui_node_abstractvalue.h"
Go to the source code of this file.
Defines | |
#define | EXTRADATA(node) UI_EXTRADATA(node, abstractValueExtraData_t) |
Functions | |
static void | UI_CheckBoxNodeDraw (uiNode_t *node) |
static void | UI_CheckBoxNodeActivate (uiNode_t *node) |
Activate the node. Can be used without the mouse (ie. a button will execute onClick). | |
static void | UI_CheckBoxNodeCallActivate (uiNode_t *node, const uiCallContext_t *context) |
static void | UI_CheckBoxNodeClick (uiNode_t *node, int x, int y) |
Handles checkboxes clicks. | |
static void | UI_CheckBoxNodeLoading (uiNode_t *node) |
Handled before the begin of the load of the node from the script. | |
void | UI_RegisterCheckBoxNode (uiBehaviour_t *behaviour) |
Variables | |
static const value_t | properties [] |
The checkbox node is a three state widget. If the value is 0, checkbox is unchecked, if value is bigger than 0, the value is checked; but if the value is under 0, the checkbox display an "invalidate" status.
checkbox check_item { cvar "*cvar mn_serverday" pos "410 100" }
Definition in file ui_node_checkbox.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, abstractValueExtraData_t) |
Definition at line 43 of file ui_node_checkbox.c.
static void UI_CheckBoxNodeActivate | ( | uiNode_t * | node | ) | [static] |
Activate the node. Can be used without the mouse (ie. a button will execute onClick).
Definition at line 82 of file ui_node_checkbox.c.
References uiNode_s::disabled, EXTRADATA, uiNode_s::onChange, UI_ExecuteEventActions(), UI_GetReferenceFloat(), and UI_SetCvar().
Referenced by UI_CheckBoxNodeCallActivate(), UI_CheckBoxNodeClick(), and UI_RegisterCheckBoxNode().
static void UI_CheckBoxNodeCallActivate | ( | uiNode_t * | node, | |
const uiCallContext_t * | context | |||
) | [static] |
Definition at line 109 of file ui_node_checkbox.c.
References UI_CheckBoxNodeActivate().
static void UI_CheckBoxNodeClick | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Handles checkboxes clicks.
Definition at line 117 of file ui_node_checkbox.c.
References uiNode_s::onClick, UI_CheckBoxNodeActivate(), and UI_ExecuteEventActions().
Referenced by UI_RegisterCheckBoxNode().
static void UI_CheckBoxNodeDraw | ( | uiNode_t * | node | ) | [static] |
Definition at line 45 of file ui_node_checkbox.c.
References uiNode_s::disabled, EXTRADATA, uiNode_s::image, uiIcon_s::image, pos, uiNode_s::size, uiNode_s::state, UI_DrawNormImageByName(), UI_GetNodeAbsPos(), UI_GetReferenceFloat(), and UI_GetReferenceString().
Referenced by UI_RegisterCheckBoxNode().
static void UI_CheckBoxNodeLoading | ( | uiNode_t * | node | ) | [static] |
Handled before the begin of the load of the node from the script.
Definition at line 128 of file ui_node_checkbox.c.
Referenced by UI_RegisterCheckBoxNode().
void UI_RegisterCheckBoxNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 146 of file ui_node_checkbox.c.
References uiBehaviour_s::activate, uiBehaviour_s::draw, uiBehaviour_s::extends, uiBehaviour_s::leftClick, uiBehaviour_s::loading, uiBehaviour_s::name, uiBehaviour_s::properties, UI_CheckBoxNodeActivate(), UI_CheckBoxNodeClick(), UI_CheckBoxNodeDraw(), and UI_CheckBoxNodeLoading().
const value_t properties[] [static] |
{ {"toggle", V_UI_NODEMETHOD, ((size_t) UI_CheckBoxNodeCallActivate), 0}, {NULL, V_NULL, 0, 0} }
Definition at line 132 of file ui_node_checkbox.c.