UFO: Alien Invasion
Loading...
Searching...
No Matches
ui_node_checkbox.cpp File Reference

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_behaviour.h"
#include "../ui_main.h"
#include "../ui_actions.h"
#include "../ui_render.h"
#include "../ui_sound.h"
#include "../ui_sprite.h"
#include "../ui_lua.h"
#include "ui_node_checkbox.h"
#include "ui_node_abstractnode.h"
#include "ui_node_abstractvalue.h"
#include "../../../common/scripts_lua.h"
Include dependency graph for ui_node_checkbox.cpp:

Go to the source code of this file.

Macros

#define EXTRADATA_TYPE   checkboxExtraData_t
#define EXTRADATA(node)

Functions

static void UI_CheckBoxNodeCallActivate (uiNode_t *node, const uiCallContext_t *context)
void UI_CheckBox_SetBackgroundByName (uiNode_t *node, const char *name)
void UI_CheckBox_SetIconCheckedByName (uiNode_t *node, const char *name)
void UI_CheckBox_SetIconUncheckedByName (uiNode_t *node, const char *name)
void UI_CheckBox_Toggle (uiNode_t *node)
void UI_CheckBox_SetIconUnknownByName (uiNode_t *node, const char *name)
bool UI_CheckBox_ValueAsBoolean (uiNode_t *node)
int UI_CheckBox_ValueAsInteger (uiNode_t *node)
void UI_RegisterCheckBoxNode (uiBehaviour_t *behaviour)

Detailed Description

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 foobar"
pos "410 100"
}

Definition in file ui_node_checkbox.cpp.

Macro Definition Documentation

◆ EXTRADATA

#define EXTRADATA ( node)
Value:
#define EXTRADATA_TYPE
#define UI_EXTRADATA(NODE, TYPE)
Definition ui_nodes.h:185

Definition at line 51 of file ui_node_checkbox.cpp.

◆ EXTRADATA_TYPE

#define EXTRADATA_TYPE   checkboxExtraData_t

Definition at line 50 of file ui_node_checkbox.cpp.

Function Documentation

◆ UI_CheckBox_SetBackgroundByName()

void UI_CheckBox_SetBackgroundByName ( uiNode_t * node,
const char * name )

Definition at line 140 of file ui_node_checkbox.cpp.

References name, UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_background().

◆ UI_CheckBox_SetIconCheckedByName()

void UI_CheckBox_SetIconCheckedByName ( uiNode_t * node,
const char * name )

Definition at line 145 of file ui_node_checkbox.cpp.

References name, UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_iconchecked().

◆ UI_CheckBox_SetIconUncheckedByName()

void UI_CheckBox_SetIconUncheckedByName ( uiNode_t * node,
const char * name )

Definition at line 150 of file ui_node_checkbox.cpp.

References name, UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_iconunchecked().

◆ UI_CheckBox_SetIconUnknownByName()

void UI_CheckBox_SetIconUnknownByName ( uiNode_t * node,
const char * name )

Definition at line 160 of file ui_node_checkbox.cpp.

References name, UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiCheckBoxNode_t_set_iconunknown().

◆ UI_CheckBox_Toggle()

void UI_CheckBox_Toggle ( uiNode_t * node)

◆ UI_CheckBox_ValueAsBoolean()

bool UI_CheckBox_ValueAsBoolean ( uiNode_t * node)

◆ UI_CheckBox_ValueAsInteger()

int UI_CheckBox_ValueAsInteger ( uiNode_t * node)

◆ UI_CheckBoxNodeCallActivate()

void UI_CheckBoxNodeCallActivate ( uiNode_t * node,
const uiCallContext_t * context )
static

Definition at line 108 of file ui_node_checkbox.cpp.

References UI_Node_Activate().

Referenced by UI_RegisterCheckBoxNode().

◆ UI_RegisterCheckBoxNode()

void UI_RegisterCheckBoxNode ( uiBehaviour_t * behaviour)

Sprite used as an icon for checked state

Sprite used as an icon for unchecked state

Sprite used as an icon for indeterminate state

Sprite used as a background

Definition at line 175 of file ui_node_checkbox.cpp.

References uiBehaviour_t::extends, EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_CheckBoxNodeCallActivate(), UI_RegisterExtradataNodeProperty, UI_RegisterNodeMethod(), UI_SWIG_TypeQuery(), and V_UI_SPRITEREF.