#include "../ui_main.h"
#include "../ui_parse.h"
#include "../ui_actions.h"
#include "../ui_font.h"
#include "../ui_icon.h"
#include "../ui_render.h"
#include "ui_node_abstractoption.h"
#include "ui_node_abstractnode.h"
#include "ui_node_optionlist.h"
#include "ui_node_panel.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 | CORNER_SIZE 25 |
#define | MID_SIZE 1 |
#define | MARGE 3 |
Functions | |
static void | UI_OptionListNodeUpdateScroll (uiNode_t *node) |
Update the scroll according to the number of items and the size of the node. | |
static void | UI_OptionListNodeDraw (uiNode_t *node) |
static uiNode_t * | UI_OptionListNodeGetOptionAtPosition (uiNode_t *node, int x, int y) |
static void | UI_OptionListNodeClick (uiNode_t *node, int x, int y) |
Handles selectboxes clicks. | |
static void | UI_OptionListNodeMouseWheel (uiNode_t *node, qboolean down, int x, int y) |
Auto scroll the list. | |
static void | UI_OptionListNodeLoading (uiNode_t *node) |
Called before loading. Used to set default attribute values. | |
static void | UI_OptionListNodeLoaded (uiNode_t *node) |
void | UI_RegisterOptionListNode (uiBehaviour_t *behaviour) |
Definition in file ui_node_optionlist.c.
#define CORNER_SIZE 25 |
Definition at line 42 of file ui_node_optionlist.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, abstractOptionExtraData_t) |
Definition at line 40 of file ui_node_optionlist.c.
#define MARGE 3 |
Definition at line 44 of file ui_node_optionlist.c.
#define MID_SIZE 1 |
Definition at line 43 of file ui_node_optionlist.c.
static void UI_OptionListNodeClick | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Handles selectboxes clicks.
Definition at line 202 of file ui_node_optionlist.c.
References OPTIONEXTRADATA, UI_AbstractOptionGetCurrentValue(), UI_AbstractOptionSetCurrentValue(), and UI_OptionListNodeGetOptionAtPosition().
Referenced by UI_RegisterOptionListNode().
static void UI_OptionListNodeDraw | ( | uiNode_t * | node | ) | [static] |
Definition at line 66 of file ui_node_optionlist.c.
References _, ALIGN_UL, uiNode_s::color, CORNER_SIZE, count, uiNode_s::disabled, EXTRADATA, ICON_STATUS_DISABLED, ICON_STATUS_NORMAL, uiNode_s::image, uiIcon_s::image, LONGLINES_PRETTYCHOP, MARGE, MID_SIZE, uiNode_s::next, OPTIONEXTRADATA, uiNode_s::padding, pos, qfalse, R_Color(), uiNode_s::selectedColor, uiNode_s::size, UI_AbstractOptionGetCurrentValue(), UI_AbstractOptionGetFirstOption(), UI_DrawFill(), UI_DrawIconInBox(), UI_DrawPanel(), UI_DrawString(), UI_FontGetHeight(), UI_GetFontFromNode(), UI_GetNodeAbsPos(), UI_GetReferenceString(), and UI_OptionListNodeUpdateScroll().
Referenced by UI_RegisterOptionListNode().
Definition at line 167 of file ui_node_optionlist.c.
References count, EXTRADATA, uiNode_s::next, uiNode_s::padding, pos, uiNode_s::size, UI_AbstractOptionGetFirstOption(), UI_FontGetHeight(), UI_GetFontFromNode(), and UI_GetNodeAbsPos().
Referenced by UI_OptionListNodeClick().
static void UI_OptionListNodeLoaded | ( | uiNode_t * | node | ) | [static] |
Definition at line 245 of file ui_node_optionlist.c.
Referenced by UI_RegisterOptionListNode().
static void UI_OptionListNodeLoading | ( | uiNode_t * | node | ) | [static] |
Called before loading. Used to set default attribute values.
Definition at line 238 of file ui_node_optionlist.c.
References uiNode_s::color, EXTRADATA, uiNode_s::padding, and Vector4Set.
Referenced by UI_RegisterOptionListNode().
Auto scroll the list.
Definition at line 220 of file ui_node_optionlist.c.
References EXTRADATA, uiNode_s::onWheel, uiNode_s::onWheelDown, uiNode_s::onWheelUp, UI_ExecuteEventActions(), and UI_SetScroll().
Referenced by UI_RegisterOptionListNode().
static void UI_OptionListNodeUpdateScroll | ( | uiNode_t * | node | ) | [static] |
Update the scroll according to the number of items and the size of the node.
Definition at line 50 of file ui_node_optionlist.c.
References count, EXTRADATA, uiNode_s::padding, uiNode_s::size, UI_ExecuteEventActions(), UI_FontGetHeight(), UI_GetFontFromNode(), and UI_SetScroll().
Referenced by UI_OptionListNodeDraw().
void UI_RegisterOptionListNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 249 of file ui_node_optionlist.c.
References uiBehaviour_s::draw, uiBehaviour_s::drawItselfChild, uiBehaviour_s::extends, uiBehaviour_s::leftClick, uiBehaviour_s::loaded, uiBehaviour_s::loading, uiBehaviour_s::mouseWheel, uiBehaviour_s::name, qtrue, UI_OptionListNodeClick(), UI_OptionListNodeDraw(), UI_OptionListNodeLoaded(), UI_OptionListNodeLoading(), and UI_OptionListNodeMouseWheel().