ui_node_bar.c File Reference

The bar node display a graphical horizontal slider. We can use it to allow the user to select a value in a range. Or we can use it do only display a value (in this case, you must disable it). More...

#include "../ui_nodes.h"
#include "../ui_parse.h"
#include "../ui_main.h"
#include "../ui_input.h"
#include "../ui_render.h"
#include "../ui_actions.h"
#include "ui_node_bar.h"
#include "ui_node_abstractvalue.h"
#include "ui_node_abstractnode.h"
#include "../../input/cl_keys.h"
Include dependency graph for ui_node_bar.c:

Go to the source code of this file.

Defines

#define EXTRADATA_TYPE   barExtraData_t
#define EXTRADATA(node)   UI_EXTRADATA(node, EXTRADATA_TYPE)

Functions

static void UI_BarNodeDraw (uiNode_t *node)
static void UI_BarNodeCapturedMouseMove (uiNode_t *node, int x, int y)
 Called when the node is captured by the mouse.
static void UI_BarNodeMouseDown (uiNode_t *node, int x, int y, int button)
static void UI_BarNodeMouseUp (uiNode_t *node, int x, int y, int button)
static void UI_BarNodeLoading (uiNode_t *node)
 Called before loading. Used to set default attribute values.
void UI_RegisterBarNode (uiBehaviour_t *behaviour)

Variables

static const value_t properties []
 Valid properties for a bar node.

Detailed Description

The bar node display a graphical horizontal slider. We can use it to allow the user to select a value in a range. Or we can use it do only display a value (in this case, you must disable it).

Definition in file ui_node_bar.c.


Define Documentation

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

Definition at line 41 of file ui_node_bar.c.

#define EXTRADATA_TYPE   barExtraData_t

Definition at line 40 of file ui_node_bar.c.


Function Documentation

static void UI_BarNodeCapturedMouseMove ( uiNode_t node,
int  x,
int  y 
) [static]
static void UI_BarNodeDraw ( uiNode_t node  )  [static]
static void UI_BarNodeLoading ( uiNode_t node  )  [static]

Called before loading. Used to set default attribute values.

Definition at line 160 of file ui_node_bar.c.

References ALIGN_CR, uiNode_s::color, EXTRADATA, and Vector4Set.

Referenced by UI_RegisterBarNode().

static void UI_BarNodeMouseDown ( uiNode_t node,
int  x,
int  y,
int  button 
) [static]
static void UI_BarNodeMouseUp ( uiNode_t node,
int  x,
int  y,
int  button 
) [static]

Definition at line 151 of file ui_node_bar.c.

References K_MOUSE1, and UI_MouseRelease().

Referenced by UI_RegisterBarNode().

void UI_RegisterBarNode ( uiBehaviour_t behaviour  ) 

Variable Documentation

const value_t properties[] [static]
Initial value:
 {
    
    {"direction", V_UI_ALIGN, UI_EXTRADATA_OFFSETOF(barExtraData_t, orientation), MEMBER_SIZEOF(barExtraData_t, orientation)},
    
    {"readonly", V_BOOL, UI_EXTRADATA_OFFSETOF(barExtraData_t, readOnly),  MEMBER_SIZEOF(barExtraData_t, readOnly)},

    {NULL, V_NULL, 0, 0}
}

Valid properties for a bar node.

Definition at line 169 of file ui_node_bar.c.


Generated by  doxygen 1.6.2