ui_node_string.c File Reference

A string can be a normal string, or a cvar string. A string prefixed with a "_" is the auto translated. More...

#include "../ui_nodes.h"
#include "../ui_font.h"
#include "../ui_parse.h"
#include "../ui_tooltip.h"
#include "../ui_render.h"
#include "ui_node_string.h"
#include "ui_node_abstractnode.h"
Include dependency graph for ui_node_string.c:

Go to the source code of this file.

Defines

#define EXTRADATA_TYPE   stringExtraData_t
#define EXTRADATA(node)   UI_EXTRADATA(node, EXTRADATA_TYPE)
#define EXTRADATACONST(node)   UI_EXTRADATACONST(node, EXTRADATA_TYPE)

Functions

static void UI_StringNodeDraw (uiNode_t *node)
static void UI_StringNodeDrawTooltip (uiNode_t *node, int x, int y)
 Custom tooltip of string node.
static void UI_StringNodeLoading (uiNode_t *node)
void UI_RegisterStringNode (uiBehaviour_t *behaviour)

Variables

static const value_t properties []

Detailed Description

A string can be a normal string, or a cvar string. A string prefixed with a "_" is the auto translated.

 string team_members
 {
    string  "_Team Members:"
    pos "480 486"
    size "200 30"
 }
 string team_hired
 {
    string  "*cvar mn_hired"
    pos "480 508"
    size "200 30"
 }

Definition in file ui_node_string.c.


Define Documentation

#define EXTRADATA ( node   )     UI_EXTRADATA(node, EXTRADATA_TYPE)

Definition at line 50 of file ui_node_string.c.

#define EXTRADATA_TYPE   stringExtraData_t

Definition at line 49 of file ui_node_string.c.

#define EXTRADATACONST ( node   )     UI_EXTRADATACONST(node, EXTRADATA_TYPE)

Definition at line 51 of file ui_node_string.c.


Function Documentation

void UI_RegisterStringNode ( uiBehaviour_t behaviour  ) 
static void UI_StringNodeDraw ( uiNode_t node  )  [static]
static void UI_StringNodeDrawTooltip ( uiNode_t node,
int  x,
int  y 
) [static]

Custom tooltip of string node.

Parameters:
[in] node Node we request to draw tooltip
[in] x Position x of the mouse
[in] y Position y of the mouse

Definition at line 84 of file ui_node_string.c.

References EXTRADATA, MAX_VAR, uiNode_s::padding, Q_strcat(), R_FontTextSize(), uiNode_s::size, uiNode_s::text, uiNode_s::tooltip, UI_DrawTooltip(), UI_GetFontFromNode(), UI_GetReferenceString(), and UI_Tooltip().

Referenced by UI_RegisterStringNode().

static void UI_StringNodeLoading ( uiNode_t node  )  [static]

Variable Documentation

const value_t properties[] [static]
Initial value:
 {
    
    {"longlines", V_INT, UI_EXTRADATA_OFFSETOF(EXTRADATA_TYPE, longlines), MEMBER_SIZEOF(EXTRADATA_TYPE, longlines)},

    {NULL, V_NULL, 0, 0}
}

Definition at line 113 of file ui_node_string.c.


Generated by  doxygen 1.6.2