OpenTTD
|
Container for a single line of console output. More...
Public Member Functions | |
IConsoleLine (char *buffer, TextColour colour) | |
Initialize the console line. | |
~IConsoleLine () | |
Clear this console line and any further ones. |
Static Public Member Functions | |
static const IConsoleLine * | Get (uint index) |
Get the index-ed item in the list. | |
static bool | Truncate () |
Truncate the list removing everything older than/more than the amount as specified in the config file. | |
static void | Reset () |
Reset the complete console line backlog. |
Data Fields | |
IConsoleLine * | previous |
The previous console message. | |
char * | buffer |
The data to store. | |
TextColour | colour |
The colour of the line. | |
uint16 | time |
The amount of time the line is in the backlog. |
Static Public Attributes | |
static IConsoleLine * | front = NULL |
The front of the console backlog buffer. | |
static int | size = 0 |
The amount of items in the backlog. |
Container for a single line of console output.
Definition at line 40 of file console_gui.cpp.
|
inline |
Initialize the console line.
buffer | the data to print. |
colour | the colour of the line. |
Definition at line 54 of file console_gui.cpp.
|
inlinestatic |
Truncate the list removing everything older than/more than the amount as specified in the config file.
As a side effect also increase the time the other lines have been in the list.
Definition at line 96 of file console_gui.cpp.
References _settings_client, GUISettings::console_backlog_length, GUISettings::console_backlog_timeout, front, ClientSettings::gui, MAX_UVALUE, previous, and time.
Referenced by IConsoleWindow::OnHundredthTick().