UFO: Alien Invasion
|
#include "../ui_main.h"
#include "../ui_parse.h"
#include "../ui_behaviour.h"
#include "../ui_render.h"
#include "../ui_actions.h"
#include "../ui_input.h"
#include "../ui_sprite.h"
#include "../ui_lua.h"
#include "ui_node_abstractnode.h"
#include "ui_node_panel.h"
#include "../../../common/scripts.h"
#include "../../input/cl_keys.h"
#include "../../../common/scripts_lua.h"
Go to the source code of this file.
Macros | |
#define | EXTRADATA_TYPE panelExtraData_t |
#define | EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE) |
#define | EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE) |
Functions | |
static void | UI_TopDownFlowLayout (uiNode_t *node, int margin) |
Create a top-down flow layout with child of the node. Child position is automatically set, child height don't change and child width is set according to node width and padding. More... | |
static void | UI_LeftRightFlowLayout (uiNode_t *node, int margin) |
Create a left-right flow layout with child of the node. Child position is automatically set, child width don't change and child height is set according to node width and padding. More... | |
static void | UI_BorderLayout (uiNode_t *node, int margin) |
Create a border layout with child of the node. Child with BORDERLAYOUT_TOP and BORDERLAYOUT_BOTTOM num are first positioned, there height do not change but the width fill the parent node. Then child with BORDERLAYOUT_LEFT and BORDERLAYOUT_RIGHT are positioned between positioned nodes. Finally BORDERLAYOUT_MIDDLE is filled into available free space. More... | |
static void | UI_PackLayout (uiNode_t *node, int margin) |
Create a pack layout with child of the node. Set position and size of nodes one by one. It is a usefull layout manager because it can create nice layout without sub panel. More... | |
void | UI_StarLayout (uiNode_t *node) |
Do a star layout with child according to there num. More... | |
static void | UI_ClientLayout (uiNode_t *node) |
static void | UI_ColumnLayout (uiNode_t *node) |
Do column layout. A grid layout according to a fixed number of column. Check to first row to see the needed size of columns, and the height. All rows will use the same row. More... | |
void | UI_Panel_SetBackgroundByName (uiNode_t *node, const char *name) |
void | UI_RegisterPanelNode (uiBehaviour_t *behaviour) |
Variables | |
static const value_t * | propertyLayoutMargin |
static const value_t * | propertyLayoutColumns |
static const value_t * | propertyPadding |
static const uiBehaviour_t * | localBehaviour |
static int | mouseScrollX |
static int | mouseScrollY |
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, EXTRADATA_TYPE) |
Definition at line 42 of file ui_node_panel.cpp.
Referenced by uiPanelNode::doLayout(), uiPanelNode::draw(), uiPanelNode::onLoaded(), uiPanelNode::onLoading(), uiPanelNode::onMouseLongPress(), uiPanelNode::onScroll(), UI_ClientLayout(), UI_ColumnLayout(), and UI_TopDownFlowLayout().
#define EXTRADATA_TYPE panelExtraData_t |
Definition at line 41 of file ui_node_panel.cpp.
Referenced by UI_RegisterPanelNode().
#define EXTRADATACONST | ( | node | ) | UI_EXTRADATACONST(node, EXTRADATA_TYPE) |
Definition at line 43 of file ui_node_panel.cpp.
Referenced by uiPanelNode::getClientPosition().
Create a border layout with child of the node. Child with BORDERLAYOUT_TOP and BORDERLAYOUT_BOTTOM num are first positioned, there height do not change but the width fill the parent node. Then child with BORDERLAYOUT_LEFT and BORDERLAYOUT_RIGHT are positioned between positioned nodes. Finally BORDERLAYOUT_MIDDLE is filled into available free space.
[in,out] | node | The panel node to render the children for |
[in] | margin | The margin between all children nodes in their y-position of the panel |
Definition at line 149 of file ui_node_panel.cpp.
References uiNode_t::align, uiNode_t::box, uiNode_t::firstChild, uiNode_t::invis, LAYOUTALIGN_BOTTOM, LAYOUTALIGN_LEFT, LAYOUTALIGN_MIDDLE, LAYOUTALIGN_RIGHT, LAYOUTALIGN_TOP, uiNode_t::next, uiNode_t::padding, uiBox_t::pos, uiBox_t::size, and UI_NodeSetSize().
Referenced by uiPanelNode::doLayout().
Update the client zone
Definition at line 332 of file ui_node_panel.cpp.
References uiNode_t::box, EXTRADATA, uiNode_t::firstChild, uiNode_t::next, uiNode_t::padding, uiBox_t::size, UI_ExecuteEventActions(), and UI_ExecuteLuaEventScript().
Referenced by uiPanelNode::doLayout().
Do column layout. A grid layout according to a fixed number of column. Check to first row to see the needed size of columns, and the height. All rows will use the same row.
Definition at line 368 of file ui_node_panel.cpp.
References uiNode_t::box, Com_Printf(), EXTRADATA, uiNode_t::firstChild, i, Mem_AllocTypeN, Mem_Free, uiNode_t::next, uiNode_t::padding, uiBox_t::pos, uiBox_t::size, UI_ExecuteEventActions(), UI_ExecuteLuaEventScript(), UI_GetPath(), and UI_Node_DoLayout().
Referenced by uiPanelNode::doLayout().
Create a left-right flow layout with child of the node. Child position is automatically set, child width don't change and child height is set according to node width and padding.
[in,out] | node | The panel node to render the children for |
[in] | margin | The margin between all children nodes in their x-position of the panel |
Definition at line 117 of file ui_node_panel.cpp.
References uiNode_t::box, uiNode_t::firstChild, uiNode_t::next, uiNode_t::padding, uiBox_t::pos, uiBox_t::size, UI_Node_IsDrawable(), UI_NodeSetSize(), and Vector2FromInt.
Referenced by uiPanelNode::doLayout().
Create a pack layout with child of the node. Set position and size of nodes one by one. It is a usefull layout manager because it can create nice layout without sub panel.
[in,out] | node | The panel node to render the children for |
[in] | margin | The margin between all children nodes |
Definition at line 238 of file ui_node_panel.cpp.
References uiNode_t::box, uiNode_t::firstChild, LAYOUTALIGN_BOTTOM, LAYOUTALIGN_FILL, LAYOUTALIGN_LEFT, LAYOUTALIGN_RIGHT, LAYOUTALIGN_TOP, uiNode_t::next, uiNode_t::padding, uiBox_t::size, and UI_NodeSetSize().
Referenced by uiPanelNode::doLayout().
Definition at line 597 of file ui_node_panel.cpp.
References UI_EXTRADATA, and UI_GetSpriteByName().
Referenced by uiPanelNode_t_set_background().
void UI_RegisterPanelNode | ( | uiBehaviour_t * | behaviour | ) |
Select a layout manager to set position and size of child. Most of layout manager do not move or resize child without align property set. In the image, number identify the position of the child into node, and same color identify the same node. Text on child display the value of the "align" property of each child.
Margin use to layout children (margin between children)
Number of column use to layout children (used with LAYOUT_COLUMN)
If scrolling via mousewheel is enabled
Definition at line 602 of file ui_node_panel.cpp.
References Com_RegisterConstInt(), uiBehaviour_t::extends, EXTRADATA_TYPE, uiBehaviour_t::extraDataSize, LAYOUT_BORDER, LAYOUT_CLIENT, LAYOUT_COLUMN, LAYOUT_LEFT_RIGHT_FLOW, LAYOUT_PACK, LAYOUT_STAR, LAYOUT_TOP_DOWN_FLOW, LAYOUTALIGN_BOTTOM, LAYOUTALIGN_BOTTOMLEFT, LAYOUTALIGN_BOTTOMRIGHT, LAYOUTALIGN_FILL, LAYOUTALIGN_LEFT, LAYOUTALIGN_MIDDLE, LAYOUTALIGN_RIGHT, LAYOUTALIGN_TOP, LAYOUTALIGN_TOPLEFT, LAYOUTALIGN_TOPRIGHT, uiBehaviour_t::lua_SWIG_typeinfo, uiBehaviour_t::manager, uiBehaviour_t::name, UI_RegisterExtradataNodeProperty, UI_SWIG_TypeQuery(), V_BOOL, V_INT, and V_UI_SPRITEREF.
Do a star layout with child according to there num.
Definition at line 304 of file ui_node_panel.cpp.
References uiNode_t::align, uiNode_t::box, uiNode_t::firstChild, LAYOUTALIGN_FILL, LAYOUTALIGN_NONE, LAYOUTALIGN_SPECIAL, uiNode_t::next, uiBox_t::size, UI_Node_DoLayout(), UI_NodeGetPoint(), UI_NodeRelativeToAbsolutePoint(), and UI_NodeSetSize().
Referenced by uiPanelNode::doLayout(), and uiWindowNode::doLayout().
Create a top-down flow layout with child of the node. Child position is automatically set, child height don't change and child width is set according to node width and padding.
[in,out] | node | The panel node to render the children for |
[in] | margin | The margin between all children nodes in their y-position of the panel |
Definition at line 73 of file ui_node_panel.cpp.
References uiNode_t::box, EXTRADATA, uiNode_t::firstChild, uiNode_t::next, uiNode_t::padding, uiBox_t::pos, uiBox_t::size, UI_ExecuteEventActions(), UI_ExecuteLuaEventScript(), UI_Node_IsDrawable(), UI_NodeSetSize(), and Vector2FromInt.
Referenced by uiPanelNode::doLayout().
|
static |
Definition at line 49 of file ui_node_panel.cpp.
|
static |
Definition at line 490 of file ui_node_panel.cpp.
Referenced by uiPanelNode::onCapturedMouseMove(), and uiPanelNode::onMouseLongPress().
|
static |
Definition at line 491 of file ui_node_panel.cpp.
Referenced by uiPanelNode::onCapturedMouseMove(), and uiPanelNode::onMouseLongPress().
|
static |
Definition at line 46 of file ui_node_panel.cpp.
|
static |
Definition at line 45 of file ui_node_panel.cpp.
|
static |
Definition at line 47 of file ui_node_panel.cpp.