25 #include "../ui_nodes.h"
26 #include "../ui_parse.h"
27 #include "../ui_behaviour.h"
28 #include "../ui_actions.h"
29 #include "../ui_draw.h"
30 #include "../ui_render.h"
31 #include "../ui_lua.h"
32 #include "../../client.h"
33 #include "../../renderer/r_misc.h"
34 #include "../../renderer/r_draw.h"
35 #include "../../cinematic/cl_sequence.h"
40 #include "../../../common/scripts_lua.h"
42 #define EXTRADATA_TYPE sequenceExtraData_t
43 #define EXTRADATA(node) UI_EXTRADATA(node, EXTRADATA_TYPE)
44 #define EXTRADATACONST(node) UI_EXTRADATACONST(node, EXTRADATA_TYPE)
60 bool finished =
false;
80 else if (
EXTRADATA(node).lua_onEnd != LUA_NOREF) {
100 if (
EXTRADATA(node).context !=
nullptr) {
109 if (
EXTRADATA(node).context !=
nullptr) {
116 if (property == propertySource) {
119 }
else if (
EXTRADATA(node).context !=
nullptr) {
134 localBehaviour = behaviour;
135 behaviour->
name =
"sequence";
void onWindowOpened(uiNode_t *node, linkedList_t *params) override
void UI_PopClipRect(void)
void UI_Sequence_SetSource(uiNode_t *node, const char *name)
void onWindowClosed(uiNode_t *node) override
void draw(uiNode_t *node) override
bool UI_ExecuteLuaEventScript(uiNode_t *node, LUA_EVENT event)
Executes a lua event handler.
bool SEQ_InitContext(sequenceContext_t *context, const char *name)
Initialize a sequence context from data of a named script sequence.
void SEQ_SendClickEvent(sequenceContext_t *context)
Unlock a click event for the current sequence or ends the current sequence if not locked...
void SEQ_FreeContext(sequenceContext_t *context)
Free a sequence context.
void UI_FreeStringProperty(void *pointer)
Free a string property if it is allocated into ui_dynStringPool.
#define UI_RegisterExtradataNodeProperty(BEHAVIOUR, NAME, TYPE, EXTRADATATYPE, ATTRIBUTE)
Initialize a property from extradata of node.
memPool_t * ui_dynStringPool
void initNode(uiNode_t *node) override
SharedPtr< uiNode > UINodePtr
void UI_RegisterSequenceNode(uiBehaviour_t *behaviour)
void UI_ExecuteEventActions(uiNode_t *source, const uiAction_t *firstAction)
static const value_t * propertySource
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.
virtual void initNode(uiNode_t *node)
static const uiBehaviour_t * localBehaviour
void R_PopMatrix(void)
Removes the current matrix from the stack.
node behaviour, how a node work
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
bool SEQ_Render(sequenceContext_t *context)
Execute and render a sequence.
virtual void onPropertyChanged(uiNode_t *node, const value_t *property)
void UI_PushClipRect(int x, int y, int width, int height)
sequenceContext_t * SEQ_AllocContext(void)
Allocate a sequence context.
#define Mem_PoolStrDup(in, pool, tagNum)
void R_PushMatrix(void)
Push a new matrix to the stack.
void onLeftClick(uiNode_t *node, int x, int y) override
void SEQ_SetView(sequenceContext_t *context, vec2_t pos, vec2_t size)
Define the position of the viewport on the screen.
void onPropertyChanged(uiNode_t *node, const value_t *property) override
void R_CleanupDepthBuffer(int x, int y, int width, int height)
"Clean up" the depth buffer into a rect
void UI_GetNodeScreenPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node in the screen. Screen position is not used for the node rende...