UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ui_node_button.cpp File Reference

button is a node to define a button with a random size. It is skinned with a special image template (see the image property). More...

#include "../ui_main.h"
#include "../ui_actions.h"
#include "../ui_parse.h"
#include "../ui_behaviour.h"
#include "../ui_font.h"
#include "../ui_render.h"
#include "../ui_sound.h"
#include "../ui_sprite.h"
#include "ui_node_button.h"
#include "ui_node_abstractnode.h"
#include "ui_node_panel.h"
#include "../../../common/scripts_lua.h"
#include "../../client.h"

Go to the source code of this file.

Macros

#define EXTRADATA_TYPE   buttonExtraData_t
 
#define EXTRADATA(node)   UI_EXTRADATA(node, EXTRADATA_TYPE)
 
#define EXTRADATACONST(node)   UI_EXTRADATACONST(node, EXTRADATA_TYPE)
 

Functions

void UI_Button_SetBackgroundByName (uiNode_t *node, const char *name)
 
void UI_Button_SetIconByName (uiNode_t *node, const char *name)
 
void UI_RegisterButtonNode (uiBehaviour_t *behaviour)
 

Detailed Description

button is a node to define a button with a random size. It is skinned with a special image template (see the image property).

Todo:

implement clicked button when its possible.

allow auto size (use the size need looking string, problem when we change language)

Definition in file ui_node_button.cpp.

Macro Definition Documentation

#define EXTRADATA (   node)    UI_EXTRADATA(node, EXTRADATA_TYPE)

Definition at line 44 of file ui_node_button.cpp.

Referenced by uiButtonNode::draw().

#define EXTRADATA_TYPE   buttonExtraData_t

Definition at line 43 of file ui_node_button.cpp.

Referenced by UI_RegisterButtonNode().

#define EXTRADATACONST (   node)    UI_EXTRADATACONST(node, EXTRADATA_TYPE)

Definition at line 45 of file ui_node_button.cpp.

Function Documentation

void UI_Button_SetBackgroundByName ( uiNode_t node,
const char *  name 
)

Definition at line 168 of file ui_node_button.cpp.

References UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiButtonNode_t_set_background().

void UI_Button_SetIconByName ( uiNode_t node,
const char *  name 
)

Definition at line 173 of file ui_node_button.cpp.

References UI_EXTRADATA, and UI_GetSpriteByName().

Referenced by uiButtonNode_t_set_icon().