#include "../ui_main.h"
#include "../ui_internal.h"
#include "../ui_font.h"
#include "../ui_actions.h"
#include "../ui_parse.h"
#include "../ui_render.h"
#include "../ui_data.h"
#include "ui_node_text.h"
#include "ui_node_textlist.h"
#include "ui_node_abstractnode.h"
#include "../../client.h"
#include "../../../shared/parse.h"
Go to the source code of this file.
Defines | |
#define | EXTRADATA(node) UI_EXTRADATA(node, textExtraData_t) |
#define | EXTRADATACONST(node) UI_EXTRADATACONST(node, textExtraData_t) |
Functions | |
static int | UI_TextListNodeGetLine (const uiNode_t *node, int x, int y) |
Get the line number under an absolute position. | |
static void | UI_TextListNodeMouseMove (uiNode_t *node, int x, int y) |
static void | UI_TextLineNodeDrawText (uiNode_t *node, const linkedList_t *list) |
Handles line breaks and drawing for shared data text. | |
static void | UI_TextListNodeDraw (uiNode_t *node) |
Draw a text node. | |
static void | UI_TextListNodeClick (uiNode_t *node, int x, int y) |
Calls the script command for a text node that is clickable. | |
static void | UI_TextListNodeRightClick (uiNode_t *node, int x, int y) |
Calls the script command for a text node that is clickable via right mouse button. | |
static void | UI_TextListNodeMouseWheel (uiNode_t *node, qboolean down, int x, int y) |
static void | UI_TextListNodeLoading (uiNode_t *node) |
void | UI_RegisterTextListNode (uiBehaviour_t *behaviour) |
Definition in file ui_node_textlist.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, textExtraData_t) |
Definition at line 39 of file ui_node_textlist.c.
#define EXTRADATACONST | ( | node | ) | UI_EXTRADATACONST(node, textExtraData_t) |
Definition at line 40 of file ui_node_textlist.c.
void UI_RegisterTextListNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 238 of file ui_node_textlist.c.
References uiBehaviour_s::draw, uiBehaviour_s::extends, uiBehaviour_s::leftClick, uiBehaviour_s::loading, uiBehaviour_s::mouseMove, uiBehaviour_s::mouseWheel, uiBehaviour_s::name, uiBehaviour_s::rightClick, UI_TextListNodeClick(), UI_TextListNodeDraw(), UI_TextListNodeLoading(), UI_TextListNodeMouseMove(), UI_TextListNodeMouseWheel(), and UI_TextListNodeRightClick().
static void UI_TextLineNodeDrawText | ( | uiNode_t * | node, | |
const linkedList_t * | list | |||
) | [static] |
Handles line breaks and drawing for shared data text.
[in] | node | The context node |
[in] | list | The text list to draw |
Definition at line 72 of file ui_node_textlist.c.
References uiNode_s::color, count, linkedList_s::data, EXTRADATA, LONGLINES_PRETTYCHOP, linkedList_s::next, uiNode_s::padding, pos, R_Color(), uiNode_s::selectedColor, uiNode_s::size, uiNode_s::state, uiNode_s::textalign, UI_AbstractScrollableNodeIsSizeChange(), UI_AbstractScrollableNodeSetY(), UI_DrawStringInBox(), UI_FontGetHeight(), UI_GetFontFromNode(), UI_GetNodeAbsPos(), and VectorScale.
Referenced by UI_TextListNodeDraw().
static void UI_TextListNodeClick | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Calls the script command for a text node that is clickable.
Definition at line 179 of file ui_node_textlist.c.
References EXTRADATA, uiNode_s::onChange, uiNode_s::onClick, UI_ExecuteEventActions(), and UI_TextListNodeGetLine().
Referenced by UI_RegisterTextListNode().
static void UI_TextListNodeDraw | ( | uiNode_t * | node | ) | [static] |
Draw a text node.
Definition at line 158 of file ui_node_textlist.c.
References Com_Printf(), uiSharedData_s::data, EXTRADATA, uiSharedData_s::linkedListText, uiGlobal_s::sharedData, uiSharedData_s::type, ui_global, UI_ResetData(), UI_SHARED_LINKEDLISTTEXT, UI_SHARED_NONE, and UI_TextLineNodeDrawText().
Referenced by UI_RegisterTextListNode().
static int UI_TextListNodeGetLine | ( | const uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Get the line number under an absolute position.
[in] | node | a text node |
[in] | x | position x on the screen |
[in] | y | position y on the screen |
Definition at line 49 of file ui_node_textlist.c.
References EXTRADATACONST, uiNode_s::padding, UI_FontGetHeight(), UI_GetFontFromNode(), and UI_NodeAbsoluteToRelativePos().
Referenced by UI_TextListNodeClick(), UI_TextListNodeMouseMove(), and UI_TextListNodeRightClick().
static void UI_TextListNodeLoading | ( | uiNode_t * | node | ) | [static] |
< Invalid/no line selected per default.
< left center of each cells
Definition at line 230 of file ui_node_textlist.c.
References ALIGN_CL, uiNode_s::color, EXTRADATA, uiNode_s::selectedColor, uiNode_s::textalign, and Vector4Set.
Referenced by UI_RegisterTextListNode().
static void UI_TextListNodeMouseMove | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Definition at line 62 of file ui_node_textlist.c.
References EXTRADATA, and UI_TextListNodeGetLine().
Referenced by UI_RegisterTextListNode().
Definition at line 219 of file ui_node_textlist.c.
References uiNode_s::onWheel, uiNode_s::onWheelDown, uiNode_s::onWheelUp, UI_AbstractScrollableNodeScrollY(), and UI_ExecuteEventActions().
Referenced by UI_RegisterTextListNode().
static void UI_TextListNodeRightClick | ( | uiNode_t * | node, | |
int | x, | |||
int | y | |||
) | [static] |
Calls the script command for a text node that is clickable via right mouse button.
Definition at line 200 of file ui_node_textlist.c.
References EXTRADATA, uiNode_s::onChange, uiNode_s::onRightClick, UI_ExecuteEventActions(), and UI_TextListNodeGetLine().
Referenced by UI_RegisterTextListNode().