#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"
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) |
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 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 |
Definition at line 62 of file ui_node_selectbox.c.
Referenced by UI_SelectBoxNodeDraw(), UI_SelectBoxNodeDrawOverWindow(), and UI_SelectBoxNodeLoaded().
#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().
void UI_RegisterSelectBoxNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 302 of file ui_node_selectbox.c.
References uiBehaviour_s::capturedMouseMove, uiBehaviour_s::draw, uiBehaviour_s::drawItselfChild, uiBehaviour_s::drawOverWindow, uiBehaviour_s::extends, uiBehaviour_s::leftClick, uiBehaviour_s::loaded, uiBehaviour_s::loading, uiBehaviour_s::name, qtrue, UI_SelectBoxNodeCapturedMouseMove(), UI_SelectBoxNodeClick(), UI_SelectBoxNodeDraw(), UI_SelectBoxNodeDrawOverWindow(), UI_SelectBoxNodeLoaded(), and UI_SelectBoxNodeLoading().
static void UI_SelectBoxNodeCapturedMouseMove | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
call when the mouse move is the node is captured
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] |
Handles selectboxes clicks.
Definition at line 236 of file ui_node_selectbox.c.
References count, EXTRADATA, uiNode_s::invis, uiNode_s::next, OPTIONEXTRADATA, pos, uiNode_s::size, UI_AbstractOptionGetCurrentValue(), UI_AbstractOptionGetFirstOption(), UI_AbstractOptionSetCurrentValue(), UI_GetMouseCapture(), UI_GetNodeAbsPos(), UI_MouseRelease(), and UI_SetMouseCapture().
Referenced by UI_RegisterSelectBoxNode().
static void UI_SelectBoxNodeDraw | ( | uiNode_t * | node | ) | [static] |
Definition at line 95 of file ui_node_selectbox.c.
References _, ALIGN_UL, uiNode_s::image, uiNode_s::invis, LONGLINES_PRETTYCHOP, uiNode_s::next, OPTIONEXTRADATA, qfalse, R_Color(), SELECTBOX_DEFAULT_HEIGHT, SELECTBOX_RIGHT_WIDTH, SELECTBOX_SIDE_WIDTH, SELECTBOX_SPACER, uiNode_s::size, UI_AbstractOptionGetCurrentValue(), UI_AbstractOptionGetFirstOption(), UI_CaptureDrawOver(), UI_DrawNormImage(), UI_DrawString(), UI_GetFontFromNode(), UI_GetMouseCapture(), UI_GetNodeAbsPos(), UI_GetReferenceString(), and UI_LoadImage().
Referenced by UI_RegisterSelectBoxNode().
static void UI_SelectBoxNodeDrawOverWindow | ( | uiNode_t * | node | ) | [static] |
Definition at line 159 of file ui_node_selectbox.c.
References _, ALIGN_UL, uiNode_s::color, count, EXTRADATA, f, uiNode_s::image, uiNode_s::invis, LONGLINES_PRETTYCHOP, uiNode_s::next, OPTIONEXTRADATA, qfalse, SELECTBOX_BOTTOM_HEIGHT, SELECTBOX_DEFAULT_HEIGHT, SELECTBOX_RIGHT_WIDTH, SELECTBOX_SIDE_WIDTH, SELECTBOX_SPACER, uiNode_s::size, UI_AbstractOptionGetCurrentValue(), UI_AbstractOptionGetFirstOption(), UI_DrawFill(), UI_DrawNormImage(), UI_DrawString(), UI_GetFontFromNode(), UI_GetNodeAbsPos(), UI_GetReferenceString(), and UI_LoadImage().
Referenced by UI_RegisterSelectBoxNode().
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().