101#define UI_STARTDRAG_ALREADY_SENT -1
107#define LONGPRESS_DELAY 800
186 return UI_FocusSetNode(node);
192 if (UI_FocusSetNode(UI_GetNextActionNode(window->
firstChild)))
309 const value_t*
property =
nullptr;
312 if (node ==
nullptr) {
313 Com_Printf(
"UI_SetKeyBinding: node \"%s\" not found.\n", path);
318 Com_Error(
ERR_FATAL,
"UI_SetKeyBinding: Only node and method are supported. Property @%s not found in path \"%s\".", property->string, path);
325 binding->inherited = inherited;
336 for (
int windowId = 0; windowId <
ui_global.numWindows; windowId++) {
393 if (
binding->property ==
nullptr)
400 func(node, &newContext);
402 Com_Printf(
"UI_KeyPressedInWindow: @%s not supported.",
binding->property->string);
476 if (lastWindowId < 0)
480 for (
int windowId =
ui_global.windowStackPos - 1; windowId >= lastWindowId; windowId--) {
519 assert(node !=
nullptr);
626 if (node == commonNode)
632 commonNode = commonNode->
parent;
637 while (node != commonNode) {
648 while (node->
parent != commonNode)
666#define UI_IsMouseInvalidate() (oldMousePosX == -1)
812 if (node !=
nullptr) {
void CL_ActorSetMode(le_t *actor, actorModes_t actorMode)
bool CL_ActorFireModeActivated(const actorModes_t mode)
Checks whether we are in fire mode or node.
bool CL_BattlescapeRunning(void)
Check whether we already have actors spawned on the battlefield.
const char * Key_KeynumToString(int keynum)
Convert a given keynum to string.
Header file for keyboard handler.
Share stuff between the different cgame implementations.
void Com_Error(int code, const char *fmt,...)
void Com_Printf(const char *const fmt,...)
#define Mem_PoolStrDup(in, pool, tagNum)
bool Q_strnull(const char *string)
void Q_strcat(char *dest, size_t destsize, const char *format,...)
Safely (without overflowing the destination buffer) concatenates two strings.
Contain the context of the calling of a function.
Atomic structure used to define most of the UI.
struct uiKeyBinding_s * key
struct uiAction_s * onClick
struct uiAction_s * onMouseEnter
void UI_ExecuteEventActions(uiNode_t *source, const uiAction_t *firstAction)
void(* uiNodeMethod_t)(uiNode_t *node, const struct uiCallContext_s *context)
Signature of a function to bind a node method.
bool UI_DNDIsDragging(void)
Return true if we are dragging something.
void UI_DNDAbort(void)
Drop the object at the current position.
Internal data use by the UI package.
#define UI_MAX_WINDOWSTACK
bool UI_Node_KeyReleased(uiNode_t *node, unsigned int key, unsigned short unicode)
void UI_Node_FocusLost(uiNode_t *node)
void UI_Node_Activate(uiNode_t *node)
void UI_Node_FocusGained(uiNode_t *node)
bool UI_Node_KeyPressed(uiNode_t *node, unsigned int key, unsigned short unicode)
void UI_Node_MouseUp(uiNode_t *node, int x, int y, int button)
void UI_Node_MouseDown(uiNode_t *node, int x, int y, int button)
void UI_Node_MouseLeave(uiNode_t *node)
void UI_Node_MouseMove(uiNode_t *node, int x, int y)
bool UI_Node_Scroll(uiNode_t *node, int deltaX, int deltaY)
void UI_Node_MouseEnter(uiNode_t *node)
bool UI_Node_MouseLongPress(uiNode_t *node, int x, int y, int button)
void UI_Node_CapturedMouseMove(uiNode_t *node, int x, int y)
void UI_Node_CapturedMouseLost(uiNode_t *node)
void UI_Node_LeftClick(uiNode_t *node, int x, int y)
bool UI_Node_StartDragging(uiNode_t *node, int startX, int startY, int currentX, int currentY, int button)
void UI_Node_RightClick(uiNode_t *node, int x, int y)
void UI_Node_MiddleClick(uiNode_t *node, int x, int y)
C interface to allow to access to cpp node code.
bool UI_WindowIsModal(uiNode_t const *const node)
True if the window is a modal.
void UI_WindowNodeRegisterKeyBinding(uiNode_t *node, uiKeyBinding_t *binding)
Add a key binding to a window node. Window node store key bindings for his node child.
uiKeyBinding_t * UI_WindowNodeGetKeyBinding(uiNode_t const *const node, unsigned int key)
Search a a key binding from a window node. Window node store key bindings for his node child.
bool UI_WindowIsDropDown(uiNode_t const *const node)
True if the window is a drop down.
const uiKeyBinding_t * binding
bool UI_CheckVisibility(uiNode_t *node)
Check the if conditions for a given node.
void UI_ReadNodePath(const char *path, const uiNode_t *relativeNode, const uiNode_t *iterationNode, uiNode_t **resultNode, const value_t **resultProperty, value_t *luaMethod)
Read a path and return every we can use (node and property).
uiNode_t * UI_GetNodeAtPosition(int x, int y)
Return the first visible node at a position.
void UI_TimerStop(uiTimer_t *timer)
Stop a timer.
uiTimer_t * UI_AllocTimer(uiNode_t *node, int firstDelay, timerCallback_t callback)
Allocate a new time for a node.
void UI_TimerStart(uiTimer_t *timer)
Restart a timer.
void UI_MoveWindowOnTop(uiNode_t *window)
Move the window on top of compatible windows. "Compatible" mean non full screen windows,...
int UI_GetLastFullScreenWindow(void)
Returns the ID of the last fullscreen ID. Before this, window should be hidden.
void UI_PopWindow(bool all)
Pops a window from the window stack.
void UI_PopWindowWithEscKey(void)