26 #include "../ui_main.h"
27 #include "../ui_parse.h"
28 #include "../ui_behaviour.h"
29 #include "../ui_font.h"
30 #include "../ui_render.h"
31 #include "../ui_actions.h"
32 #include "../ui_lua.h"
37 #include "../../client.h"
39 #include "../../../common/scripts_lua.h"
41 #define EXTRADATA_TYPE abstractScrollableExtraData_t
42 #define EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE)
72 if (this->viewPos == viewPos) {
108 if (viewSize >= fullSize)
110 else if (viewPos > fullSize - viewSize)
114 if (this->viewPos != viewPos) {
118 if (this->viewSize != viewSize) {
122 if (this->fullSize != fullSize) {
132 EXTRADATA(node).lua_onViewChange = LUA_NOREF;
148 updated =
EXTRADATA(node).scrollY.set(viewPos, viewSize, fullSize);
154 else if (
EXTRADATA(node).lua_onViewChange != LUA_NOREF) {
164 const int pos =
EXTRADATA(node).scrollY.viewPos - 10;
237 behaviour->
name =
"abstractscrollable";
#define Vector2Equal(a, b)
uiBehaviour_t * behaviour
bool UI_ExecuteLuaEventScript(uiNode_t *node, LUA_EVENT event)
Executes a lua event handler.
bool UI_Node_IsScrollableContainer(uiNode_t const *node)
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
SharedPtr< uiNode > UINodePtr
void UI_ExecuteEventActions(uiNode_t *source, const uiAction_t *firstAction)
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...
Contain the context of the calling of a function.
virtual void initNode(uiNode_t *node)
node behaviour, how a node work
#define Vector2Copy(src, dest)
const struct value_s * UI_RegisterNodeMethod(uiBehaviour_t *behaviour, const char *name, uiNodeMethod_t function)
Register a node method to a behaviour.