43#define EXTRADATA(node) UI_EXTRADATA(node, abstractScrollableExtraData_t)
44#define EXTRADATACONST(node) UI_EXTRADATACONST(node, abstractScrollableExtraData_t)
56#define TIMESTAMP_TEXT 24
97 return std::max(lines1, lines2);
119 int lines1 = *screenLines;
120 int lines2 = *screenLines;
129 UI_DrawString(fontID,
ALIGN_UL, x, y, x, column1,
LINEHEIGHT, message->
timestamp,
EXTRADATACONST(node).scrollY.viewSize, 0, &lines1,
true,
LONGLINES_WRAP);
144 UI_DrawString(fontID,
ALIGN_UL, x, y, x, column2,
LINEHEIGHT, message->
text,
EXTRADATACONST(node).scrollY.viewSize, 0, &lines2,
true,
LONGLINES_WRAP);
146 *screenLines = std::max(lines1, lines2);
190 message = message->
next;
199 message = message->
next;
216 while (message && posY > 0) {
220 message = message->
next;
231 message = message->
next;
237 bool down = deltaY > 0;
309 behaviour->
name =
"messagelist";
310 behaviour->
extends =
"abstractscrollable";
DateTime class definition.
void R_FontTextSize(const char *fontId, const char *text, int maxWidth, longlines_t method, int *width, int *height, int *lines, bool *isTruncated)
Supply information about the size of the text when it is linewrapped and rendered,...
void R_Color(const vec4_t rgba)
Change the color to given value.
Class describing a point of time.
virtual void onMouseMove(uiNode_t *node, int x, int y)
void onCapturedMouseMove(uiNode_t *node, int x, int y) override
void onLoading(uiNode_t *node) override
bool onScroll(uiNode_t *node, int deltaX, int deltaY) override
void draw(uiNode_t *node) override
Draws the messagesystem node.
void onMouseUp(uiNode_t *node, int x, int y, int button) override
void onMouseDown(uiNode_t *node, int x, int y, int button) override
Track mouse down/up events to implement drag&drop-like scrolling, for touchscreen devices.
int getCellHeight(uiNode_t *node) override
Return size of the cell, which is the size (in virtual "pixel") which represent 1 in the scroll value...
Primary header for client.
Shared parsing functions.
Header for lua script functions.
bool Q_strnull(const char *string)
node behaviour, how a node work
struct uiMessageListNodeMessage_s * next
char timestamp[TIMESTAMP_TEXT]
struct uiMessageListNodeMessage_s * next
Atomic structure used to define most of the UI.
struct uiAction_s * onWheelDown
struct uiAction_s * onWheel
struct uiAction_s * onWheelUp
void UI_ExecuteEventActions(uiNode_t *source, const uiAction_t *firstAction)
const char * UI_GetFontFromNode(const uiNode_t *const node)
Return the font for a specific node or default font.
Internal data use by the UI package.
void * UI_SWIG_TypeQuery(const char *name)
This function queries the SWIG type table for a type information structure. It is used in combination...
void UI_GetNodeAbsPos(const uiNode_t *node, vec2_t pos)
Returns the absolute position of a node.
SharedPtr< uiNode > UINodePtr
#define EXTRADATACONST(node)
static void UI_MessageDraw(const uiNode_t *node, uiMessageListNodeMessage_t *message, const char *fontID, int x, int y, int width, int *screenLines)
static uiSprite_t * UI_MessageGetIcon(const uiMessageListNodeMessage_t *message)
void UI_MessageResetStack(void)
void UI_MessageAddStack(struct uiMessageListNodeMessage_s *message)
static const int LINEHEIGHT
void UI_RegisterMessageListNode(uiBehaviour_t *behaviour)
static int UI_MessageGetLines(const uiNode_t *node, uiMessageListNodeMessage_t *message, const char *fontID, int width)
static const int DATETIME_COLUUI_SIZE
struct uiMessageListNodeMessage_s * UI_MessageGetStack(void)
static uiMessageListNodeMessage_t * messageStack
int UI_DrawString(const char *fontID, align_t align, int x, int y, int absX, int maxWidth, int lineHeight, const char *c, int boxHeight, int scrollPos, int *curLine, bool increaseLine, longlines_t method)
void UI_DrawSpriteInBox(bool flip, const uiSprite_t *sprite, uiSpriteStatus_t status, int posX, int posY, int sizeX, int sizeY)
uiSprite_t * UI_GetSpriteByName(const char *name)
Return an sprite by is name.
#define Vector4Set(v, r, g, b, a)