UFO: Alien Invasion
|
Console header file. More...
Go to the source code of this file.
Macros | |
#define | CONSOLE_PROMPT_CHAR ']' |
Functions | |
void | Con_DrawString (const char *text, int x, int y, unsigned int width) |
void | Con_Scroll (int scroll) |
Scrolls the console. More... | |
void | Con_CheckResize (void) |
If the line width has changed, reformat the buffer. More... | |
void | Con_Init (void) |
void | Con_DrawConsole (float frac) |
Draws the console with the solid background. More... | |
void | Con_Print (const char *txt) |
Handles cursor positioning, line wrapping, etc All console printing must go through this in order to be logged to disk If no console is visible, the text will appear at the top of the game window. More... | |
void | Con_ToggleConsole_f (void) |
void | Con_Close (void) |
Hide the gameconsole if active. More... | |
void | Con_SaveConsoleHistory (void) |
Stores the console history. More... | |
void | Con_LoadConsoleHistory (void) |
Load the console history. More... | |
Variables | |
const int | con_fontHeight |
const int | con_fontWidth |
const int | con_fontShift |
Console header file.
Definition in file cl_console.h.
#define CONSOLE_PROMPT_CHAR ']' |
Definition at line 43 of file cl_console.h.
Referenced by Key_Console(), and Key_Init().
If the line width has changed, reformat the buffer.
Definition at line 184 of file cl_console.cpp.
References Con_Clear(), con_fontShift, CON_TEXTSIZE, viddef_t::context, console_t::currentLine, console_t::displayLine, i, console_t::lineWidth, console_t::text, console_t::totalLines, viddef, and viddefContext_t::width.
Referenced by SCR_DrawConsole().
Hide the gameconsole if active.
Definition at line 393 of file cl_console.cpp.
References cls, key_console, key_game, Key_SetDest(), and client_static_s::keyDest.
void Con_DrawConsole | ( | float | frac | ) |
Draws the console with the solid background.
Definition at line 443 of file cl_console.cpp.
References Com_sprintf(), CON_COLOR_GREEN, CON_COLOR_WHITE, Con_DrawInput(), Con_DrawText(), con_fontHeight, con_fontShift, con_fontWidth, CONSOLE_CHAR_ALIGN, viddef_t::context, console_t::currentLine, console_t::displayLine, g_color_table, viddefContext_t::height, i, cvar_s::integer, it_pic, len, console_t::lineWidth, R_DrawChar(), R_DrawStretchImage(), R_FindImage(), console_t::text, console_t::totalLines, UFO_VERSION, viddef, viddef_t::virtualHeight, viddef_t::virtualWidth, console_t::visLines, and viddefContext_t::width.
Referenced by SCR_DrawConsole().
txt | The character buffer to draw |
x,y | The coordinates on the screen |
width | Characters to draw |
Definition at line 105 of file cl_console.cpp.
References ColorIndex, CON_COLOR_WHITE, Con_DrawText(), lengthof, Q_IsColorString, and Sys_Error().
Referenced by SCR_DrawString().
Definition at line 276 of file cl_console.cpp.
References Cmd_AddCommand(), Com_Printf(), Con_Clear_f(), con_fontWidth, Con_LoadConsoleHistory(), Con_ToggleChat_f(), Con_ToggleConsole_f(), CVAR_ARCHIVE, Cvar_Get(), console_t::initialized, lengthof, console_t::lineWidth, N_, OBJZERO, console_t::text, console_t::totalLines, and VID_NORM_WIDTH.
Referenced by CL_Init().
Load the console history.
Definition at line 223 of file cl_console.cpp.
References CONSOLE_HISTORY_FILENAME, editLine, f, FILE_READ, FS_OpenFile(), ScopedFile::getFile(), historyLine, cvar_s::integer, keyLines, MAXCMDLINE, MAXKEYLINES, and Q_strncpyz().
Referenced by Con_Init().
void Con_Print | ( | const char * | txt | ) |
Handles cursor positioning, line wrapping, etc All console printing must go through this in order to be logged to disk If no console is visible, the text will appear at the top of the game window.
Definition at line 318 of file cl_console.cpp.
Stores the console history.
Definition at line 250 of file cl_console.cpp.
References Com_Printf(), CONSOLE_HISTORY_FILENAME, f, ScopedFile::file(), FILE_WRITE, FS_OpenFile(), FS_Write(), historyLine, i, cvar_s::integer, keyLines, and MAXCMDLINE.
Referenced by CL_Shutdown().
Scrolls the console.
[in] | scroll | Lines to scroll |
Definition at line 172 of file cl_console.cpp.
References console_t::currentLine, and console_t::displayLine.
Referenced by Key_Console().
Definition at line 138 of file cl_console.cpp.
References cls, Key_ClearTyping(), key_console, key_game, Key_SetDest(), and client_static_s::keyDest.
Referenced by Con_Init(), IN_Frame(), and Key_Event().
const int con_fontHeight |
Definition at line 75 of file cl_console.cpp.
Referenced by Con_DrawConsole(), Con_DrawInput(), R_DrawChar(), and SCR_UpdateScreen().
const int con_fontShift |
Definition at line 77 of file cl_console.cpp.
Referenced by Con_CheckResize(), Con_DrawConsole(), and Con_DrawText().
const int con_fontWidth |
Definition at line 76 of file cl_console.cpp.
Referenced by Con_DrawConsole(), Con_Init(), R_DrawChar(), and SCR_UpdateScreen().