summaryrefslogtreecommitdiff
path: root/src/console_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-09 02:09:47 +0000
committerrubidium <rubidium@openttd.org>2009-02-09 02:09:47 +0000
commit8dae160d0f1065ff40ecddc518b3905820f77f7a (patch)
tree36a060def733fe274859ec2afcbf3478faf2e63c /src/console_gui.cpp
parent861e9cefb3c31f1cab46ddb068af7a3648f45b4a (diff)
downloadopenttd-8dae160d0f1065ff40ecddc518b3905820f77f7a.tar.xz
(svn r15425) -Codechange: some color->colour changes and type safety.
Diffstat (limited to 'src/console_gui.cpp')
-rw-r--r--src/console_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp
index c80c9d7c1..30de4f58b 100644
--- a/src/console_gui.cpp
+++ b/src/console_gui.cpp
@@ -31,16 +31,16 @@ struct IConsoleLine {
static int size; ///< The amount of items in the backlog
IConsoleLine *previous; ///< The previous console message.
- char *buffer; ///< The data to store.
- uint16 colour; ///< The colour of the line.
- uint16 time; ///< The amount of time the line is in the backlog.
+ 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.
/**
* Initialize the console line.
* @param buffer the data to print.
* @param colour the colour of the line.
*/
- IConsoleLine(char *buffer, uint16 colour) :
+ IConsoleLine(char *buffer, TextColour colour) :
previous(IConsoleLine::front),
buffer(buffer),
colour(colour),
@@ -172,11 +172,11 @@ struct IConsoleWindow : Window
/* If the text is longer than the window, don't show the starting ']' */
int delta = this->width - 10 - _iconsole_cmdline.width - ICON_RIGHT_BORDERWIDTH;
if (delta > 0) {
- DoDrawString("]", 5, this->height - ICON_LINE_HEIGHT, CC_COMMAND);
+ DoDrawString("]", 5, this->height - ICON_LINE_HEIGHT, (TextColour)CC_COMMAND);
delta = 0;
}
- DoDrawString(_iconsole_cmdline.buf, 10 + delta, this->height - ICON_LINE_HEIGHT, CC_COMMAND);
+ DoDrawString(_iconsole_cmdline.buf, 10 + delta, this->height - ICON_LINE_HEIGHT, (TextColour)CC_COMMAND);
if (_focused_window == this && _iconsole_cmdline.caret) {
DoDrawString("_", 10 + delta + _iconsole_cmdline.caretxoffs, this->height - ICON_LINE_HEIGHT, TC_WHITE);
@@ -442,6 +442,6 @@ static void IConsoleHistoryNavigate(int direction)
*/
void IConsoleGUIPrint(ConsoleColour color_code, char *str)
{
- new IConsoleLine(str, color_code);
+ new IConsoleLine(str, (TextColour)color_code);
SetWindowDirty(FindWindowById(WC_CONSOLE, 0));
}