ui_node_spinner.c File Reference

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"
Include dependency graph for ui_node_spinner.c:

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_tcapturedTimer = NULL
static const value_t properties []

Detailed Description

The spinner node is a vertical widget used to change a value.

Definition in file ui_node_spinner.c.


Define Documentation

#define EXTRADATA ( node   )     UI_EXTRADATA(node, abstractValueExtraData_t)

Definition at line 40 of file ui_node_spinner.c.


Function Documentation

void UI_RegisterSpinnerNode ( uiBehaviour_t behaviour  ) 
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]
static void UI_SpinnerNodeDraw ( uiNode_t node  )  [static]
static void UI_SpinnerNodeLoaded ( uiNode_t node  )  [static]
static void UI_SpinnerNodeRepeat ( uiNode_t node,
uiTimer_t timer 
) [static]
static void UI_SpinnerNodeStep ( uiNode_t node,
qboolean  down 
) [static]

change the value of the spinner of one step

Parameters:
[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().

static void UI_SpinnerNodeWheel ( uiNode_t node,
qboolean  down,
int  x,
int  y 
) [static]
Note:
Mouse wheel is not inhibited when node is disabled

Definition at line 146 of file ui_node_spinner.c.

References uiNode_s::disabled, uiNode_s::parent, and UI_SpinnerNodeStep().

Referenced by UI_RegisterSpinnerNode().


Variable Documentation

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().

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]
Initial value:
 {
    
    

    {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.


Generated by  doxygen 1.6.2