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

The radiobutton is a clickable widget. Commonly, with use it in a group of radiobuttons; the user is allowed to choose only one button from this set. The current implementation share the value of the group with a cvar, and each button use is own value. When the cvar equals to a button value, this button is selected. More...

#include "../ui_main.h"
#include "../ui_actions.h"
#include "../ui_sprite.h"
#include "../ui_parse.h"
#include "../ui_behaviour.h"
#include "../ui_input.h"
#include "../ui_render.h"
#include "../ui_lua.h"
#include "ui_node_radiobutton.h"
#include "ui_node_abstractnode.h"
#include "../../../common/scripts_lua.h"
Include dependency graph for ui_node_radiobutton.cpp:

Go to the source code of this file.

Macros

#define EXTRADATA_TYPE   radioButtonExtraData_t
#define EXTRADATA(node)
#define EXTRADATACONST(node)
#define EPSILON   0.001f
#define UI_4STATUS_TEX_HEIGHT   64

Functions

static bool UI_RadioButtonNodeIsSelected (uiNode_t *node)
const char * UI_RadioButton_GetCvar (uiNode_t *node)
void UI_RadioButton_SetCvar (uiNode_t *node, const char *name)
void UI_RadioButton_SetValue (uiNode_t *node, const char *value)
void UI_RadioButton_SetValue (uiNode_t *node, float value)
void UI_RadioButton_SetBackgroundByName (uiNode_t *node, const char *name)
void UI_RadioButton_SetIconByName (uiNode_t *node, const char *name)
void UI_RegisterRadioButtonNode (uiBehaviour_t *behaviour)

Detailed Description

The radiobutton is a clickable widget. Commonly, with use it in a group of radiobuttons; the user is allowed to choose only one button from this set. The current implementation share the value of the group with a cvar, and each button use is own value. When the cvar equals to a button value, this button is selected.

radiobutton foo {
cvar "*cvar:foobar"
value 4
icon boo
}

Definition in file ui_node_radiobutton.cpp.

Macro Definition Documentation

◆ EPSILON

#define EPSILON   0.001f

Definition at line 55 of file ui_node_radiobutton.cpp.

Referenced by UI_RadioButtonNodeIsSelected().

◆ EXTRADATA

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

Definition at line 52 of file ui_node_radiobutton.cpp.

◆ EXTRADATA_TYPE

#define EXTRADATA_TYPE   radioButtonExtraData_t

Definition at line 51 of file ui_node_radiobutton.cpp.

◆ EXTRADATACONST

#define EXTRADATACONST ( node)
Value:
#define UI_EXTRADATACONST(NODE, TYPE)
Definition ui_nodes.h:187

Definition at line 53 of file ui_node_radiobutton.cpp.

◆ UI_4STATUS_TEX_HEIGHT

#define UI_4STATUS_TEX_HEIGHT   64

Height of a status in a 4 status 256*256 texture

Definition at line 58 of file ui_node_radiobutton.cpp.

Referenced by uiRadioButtonNode::draw().

Function Documentation

◆ UI_RadioButton_GetCvar()

const char * UI_RadioButton_GetCvar ( uiNode_t * node)

◆ UI_RadioButton_SetBackgroundByName()

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

◆ UI_RadioButton_SetCvar()

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

◆ UI_RadioButton_SetIconByName()

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

◆ UI_RadioButton_SetValue() [1/2]

◆ UI_RadioButton_SetValue() [2/2]

◆ UI_RadioButtonNodeIsSelected()

◆ UI_RegisterRadioButtonNode()