#include "../ui_nodes.h"
#include "../ui_parse.h"
#include "../ui_timer.h"
#include "../ui_actions.h"
#include "../ui_input.h"
#include "../ui_render.h"
#include "ui_node_abstractnode.h"
#include "ui_node_abstractscrollbar.h"
#include "ui_node_vscrollbar.h"
#include "../../input/cl_input.h"
#include "../../input/cl_keys.h"
Go to the source code of this file.
Defines | |
#define | EXTRADATA(node) UI_EXTRADATA(node, abstractScrollbarExtraData_t) |
Functions | |
static void | UI_VScrollbarNodeGetElementSize (uiNode_t *node, int description[5]) |
Return size of all elements of the scrollbar. | |
static int | UI_VScrollbarNodeGetElement (uiNode_t *node, int description[5], int x, int y) |
Get an element of the scrollbar at a position. | |
static void | UI_VScrollbarNodeSet (uiNode_t *node, int value) |
Set the position of the scrollbar to a value. | |
static void | UI_VScrollbarNodeDiff (uiNode_t *node, int value) |
Translate the position to a value. | |
static void | UI_VScrollbarNodeAction (uiNode_t *node, int hoveredElement, qboolean allowCapture) |
static void | UI_VScrollbarNodeRepeat (uiNode_t *node, uiTimer_t *timer) |
static void | UI_ActiveVScrollbarNode_f () |
Active an element of a vscrollbarnode. | |
static void | UI_VScrollbarNodeMouseDown (uiNode_t *node, int x, int y, int button) |
static void | UI_VScrollbarNodeMouseUp (uiNode_t *node, int x, int y, int button) |
static void | UI_VScrollbarNodeCapturedMouseLost (uiNode_t *node) |
Called when the node have lost the captured node We clean cached data. | |
static void | UI_VScrollbarNodeWheel (uiNode_t *node, qboolean down, int x, int y) |
Called when the user wheel the mouse over the node. | |
static void | UI_VScrollbarNodeCapturedMouseMove (uiNode_t *node, int x, int y) |
Called when the node is captured by the mouse. | |
static void | UI_VScrollbarNodeDraw (uiNode_t *node) |
Call to draw the node. | |
static void | UI_VScrollbarNodeLoading (uiNode_t *node) |
static void | UI_VScrollbarNodeLoaded (uiNode_t *node) |
void | UI_RegisterVScrollbarNode (uiBehaviour_t *behaviour) |
Variables | |
static const int | TILE_WIDTH = 32 |
static const int | TILE_HEIGHT = 18 |
static const int | ELEMENT_WIDTH = 19 |
static const int | ELEMENT_HEIGHT = 16 |
static int | oldPos |
static int | oldMouseY |
static uiTimer_t * | capturedTimer |
static int | capturedElement |
implement disabled
robustness
Definition in file ui_node_vscrollbar.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, abstractScrollbarExtraData_t) |
Definition at line 50 of file ui_node_vscrollbar.c.
static void UI_ActiveVScrollbarNode_f | ( | ) | [static] |
Active an element of a vscrollbarnode.
Definition at line 194 of file ui_node_vscrollbar.c.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), qfalse, UI_GetNodeByPath(), UI_NodeInstanceOf(), and UI_VScrollbarNodeAction().
Referenced by UI_RegisterVScrollbarNode().
void UI_RegisterVScrollbarNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 425 of file ui_node_vscrollbar.c.
References uiBehaviour_s::capturedMouseLost, uiBehaviour_s::capturedMouseMove, Cmd_AddCommand(), uiBehaviour_s::draw, uiBehaviour_s::extends, uiBehaviour_s::loaded, uiBehaviour_s::loading, uiBehaviour_s::mouseDown, uiBehaviour_s::mouseUp, uiBehaviour_s::mouseWheel, uiBehaviour_s::name, UI_ActiveVScrollbarNode_f(), UI_VScrollbarNodeCapturedMouseLost(), UI_VScrollbarNodeCapturedMouseMove(), UI_VScrollbarNodeDraw(), UI_VScrollbarNodeLoaded(), UI_VScrollbarNodeLoading(), UI_VScrollbarNodeMouseDown(), UI_VScrollbarNodeMouseUp(), and UI_VScrollbarNodeWheel().
static void UI_VScrollbarNodeAction | ( | uiNode_t * | node, | |
int | hoveredElement, | |||
qboolean | allowCapture | |||
) | [inline, static] |
Definition at line 137 of file ui_node_vscrollbar.c.
References capturedElement, EXTRADATA, mousePosY, oldMouseY, oldPos, qfalse, UI_AllocTimer(), UI_SetMouseCapture(), UI_TimerStart(), UI_VScrollbarNodeDiff(), and UI_VScrollbarNodeRepeat().
Referenced by UI_ActiveVScrollbarNode_f(), UI_VScrollbarNodeMouseDown(), and UI_VScrollbarNodeRepeat().
static void UI_VScrollbarNodeCapturedMouseLost | ( | uiNode_t * | node | ) | [static] |
Called when the node have lost the captured node We clean cached data.
Definition at line 249 of file ui_node_vscrollbar.c.
References UI_TimerRelease().
Referenced by UI_RegisterVScrollbarNode().
static void UI_VScrollbarNodeCapturedMouseMove | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Called when the node is captured by the mouse.
Definition at line 273 of file ui_node_vscrollbar.c.
References capturedElement, ELEMENT_HEIGHT, EXTRADATA, oldMouseY, oldPos, pos, uiNode_s::size, and UI_VScrollbarNodeSet().
Referenced by UI_RegisterVScrollbarNode().
static void UI_VScrollbarNodeDiff | ( | uiNode_t * | node, | |
int | value | |||
) | [inline, static] |
Translate the position to a value.
Definition at line 120 of file ui_node_vscrollbar.c.
References EXTRADATA, pos, and UI_VScrollbarNodeSet().
Referenced by UI_VScrollbarNodeAction().
static void UI_VScrollbarNodeDraw | ( | uiNode_t * | node | ) | [static] |
Call to draw the node.
Definition at line 294 of file ui_node_vscrollbar.c.
References capturedElement, ELEMENT_HEIGHT, ELEMENT_WIDTH, EXTRADATA, uiNode_s::image, mousePosX, mousePosY, pos, uiNode_s::size, uiNode_s::state, TILE_HEIGHT, TILE_WIDTH, UI_DrawNormImage(), UI_GetMouseCapture(), UI_GetNodeAbsPos(), UI_GetReferenceString(), UI_LoadImage(), UI_VScrollbarNodeGetElement(), and UI_VScrollbarNodeGetElementSize().
Referenced by UI_RegisterVScrollbarNode().
static int UI_VScrollbarNodeGetElement | ( | uiNode_t * | node, | |
int | description[5], | |||
int | x, | |||
int | y | |||
) | [static] |
Get an element of the scrollbar at a position.
[in] | node | Absolute position y |
[in] | description | Size of each scroll bar elements (beginarrow, mid, scroll, mid, endarrow) |
[in] | x | Absolute position x |
[in] | y | Absolute position y |
Definition at line 76 of file ui_node_vscrollbar.c.
References i, and UI_NodeAbsoluteToRelativePos().
Referenced by UI_VScrollbarNodeDraw(), and UI_VScrollbarNodeMouseDown().
static void UI_VScrollbarNodeGetElementSize | ( | uiNode_t * | node, | |
int | description[5] | |||
) | [static] |
Return size of all elements of the scrollbar.
Definition at line 55 of file ui_node_vscrollbar.c.
References ELEMENT_HEIGHT, EXTRADATA, and uiNode_s::size.
Referenced by UI_VScrollbarNodeDraw(), and UI_VScrollbarNodeMouseDown().
static void UI_VScrollbarNodeLoaded | ( | uiNode_t * | node | ) | [static] |
Definition at line 417 of file ui_node_vscrollbar.c.
References Com_DPrintf(), DEBUG_CLIENT, ELEMENT_HEIGHT, uiNode_s::size, and UI_GetPath().
Referenced by UI_RegisterVScrollbarNode().
static void UI_VScrollbarNodeLoading | ( | uiNode_t * | node | ) | [static] |
Definition at line 412 of file ui_node_vscrollbar.c.
References uiNode_s::size.
Referenced by UI_RegisterVScrollbarNode().
static void UI_VScrollbarNodeMouseDown | ( | uiNode_t * | node, | |
int | x, | |||
int | y, | |||
int | button | |||
) | [static] |
Definition at line 218 of file ui_node_vscrollbar.c.
References EXTRADATA, K_MOUSE1, qtrue, UI_VScrollbarNodeAction(), UI_VScrollbarNodeGetElement(), and UI_VScrollbarNodeGetElementSize().
Referenced by UI_RegisterVScrollbarNode().
static void UI_VScrollbarNodeMouseUp | ( | uiNode_t * | node, | |
int | x, | |||
int | y, | |||
int | button | |||
) | [static] |
Definition at line 233 of file ui_node_vscrollbar.c.
References EXTRADATA, K_MOUSE1, UI_GetMouseCapture(), and UI_MouseRelease().
Referenced by UI_RegisterVScrollbarNode().
Definition at line 127 of file ui_node_vscrollbar.c.
References uiTimer_s::calledTime, capturedElement, uiTimer_s::delay, qfalse, and UI_VScrollbarNodeAction().
Referenced by UI_VScrollbarNodeAction().
static void UI_VScrollbarNodeSet | ( | uiNode_t * | node, | |
int | value | |||
) | [static] |
Set the position of the scrollbar to a value.
Definition at line 91 of file ui_node_vscrollbar.c.
References EXTRADATA, uiNode_s::onChange, pos, and UI_ExecuteEventActions().
Referenced by UI_VScrollbarNodeCapturedMouseMove(), UI_VScrollbarNodeDiff(), and UI_VScrollbarNodeWheel().
Called when the user wheel the mouse over the node.
Definition at line 260 of file ui_node_vscrollbar.c.
References EXTRADATA, pos, and UI_VScrollbarNodeSet().
Referenced by UI_RegisterVScrollbarNode().
int capturedElement [static] |
Definition at line 48 of file ui_node_vscrollbar.c.
Referenced by UI_VScrollbarNodeAction(), UI_VScrollbarNodeCapturedMouseMove(), UI_VScrollbarNodeDraw(), and UI_VScrollbarNodeRepeat().
uiTimer_t* capturedTimer [static] |
Definition at line 47 of file ui_node_vscrollbar.c.
const int ELEMENT_HEIGHT = 16 [static] |
Definition at line 43 of file ui_node_vscrollbar.c.
Referenced by UI_VScrollbarNodeCapturedMouseMove(), UI_VScrollbarNodeDraw(), UI_VScrollbarNodeGetElementSize(), and UI_VScrollbarNodeLoaded().
const int ELEMENT_WIDTH = 19 [static] |
Definition at line 42 of file ui_node_vscrollbar.c.
Referenced by UI_VScrollbarNodeDraw().
int oldMouseY [static] |
Definition at line 46 of file ui_node_vscrollbar.c.
Referenced by UI_VScrollbarNodeAction(), and UI_VScrollbarNodeCapturedMouseMove().
int oldPos [static] |
Definition at line 45 of file ui_node_vscrollbar.c.
Referenced by AI_PrepBestAction(), CL_GetEventTime(), G_ShootGrenade(), UI_VScrollbarNodeAction(), and UI_VScrollbarNodeCapturedMouseMove().
const int TILE_HEIGHT = 18 [static] |
Definition at line 41 of file ui_node_vscrollbar.c.
const int TILE_WIDTH = 32 [static] |
Definition at line 40 of file ui_node_vscrollbar.c.
Referenced by UI_VScrollbarNodeDraw().