UFO: Alien Invasion
|
#include "ui_main.h"
#include "ui_internal.h"
#include "ui_font.h"
#include "ui_parse.h"
#include "../cl_shared.h"
#include "../../shared/parse.h"
#include "../renderer/r_font.h"
Go to the source code of this file.
Macros | |
#define | MAX_FONTS 16 |
Functions | |
static void | UI_RegisterFont (const uiFont_t *font) |
Registers a new TTF font. More... | |
bool | UI_ParseFont (const char *name, const char **text) |
const char * | UI_GetFontFromNode (const uiNode_t *const node) |
Return the font for a specific node or default font. More... | |
const uiFont_t * | UI_GetFontByID (const char *name) |
Return the font for a specific id. More... | |
int | UI_FontGetHeight (const char *fontID) |
void | UI_InitFonts (void) |
after a video restart we have to reinitialize the fonts More... | |
void | UI_FontShutdown (void) |
Variables | |
static int | numFonts = 0 |
static uiFont_t | fonts [MAX_FONTS] |
static const value_t | fontValues [] |
#define MAX_FONTS 16 |
Definition at line 34 of file ui_font.cpp.
Referenced by UI_ParseFont().
int UI_FontGetHeight | ( | const char * | fontID | ) |
Definition at line 166 of file ui_font.cpp.
References font_s::height, and R_GetFont().
Referenced by uiTextNode::doLayout(), uiOptionTreeNode::draw(), uiOptionListNode::draw(), uiTextListNode::drawText(), uiText2Node::drawText(), uiTextNode::drawText(), uiOptionTreeNode::getCellHeight(), uiOptionListNode::getCellHeight(), uiTextNode::getCellHeight(), uiButtonNode::onLoaded(), uiText2Node::onLoaded(), UI_DrawString(), UI_OptionListNodeGetOptionAtPosition(), UI_OptionListNodeUpdateScroll(), UI_OptionTreeNodeGetOptionAtPosition(), UI_OptionTreeNodeUpdateScroll(), UI_TextListNodeGetLine(), and UI_TextNodeGetLine().
const uiFont_t* UI_GetFontByID | ( | const char * | name | ) |
Return the font for a specific id.
Definition at line 157 of file ui_font.cpp.
References i, numFonts, and Q_streq.
Referenced by UI_DrawString(), and UI_ParseFont().
const char* UI_GetFontFromNode | ( | const uiNode_t *const | node | ) |
Return the font for a specific node or default font.
[in] | node | Context node |
Definition at line 145 of file ui_font.cpp.
References uiNode_t::font, and UI_GetReferenceString().
Referenced by uiTextNode::doLayout(), uiStringNode::draw(), uiOptionTreeNode::draw(), uiMessageListNode::draw(), uiSelectBoxNode::draw(), uiTabNode::draw(), uiButtonNode::draw(), uiOptionListNode::draw(), uiTextEntryNode::draw(), uiWindowNode::draw(), uiSelectBoxNode::drawOverWindow(), uiTextListNode::drawText(), uiText2Node::drawText(), uiTextNode::drawText(), uiStringNode::drawTooltip(), GAME_GetImportData(), uiOptionTreeNode::getCellHeight(), uiOptionListNode::getCellHeight(), uiTextNode::getCellHeight(), uiButtonNode::onLoaded(), uiText2Node::onLoaded(), UI_OptionListNodeGetOptionAtPosition(), UI_OptionListNodeUpdateScroll(), UI_OptionTreeNodeGetOptionAtPosition(), UI_OptionTreeNodeUpdateScroll(), UI_TabNodeTabAtPosition(), UI_TextListNodeGetLine(), and UI_TextNodeGetLine().
after a video restart we have to reinitialize the fonts
Definition at line 177 of file ui_font.cpp.
References Com_Printf(), i, numFonts, and UI_RegisterFont().
Referenced by CL_NewLanguage(), and UI_Reinit().
bool UI_ParseFont | ( | const char * | name, |
const char ** | text | ||
) |
Definition at line 68 of file ui_font.cpp.
References Com_DPrintf(), Com_EParse(), Com_EParseValue(), Com_Parse(), Com_Printf(), DEBUG_CLIENT, MAX_FONTS, Mem_PoolStrDup, Mem_PoolStrDupTo, uiFont_s::name, numFonts, OBJZERO, value_s::ofs, Q_streq, value_s::size, value_s::string, value_s::type, UI_GetFontByID(), UI_RegisterFont(), ui_sysPool, v, V_HUNK_STRING, and V_TRANSLATION_STRING.
Referenced by CL_ParseClientData(), and UI_Restart_f().
Registers a new TTF font.
[in] | font | Font to register |
Definition at line 52 of file ui_font.cpp.
References _, Com_Error(), ERR_FATAL, FS_CheckFile(), uiFont_s::name, uiFont_s::path, R_FontRegister(), uiFont_s::size, and uiFont_s::style.
Referenced by UI_InitFonts(), and UI_ParseFont().
Definition at line 36 of file ui_font.cpp.
|
static |
Definition at line 38 of file ui_font.cpp.
|
static |
Definition at line 35 of file ui_font.cpp.
Referenced by UI_FontShutdown(), UI_GetFontByID(), UI_InitFonts(), and UI_ParseFont().