UFO: Alien Invasion
|
The pic
behaviour allow to draw an image or a part of an image into the GUI. It provide some layout properties. We can use it like an active node (mouse in/out/click...) but in this case, it is better to use nodes with a semantics (like button, or checkbox).
More...
#include "../ui_nodes.h"
#include "../ui_parse.h"
#include "../ui_behaviour.h"
#include "../ui_render.h"
#include "ui_node_image.h"
#include "ui_node_abstractnode.h"
#include "../../client.h"
#include "../../../common/scripts_lua.h"
Go to the source code of this file.
Macros | |
#define | EXTRADATA_TYPE imageExtraData_t |
#define | EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE) |
#define | EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE) |
Functions | |
static void | UI_ImageAlignBoxInBox (vec2_t outerBoxPos, vec2_t outerBoxSize, vec2_t innerBoxSize, align_t align, vec2_t innerBoxPos) |
Get position of a inner box inside an outer box according to align param. More... | |
void | UI_RegisterImageNode (uiBehaviour_t *behaviour) |
The pic
behaviour allow to draw an image or a part of an image into the GUI. It provide some layout properties. We can use it like an active node (mouse in/out/click...) but in this case, it is better to use nodes with a semantics (like button, or checkbox).
Definition in file ui_node_image.cpp.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, EXTRADATA_TYPE) |
Definition at line 51 of file ui_node_image.cpp.
Referenced by uiImageNode::draw(), and uiImageNode::onLoaded().
#define EXTRADATA_TYPE imageExtraData_t |
Definition at line 50 of file ui_node_image.cpp.
Referenced by UI_RegisterImageNode().
#define EXTRADATACONST | ( | node | ) | UI_EXTRADATACONST(node, EXTRADATA_TYPE) |
Definition at line 52 of file ui_node_image.cpp.
|
static |
Get position of a inner box inside an outer box according to align param.
[in] | outerBoxPos | Position of the top-left corner of the outer box. |
[in] | outerBoxSize | Size of the outer box. |
[in] | innerBoxSize | Size of the inner box. |
align | Alignment of the inner box inside the outer box. | |
[out] | innerBoxPos | Position of the top-left corner of the inner box. |
Definition at line 90 of file ui_node_image.cpp.
References Com_Error(), and ERR_FATAL.
Referenced by uiImageNode::draw().
void UI_RegisterImageNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 197 of file ui_node_image.cpp.
References EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_RegisterExtradataNodeProperty, UI_RegisterNodeProperty, UI_SWIG_TypeQuery(), V_BOOL, V_CVAR_OR_STRING, and V_POS.