26 #include "../ui_behaviour.h"
27 #include "../ui_render.h"
31 #include "../../../common/scripts_lua.h"
33 #define EXTRADATA_TYPE rowsExtraData_t
34 #define EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE)
35 #define EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE)
47 while (current < node->box.size[1]) {
49 const int height = std::min(
EXTRADATA(node).lineHeight, (
int)node->
box.
size[1] - current);
71 behaviour->
name =
"rows";
void draw(uiNode_t *node) override
Handles Button draw.
#define UI_RegisterNodeProperty(BEHAVIOUR, NAME, TYPE, OBJECTTYPE, ATTRIBUTE)
Initialize a property.
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
void UI_RegisterRowsNode(uiBehaviour_t *behaviour)
SharedPtr< uiNode > UINodePtr
Atomic structure used to define most of the UI.
void * UI_SWIG_TypeQuery(const char *name)
This function queries the SWIG type table for a type information structure. It is used in combination...
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
node behaviour, how a node work
void onLoaded(uiNode_t *node) override
void UI_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.