#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_icon.h"
#include "ui_node_text.h"
#include "ui_node_messagelist.h"
#include "ui_node_abstractnode.h"
#include "../../client.h"
#include "../../campaign/cp_messages.h"
#include "../../../shared/parse.h"
Go to the source code of this file.
Defines | |
#define | EXTRADATA(node) UI_EXTRADATA(node, abstractScrollableExtraData_t) |
#define | EXTRADATACONST(node) UI_EXTRADATACONST(node, abstractScrollableExtraData_t) |
Functions | |
static int | UI_MessageGetLines (const uiNode_t *node, message_t *message, const char *fontID, int width) |
static uiIcon_t * | UI_MessageGetIcon (const message_t *message) |
static void | UI_MessageDraw (const uiNode_t *node, message_t *message, const char *fontID, int x, int y, int width, int *screenLines) |
static void | UI_MessageListNodeDraw (uiNode_t *node) |
Draws the messagesystem node. | |
static void | UI_MessageListNodeMouseWheel (uiNode_t *node, qboolean down, int x, int y) |
void | UI_RegisterMessageListNode (uiBehaviour_t *behaviour) |
Variables | |
static const int | LINEHEIGHT = 20 |
static const int | DATETIME_COLUUI_SIZE = 180 |
static char * | lastDate |
Definition in file ui_node_messagelist.c.
#define EXTRADATA | ( | node | ) | UI_EXTRADATA(node, abstractScrollableExtraData_t) |
< message_t
Definition at line 41 of file ui_node_messagelist.c.
#define EXTRADATACONST | ( | node | ) | UI_EXTRADATACONST(node, abstractScrollableExtraData_t) |
Definition at line 42 of file ui_node_messagelist.c.
static void UI_MessageDraw | ( | const uiNode_t * | node, | |
message_t * | message, | |||
const char * | fontID, | |||
int | x, | |||
int | y, | |||
int | width, | |||
int * | screenLines | |||
) | [static] |
Definition at line 133 of file ui_node_messagelist.c.
References ALIGN_UL, DATETIME_COLUUI_SIZE, EXTRADATACONST, ICON_STATUS_NORMAL, lastDate, LINEHEIGHT, LONGLINES_WRAP, uiNode_s::padding, qtrue, message_s::text, message_s::timestamp, UI_DrawIconInBox(), UI_DrawString(), and UI_MessageGetIcon().
Referenced by UI_MessageListNodeDraw().
do not hard code icons
cache icon result
< only save them in debug mode
< don't save these messages
Definition at line 69 of file ui_node_messagelist.c.
References MSG_BASEATTACK, MSG_CONSTRUCTION, MSG_CRASHSITE, MSG_DEATH, MSG_DEBUG, MSG_EVENT, MSG_INFO, MSG_NEWS, MSG_PRODUCTION, MSG_PROMOTION, MSG_RESEARCH_FINISHED, MSG_RESEARCH_HALTED, MSG_RESEARCH_PROPOSAL, MSG_STANDARD, MSG_TERRORSITE, MSG_TRANSFERFINISHED, MSG_UFOSPOTTED, message_s::type, and UI_GetIconByName().
Referenced by UI_MessageDraw().
static int UI_MessageGetLines | ( | const uiNode_t * | node, | |
message_t * | message, | |||
const char * | fontID, | |||
int | width | |||
) | [static] |
Definition at line 52 of file ui_node_messagelist.c.
References DATETIME_COLUUI_SIZE, LONGLINES_WRAP, uiNode_s::padding, R_FontTextSize(), message_s::text, and message_s::timestamp.
Referenced by UI_MessageListNodeDraw().
static void UI_MessageListNodeDraw | ( | uiNode_t * | node | ) | [static] |
Draws the messagesystem node.
[in] | node | The context node |
< if newer messages are on top, autoscroll is not need
Definition at line 167 of file ui_node_messagelist.c.
References cp_messageStack, EXTRADATA, lastDate, LINEHEIGHT, message_s::lineUsed, message_s::next, uiNode_s::padding, pos, uiNode_s::size, UI_AbstractScrollableNodeIsSizeChange(), UI_AbstractScrollableNodeSetY(), UI_GetFontFromNode(), UI_GetNodeAbsPos(), UI_MessageDraw(), and UI_MessageGetLines().
Referenced by UI_RegisterMessageListNode().
Definition at line 248 of file ui_node_messagelist.c.
References uiNode_s::onWheel, uiNode_s::onWheelDown, uiNode_s::onWheelUp, UI_AbstractScrollableNodeScrollY(), and UI_ExecuteEventActions().
Referenced by UI_RegisterMessageListNode().
void UI_RegisterMessageListNode | ( | uiBehaviour_t * | behaviour | ) |
Definition at line 274 of file ui_node_messagelist.c.
References Cmd_AddCommand(), uiBehaviour_s::draw, uiBehaviour_s::extends, uiBehaviour_s::mouseWheel, uiBehaviour_s::name, UI_MessageListNodeDraw(), and UI_MessageListNodeMouseWheel().
const int DATETIME_COLUUI_SIZE = 180 [static] |
Definition at line 47 of file ui_node_messagelist.c.
Referenced by UI_MessageDraw(), and UI_MessageGetLines().
char* lastDate [static] |
Definition at line 63 of file ui_node_messagelist.c.
Referenced by UI_MessageDraw(), and UI_MessageListNodeDraw().
const int LINEHEIGHT = 20 [static] |
Definition at line 45 of file ui_node_messagelist.c.
Referenced by UI_MessageDraw(), and UI_MessageListNodeDraw().