|
UFO: Alien Invasion
|

Go to the source code of this file.
Data Structures | |
| struct | uiKeyBinding_t |
Macros | |
| #define | UI_MAX_KEYBINDING 128 |
Functions | |
| void | UI_SetKeyBinding (const char *path, int key, const char *description) |
| Set a binding from a key to a node to active. | |
| void | UI_MouseScroll (int deltaX, int deltaY) |
| Called when we are in UI mode and scroll via mousewheel. | |
| void | UI_MouseMove (int x, int y) |
| Is called every time the mouse position change. | |
| void | UI_MouseDown (int x, int y, int button) |
| Called when we are in UI mode and down a mouse button. | |
| void | UI_MouseUp (int x, int y, int button) |
| Called when we are in UI mode and up a mouse button. | |
| void | UI_InvalidateMouse (void) |
| Force to invalidate the mouse position and then to update hover nodes... | |
| bool | UI_CheckMouseMove (void) |
| Call mouse move only if the mouse position change. | |
| uiNode_t * | UI_GetHoveredNode (void) |
| Get the current hovered node. | |
| void | UI_ResetInput (void) |
| void | UI_RequestFocus (uiNode_t *node) |
| request the focus for a node | |
| bool | UI_HasFocus (uiNode_t const *node) |
| check if a node got the focus | |
| void | UI_RemoveFocus (void) |
| bool | UI_KeyRelease (unsigned int key, unsigned short unicode) |
| Called by the client when the user released a key. | |
| bool | UI_KeyPressed (unsigned int key, unsigned short unicode) |
| Called by the client when the user type a key. | |
| int | UI_GetKeyBindingCount (void) |
| uiKeyBinding_t * | UI_GetKeyBindingByIndex (int index) |
| uiNode_t * | UI_GetMouseCapture (void) |
| Return the captured node. | |
| void | UI_SetMouseCapture (uiNode_t *node) |
| Captured the mouse into a node. | |
| void | UI_MouseRelease (void) |
| Release the captured node. | |
| void | UI_ReleaseInput (void) |
| Release all captured input (keyboard or mouse). | |
| #define UI_MAX_KEYBINDING 128 |
Definition at line 30 of file ui_input.h.
Referenced by UI_AllocStaticKeyBinding().
| bool UI_CheckMouseMove | ( | void | ) |
Call mouse move only if the mouse position change.
Definition at line 569 of file ui_input.cpp.
References hoveredNode, mousePosX, mousePosY, oldMousePosX, oldMousePosY, UI_CheckVisibility(), UI_InvalidateMouse(), and UI_MouseMove().
Referenced by UI_Draw().
Get the current hovered node.
Definition at line 552 of file ui_input.cpp.
References hoveredNode.
Referenced by UI_BeforeDeletingNode(), UI_Draw(), and UI_IsMouseOnWindow().
| uiKeyBinding_t * UI_GetKeyBindingByIndex | ( | int | index | ) |
Definition at line 277 of file ui_input.cpp.
References index, and ui_global.
Referenced by CLMN_AddUIBindings(), and Key_WriteBindings().
Definition at line 272 of file ui_input.cpp.
References ui_global.
Referenced by CLMN_AddUIBindings(), and Key_WriteBindings().
Return the captured node.
Definition at line 508 of file ui_input.cpp.
References capturedNode.
Referenced by uiSelectBoxNode::draw(), uiVScrollbarNode::draw(), uiEditorNode::drawOverWindow(), uiSelectBoxNode::onLeftClick(), uiEditorNode::onMouseDown(), uiMessageListNode::onMouseDown(), uiOptionListNode::onMouseDown(), uiOptionTreeNode::onMouseDown(), uiTextNode::onMouseDown(), uiPanelNode::onMouseLongPress(), uiBaseInventoryNode::onMouseUp(), uiContainerNode::onMouseUp(), uiEditorNode::onMouseUp(), uiMessageListNode::onMouseUp(), uiModelNode::onMouseUp(), uiOptionListNode::onMouseUp(), uiOptionTreeNode::onMouseUp(), uiPanelNode::onMouseUp(), uiSpinnerNode::onMouseUp(), uiTextNode::onMouseUp(), uiVScrollbarNode::onMouseUp(), UI_FocusExecuteActionNode(), UI_FocusNextActionNode(), UI_IsMouseOnWindow(), UI_KeyPressed(), and UI_RemoveFocus().
| bool UI_HasFocus | ( | uiNode_t const * | node | ) |
check if a node got the focus
Definition at line 230 of file ui_input.cpp.
References focusNode.
Referenced by uiTextEntryNode::draw(), uiTextEntryNode::onLeftClick(), UI_TextEntryNodeFocus(), and UI_TextEntryNodeUnFocus().
Force to invalidate the mouse position and then to update hover nodes...
Definition at line 560 of file ui_input.cpp.
References oldMousePosX, and oldMousePosY.
Referenced by UI_BeforeDeletingNode(), UI_CheckMouseMove(), UI_CloseWindowByRef(), UI_DeleteWindowFromStack(), UI_DNDAbort(), UI_DNDDrop(), UI_MouseRelease(), UI_PushWindow(), and UI_Reinit().
| bool UI_KeyPressed | ( | unsigned int | key, |
| unsigned short | unicode ) |
Called by the client when the user type a key.
| [in] | key | key code, either K_ value or lowercase ascii |
| [in] | unicode | translated meaning of keypress in unicode |
Definition at line 430 of file ui_input.cpp.
References CL_ActorFireModeActivated(), CL_ActorSetMode(), CL_BattlescapeRunning(), focusNode, K_ENTER, K_ESCAPE, K_KP_ENTER, K_TAB, key, M_MOVE, selActor, UI_DNDAbort(), UI_DNDIsDragging(), UI_FocusExecuteActionNode(), UI_FocusNextActionNode(), UI_GetLastFullScreenWindow(), UI_GetMouseCapture(), ui_global, UI_KeyPressedInWindow(), UI_MouseRelease(), UI_Node_KeyPressed(), UI_PopWindowWithEscKey(), UI_WindowIsModal(), and unicode.
Referenced by Key_Event().
| bool UI_KeyRelease | ( | unsigned int | key, |
| unsigned short | unicode ) |
Called by the client when the user released a key.
| [in] | key | key code, either K_ value or lowercase ascii |
| [in] | unicode | translated meaning of keypress in unicode |
Definition at line 413 of file ui_input.cpp.
References focusNode, key, UI_Node_KeyReleased(), and unicode.
Referenced by Key_Event().
Called when we are in UI mode and down a mouse button.
Definition at line 801 of file ui_input.cpp.
References capturedNode, hoveredNode, LONGPRESS_DELAY, longPressTimer, pressedNode, pressedNodeButton, pressedNodeLocationX, pressedNodeLocationY, uiNode_t::root, UI_AllocTimer(), UI_LongPressCallback(), UI_MoveWindowOnTop(), UI_Node_MouseDown(), UI_TimerStart(), and UI_TimerStop().
Referenced by CL_LeftClickDown_f(), CL_MiddleClickDown_f(), and CL_RightClickDown_f().
Is called every time the mouse position change.
Definition at line 588 of file ui_input.cpp.
References capturedNode, hoveredNode, longPressTimer, oldHoveredNode, uiNode_t::parent, pressedNode, pressedNodeButton, pressedNodeLocationX, pressedNodeLocationY, UI_DNDIsDragging(), UI_GetNodeAtPosition(), UI_Node_CapturedMouseMove(), UI_Node_MouseEnter(), UI_Node_MouseLeave(), UI_Node_MouseMove(), UI_Node_StartDragging(), UI_STARTDRAG_ALREADY_SENT, and UI_TimerStop().
Referenced by UI_CheckMouseMove().
Release the captured node.
Definition at line 526 of file ui_input.cpp.
References capturedNode, UI_InvalidateMouse(), and UI_Node_CapturedMouseLost().
Referenced by uiBaseInventoryNode::onCapturedMouseMove(), uiContainerNode::onCapturedMouseMove(), uiSelectBoxNode::onLeftClick(), uiEditorNode::onMouseDown(), uiBarNode::onMouseUp(), uiBaseInventoryNode::onMouseUp(), uiContainerNode::onMouseUp(), uiControlNode::onMouseUp(), uiGeoscapeNode::onMouseUp(), uiMessageListNode::onMouseUp(), uiModelNode::onMouseUp(), uiOptionListNode::onMouseUp(), uiOptionTreeNode::onMouseUp(), uiPanelNode::onMouseUp(), uiRadarNode::onMouseUp(), uiSpinnerNode::onMouseUp(), uiTextNode::onMouseUp(), uiVScrollbarNode::onMouseUp(), uiZoneNode::onMouseUp(), UI_EditorNodeStop(), UI_KeyPressed(), and UI_ReleaseInput().
Called when we are in UI mode and scroll via mousewheel.
Definition at line 756 of file ui_input.cpp.
References capturedNode, hoveredNode, uiNode_t::parent, and UI_Node_Scroll().
Referenced by CL_WheelDown_f(), and CL_WheelUp_f().
Called when we are in UI mode and up a mouse button.
Definition at line 839 of file ui_input.cpp.
References capturedNode, hoveredNode, K_MOUSE1, K_MOUSE2, K_MOUSE3, longPressTimer, pressedNode, UI_LeftClick(), UI_MiddleClick(), UI_Node_MouseUp(), UI_RightClick(), and UI_TimerStop().
Referenced by CL_LeftClickUp_f(), CL_MiddleClickUp_f(), and CL_RightClickUp_f().
Release all captured input (keyboard or mouse).
Definition at line 496 of file ui_input.cpp.
References UI_DNDAbort(), UI_DNDIsDragging(), UI_MouseRelease(), and UI_RemoveFocus().
Referenced by IN_Frame(), Key_SetDest(), UI_CloseWindowByRef(), UI_PushWindow(), and UI_Reinit().
Definition at line 241 of file ui_input.cpp.
References focusNode, UI_GetMouseCapture(), and UI_Node_FocusLost().
Referenced by uiTextEntryNode::onKeyPressed(), UI_FocusNextActionNode(), UI_ReleaseInput(), and UI_TextEntryNodeUnFocus().
request the focus for a node
Definition at line 206 of file ui_input.cpp.
References focusNode, UI_Node_FocusGained(), and UI_Node_FocusLost().
Referenced by uiTextEntryNode::onLeftClick(), and UI_TextEntryNodeFocus().
Definition at line 538 of file ui_input.cpp.
References capturedNode, focusNode, hoveredNode, longPressTimer, oldHoveredNode, and pressedNode.
Referenced by UI_Shutdown().
Set a binding from a key to a node to active.
| path | Path to a node, or a node method |
| key | The key number to use (see for example the K_* names are matched up.) |
| description | Textual description of what the key/cmd does (for tooltip) |
check: only one binding per nodes?
check: key per window must be unique
check: key used into UI_KeyPressed can't be used
Definition at line 362 of file ui_input.cpp.
References key, and UI_SetKeyBindingEx().
Referenced by Key_Bind_f().
Captured the mouse into a node.
Definition at line 516 of file ui_input.cpp.
References capturedNode.
Referenced by uiSelectBoxNode::onLeftClick(), uiBarNode::onMouseDown(), uiBaseInventoryNode::onMouseDown(), uiContainerNode::onMouseDown(), uiControlNode::onMouseDown(), uiMessageListNode::onMouseDown(), uiModelNode::onMouseDown(), uiOptionListNode::onMouseDown(), uiOptionTreeNode::onMouseDown(), uiRadarNode::onMouseDown(), uiSpinnerNode::onMouseDown(), uiTextNode::onMouseDown(), uiZoneNode::onMouseDown(), uiPanelNode::onMouseLongPress(), uiGeoscapeNode::onStartDragging(), uiGeoscapeNode::startMouseShifting(), UI_EditorNodeStart(), and UI_VScrollbarNodeAction().