ui_node_selectbox.c File Reference

#include "../ui_main.h"
#include "../ui_internal.h"
#include "../ui_parse.h"
#include "../ui_font.h"
#include "../ui_input.h"
#include "../ui_draw.h"
#include "../ui_render.h"
#include "ui_node_selectbox.h"
#include "ui_node_abstractoption.h"
#include "ui_node_abstractnode.h"
#include "ui_node_option.h"
#include "../../client.h"
Include dependency graph for ui_node_selectbox.c:

Go to the source code of this file.

Defines

#define EXTRADATA(node)   UI_EXTRADATA(node, abstractOptionExtraData_t)
#define SELECTBOX_DEFAULT_HEIGHT   20.0f
#define SELECTBOX_SIDE_WIDTH   7.0f
#define SELECTBOX_RIGHT_WIDTH   20.0f
#define SELECTBOX_SPACER   2.0f
#define SELECTBOX_BOTTOM_HEIGHT   4.0f

Functions

static void UI_SelectBoxNodeCapturedMouseMove (uiNode_t *node, int x, int y)
 call when the mouse move is the node is captured
static void UI_SelectBoxNodeDraw (uiNode_t *node)
static void UI_SelectBoxNodeDrawOverWindow (uiNode_t *node)
static void UI_SelectBoxNodeClick (uiNode_t *node, int x, int y)
 Handles selectboxes clicks.
static void UI_SelectBoxNodeLoading (uiNode_t *node)
 Called before loading. Used to set default attribute values.
static void UI_SelectBoxNodeLoaded (uiNode_t *node)
void UI_RegisterSelectBoxNode (uiBehaviour_t *behaviour)

Detailed Description

Todo:
manage disabled option
Todo:
manage disabled option
 selectbox texres_box
 {
    {
        image   "ui/selectbox"
        pos "774 232"
        size    "100 20"
        color   "0.6 0.6 0.6 0.3"
        cvar    "*cvar:gl_maxtexres"
  }
    option low_value {
        label   "_Low"
        value   "256"
    }
    option medium_value {
        label   "_Medium"
        value   "512"
    }
 }

Definition in file ui_node_selectbox.c.


Define Documentation

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

Definition at line 60 of file ui_node_selectbox.c.

#define SELECTBOX_BOTTOM_HEIGHT   4.0f

Definition at line 68 of file ui_node_selectbox.c.

Referenced by UI_SelectBoxNodeDrawOverWindow().

#define SELECTBOX_DEFAULT_HEIGHT   20.0f
#define SELECTBOX_RIGHT_WIDTH   20.0f

Definition at line 65 of file ui_node_selectbox.c.

Referenced by UI_SelectBoxNodeDraw(), and UI_SelectBoxNodeDrawOverWindow().

#define SELECTBOX_SIDE_WIDTH   7.0f

Definition at line 64 of file ui_node_selectbox.c.

Referenced by UI_SelectBoxNodeDraw(), and UI_SelectBoxNodeDrawOverWindow().

#define SELECTBOX_SPACER   2.0f

Definition at line 67 of file ui_node_selectbox.c.

Referenced by UI_SelectBoxNodeDraw(), and UI_SelectBoxNodeDrawOverWindow().


Function Documentation

void UI_RegisterSelectBoxNode ( uiBehaviour_t behaviour  ) 
static void UI_SelectBoxNodeCapturedMouseMove ( uiNode_t node,
int  x,
int  y 
) [static]

call when the mouse move is the node is captured

Todo:
we can remove the loop if we save the current element in the node

Definition at line 74 of file ui_node_selectbox.c.

References count, EXTRADATA, uiNode_s::invis, uiNode_s::next, OPTIONEXTRADATA, uiNode_s::size, UI_AbstractOptionGetFirstOption(), and UI_NodeAbsoluteToRelativePos().

Referenced by UI_RegisterSelectBoxNode().

static void UI_SelectBoxNodeClick ( uiNode_t node,
int  x,
int  y 
) [static]
static void UI_SelectBoxNodeDraw ( uiNode_t node  )  [static]
static void UI_SelectBoxNodeDrawOverWindow ( uiNode_t node  )  [static]
static void UI_SelectBoxNodeLoaded ( uiNode_t node  )  [static]

Definition at line 296 of file ui_node_selectbox.c.

References SELECTBOX_DEFAULT_HEIGHT, and uiNode_s::size.

Referenced by UI_RegisterSelectBoxNode().

static void UI_SelectBoxNodeLoading ( uiNode_t node  )  [static]

Called before loading. Used to set default attribute values.

Definition at line 291 of file ui_node_selectbox.c.

References uiNode_s::color, and Vector4Set.

Referenced by UI_RegisterSelectBoxNode().


Generated by  doxygen 1.6.2