The spinner node is a vertical widget used to change a value. More...
#include "../ui_nodes.h"
#include "../ui_parse.h"
#include "../ui_main.h"
#include "../ui_input.h"
#include "../ui_timer.h"
#include "../ui_actions.h"
#include "../ui_render.h"
#include "ui_node_spinner.h"
#include "ui_node_abstractvalue.h"
#include "ui_node_abstractnode.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, abstractValueExtraData_t) |
Functions | |
static void | UI_SpinnerNodeStep (uiNode_t *node, qboolean down) |
change the value of the spinner of one step | |
static void | UI_SpinnerNodeRepeat (uiNode_t *node, uiTimer_t *timer) |
static void | UI_SpinnerNodeDown (uiNode_t *node, int x, int y, int button) |
static void | UI_SpinnerNodeUp (uiNode_t *node, int x, int y, int button) |
static void | UI_SpinnerNodeCapturedMouseLost (uiNode_t *node) |
Called when the node have lost the captured node We clean cached data. | |
static void | UI_SpinnerNodeWheel (uiNode_t *node, qboolean down, int x, int y) |
static void | UI_SpinnerNodeDraw (uiNode_t *node) |
static void | UI_SpinnerNodeLoaded (uiNode_t *node) |
void | UI_RegisterSpinnerNode (uiBehaviour_t *behaviour) |
Variables | |
static const uiBehaviour_t const * | localBehaviour |
static const int | TILE_SIZE = 32 |
static const int | SPINNER_WIDTH = 15 |
static const int | SPINNER_HEIGHT = 19 |
static const int | BUTTON_TOP_SIZE = 9 |
static const int | BUTTON_BOTTOM_SIZE = 10 |
static qboolean | capturedDownButton |
static uiTimer_t * | capturedTimer = NULL |
static const value_t | properties [] |
The spinner node is a vertical widget used to change a value.
Definition in file ui_node_spinner.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, abstractValueExtraData_t) |
Definition at line 40 of file ui_node_spinner.c.
void UI_RegisterSpinnerNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 232 of file ui_node_spinner.c.
References uiBehaviour_s::capturedMouseLost, uiBehaviour_s::draw, uiBehaviour_s::extends, uiBehaviour_s::loaded, uiBehaviour_s::mouseDown, uiBehaviour_s::mouseUp, uiBehaviour_s::mouseWheel, uiBehaviour_s::name, uiBehaviour_s::properties, UI_SpinnerNodeCapturedMouseLost(), UI_SpinnerNodeDown(), UI_SpinnerNodeDraw(), UI_SpinnerNodeLoaded(), UI_SpinnerNodeUp(), and UI_SpinnerNodeWheel().
static void UI_SpinnerNodeCapturedMouseLost | ( | uiNode_t * | node | ) | [static] |
Called when the node have lost the captured node We clean cached data.
Definition at line 135 of file ui_node_spinner.c.
References UI_TimerRelease().
Referenced by UI_RegisterSpinnerNode().
static void UI_SpinnerNodeDown | ( | uiNode_t * | node, | |
int | x, | |||
int | y, | |||
int | button | |||
) | [static] |
Definition at line 112 of file ui_node_spinner.c.
References BUTTON_TOP_SIZE, capturedDownButton, K_MOUSE1, UI_AllocTimer(), UI_NodeAbsoluteToRelativePos(), UI_SetMouseCapture(), UI_SpinnerNodeRepeat(), UI_SpinnerNodeStep(), and UI_TimerStart().
Referenced by UI_RegisterSpinnerNode().
static void UI_SpinnerNodeDraw | ( | uiNode_t * | node | ) | [static] |
Definition at line 154 of file ui_node_spinner.c.
References BUTTON_BOTTOM_SIZE, BUTTON_TOP_SIZE, uiNode_s::disabled, EXTRADATA, uiNode_s::image, mousePosY, uiNode_s::parent, pos, SPINNER_HEIGHT, SPINNER_WIDTH, uiNode_s::state, TILE_SIZE, UI_DrawNormImageByName(), UI_GetNodeAbsPos(), UI_GetReferenceFloat(), and UI_GetReferenceString().
Referenced by UI_RegisterSpinnerNode().
static void UI_SpinnerNodeLoaded | ( | uiNode_t * | node | ) | [static] |
Definition at line 210 of file ui_node_spinner.c.
References uiBehaviour_s::loaded, uiNode_s::size, SPINNER_HEIGHT, SPINNER_WIDTH, and uiBehaviour_s::super.
Referenced by UI_RegisterSpinnerNode().
Definition at line 102 of file ui_node_spinner.c.
References uiTimer_s::calledTime, capturedDownButton, uiTimer_s::delay, and UI_SpinnerNodeStep().
Referenced by UI_SpinnerNodeDown().
change the value of the spinner of one step
[in] | node | Spinner to change |
[in] | down | Direction of the step (if down is true, decrease the value) |
Definition at line 55 of file ui_node_spinner.c.
References EXTRADATA, uiNode_s::onChange, UI_ExecuteEventActions(), UI_GetReferenceFloat(), and UI_SetCvar().
Referenced by UI_SpinnerNodeDown(), UI_SpinnerNodeRepeat(), and UI_SpinnerNodeWheel().
static void UI_SpinnerNodeUp | ( | uiNode_t * | node, | |
int | x, | |||
int | y, | |||
int | button | |||
) | [static] |
Definition at line 124 of file ui_node_spinner.c.
References K_MOUSE1, and UI_MouseRelease().
Referenced by UI_RegisterSpinnerNode().
Definition at line 146 of file ui_node_spinner.c.
References uiNode_s::disabled, uiNode_s::parent, and UI_SpinnerNodeStep().
Referenced by UI_RegisterSpinnerNode().
const int BUTTON_BOTTOM_SIZE = 10 [static] |
Definition at line 48 of file ui_node_spinner.c.
Referenced by UI_SpinnerNodeDraw().
const int BUTTON_TOP_SIZE = 9 [static] |
Definition at line 47 of file ui_node_spinner.c.
Referenced by UI_SpinnerNodeDown(), and UI_SpinnerNodeDraw().
qboolean capturedDownButton [static] |
Definition at line 99 of file ui_node_spinner.c.
Referenced by UI_SpinnerNodeDown(), and UI_SpinnerNodeRepeat().
uiTimer_t* capturedTimer = NULL [static] |
Definition at line 100 of file ui_node_spinner.c.
const uiBehaviour_t const* localBehaviour [static] |
Definition at line 42 of file ui_node_spinner.c.
const value_t properties[] [static] |
{ {NULL, V_NULL, 0, 0} }
Definition at line 218 of file ui_node_spinner.c.
const int SPINNER_HEIGHT = 19 [static] |
Definition at line 46 of file ui_node_spinner.c.
Referenced by UI_SpinnerNodeDraw(), and UI_SpinnerNodeLoaded().
const int SPINNER_WIDTH = 15 [static] |
Definition at line 45 of file ui_node_spinner.c.
Referenced by UI_SpinnerNodeDraw(), and UI_SpinnerNodeLoaded().
const int TILE_SIZE = 32 [static] |
Definition at line 44 of file ui_node_spinner.c.