82 if (x > 0 && x < node->box.size[0] && y > 0 && y < node->box.size[1]) {
124 if (hovered && hovered->
root == node->
root)
138 const int diffX = x -
startX;
139 const int diffY = y -
startY;
206 if (selected ==
nullptr)
228 if (hovered && hovered->
root == node->
root) {
239 if (hovered ==
nullptr) {
298 for (
i = 0;
i < depth;
i++) {
351 behaviour->
name =
"editor";
Header file for keyboard handler.
void drawOverWindow(uiNode_t *node) override
void onCapturedMouseMove(uiNode_t *node, int x, int y) override
void onMouseDown(uiNode_t *node, int x, int y, int button) override
void onMouseUp(uiNode_t *node, int x, int y, int button) override
void onCapturedMouseLost(uiNode_t *node) override
Called when the node have lost the captured node.
void draw(uiNode_t *node) override
const char * Cmd_Argv(int arg)
Returns a given argument.
void Cmd_AddParamCompleteFunction(const char *cmdName, int(*function)(const char *partial, const char **match))
int Cmd_Argc(void)
Return the number of arguments of the current command. "command parameter" will result in a argc of 2...
void Cmd_AddCommand(const char *cmdName, xcommand_t function, const char *desc)
Add a new command to the script interface.
void Com_Printf(const char *const fmt,...)
cvar_t * Cvar_Set(const char *varName, const char *value,...)
Sets a cvar value.
int FS_Printf(qFILE *f, const char *msg,...)
Can print chunks for 1024 chars into a file.
int FS_OpenFile(const char *filename, qFILE *file, filemode_t mode)
Finds and opens the file in the search path.
void Sys_Error(const char *error,...)
Header for lua script functions.
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
node behaviour, how a node work
Contain the context of the calling of a function.
Atomic structure used to define most of the UI.
uiBehaviour_t * behaviour
const struct value_s * UI_RegisterNodeMethod(uiBehaviour_t *behaviour, const char *name, uiNodeMethod_t function)
Register a node method to a behaviour.
void UI_CaptureDrawOver(uiNode_t *node)
Capture a node we will draw over all nodes (per window).
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_NodeSetSize(uiNode_t *node, vec2_t size)
Update the node size and fire the size callback.
void UI_NodeAbsoluteToRelativePos(const uiNode_t *node, int *x, int *y)
Update an absolute position to a relative one.
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
SharedPtr< uiNode > UINodePtr
@ ZONE_BOTTOMRIGHT_CORNER
static zoneNode_t dragStatus
static void UI_EditorNodeStart(uiNode_t *node, const uiCallContext_t *context)
static void UI_EditorNodeExtract_f(void)
static void UI_EditorNodeHighlightNode(uiNode_t *node, const vec4_t color, bool displayAnchor)
static void UI_EditorNodeSelectFirstChild(uiNode_t *node, const uiCallContext_t *context)
void UI_RegisterEditorNode(uiBehaviour_t *behaviour)
static uiNode_t * anchoredNode
static void UI_EditorNodeSelectParent(uiNode_t *node, const uiCallContext_t *context)
static void UI_EditorNodeSelectNext(uiNode_t *node, const uiCallContext_t *context)
static void UI_EditorNodeExtractNode(qFILE *file, uiNode_t *node, int depth)
static zoneNode_t UI_EditorNodeGetElementAtPosition(uiNode_t *node, int x, int y)
static void UI_EditorNodeSelectNode(uiNode_t *node, uiNode_t *selected)
static void UI_EditorNodeStop(uiNode_t *node, const uiCallContext_t *context)
static const int anchorSize
uiNode_t * UI_GetNodeAtPosition(int x, int y)
Return the first visible node at a position.
void UI_DrawRect(int x, int y, int w, int h, const vec4_t color, float lineWidth, int pattern)
void UI_DrawFill(int x, int y, int w, int h, const vec4_t color)
Fills a box of pixels with a single color.
uiNode_t * UI_GetWindow(const char *name)
Searches all windows for the specified one.
int UI_CompleteWithWindow(const char *partial, const char **match)
Complete function for ui_push.