diff options
author | frosch <frosch@openttd.org> | 2011-02-05 17:41:05 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-02-05 17:41:05 +0000 |
commit | c000f6b9394bd58fbfc31ae6922a5a8c38f4dd40 (patch) | |
tree | 2cca20d359cf21c3467810e7f2f4f15a3f763bab | |
parent | e06c412a051dd34a08fc521d912897077cfc56c2 (diff) | |
download | openttd-c000f6b9394bd58fbfc31ae6922a5a8c38f4dd40.tar.xz |
(svn r21979) -Fix: Scrolling of the console in pages used wrong line height and scrolled too much.
-rw-r--r-- | src/console_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp index eda8b5053..2a67c543c 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -177,7 +177,7 @@ struct IConsoleWindow : Window IConsoleWindow() : Window() { _iconsole_mode = ICONSOLE_OPENED; - this->line_height = FONT_HEIGHT_NORMAL; + this->line_height = FONT_HEIGHT_NORMAL + ICON_LINE_SPACING; this->line_offset = GetStringBoundingBox("] ").width + 5; this->InitNested(&_console_window_desc, 0); @@ -194,7 +194,7 @@ struct IConsoleWindow : Window const int right = this->width - 5; GfxFillRect(0, 0, this->width - 1, this->height - 1, 0); - int ypos = this->height - this->line_height - ICON_LINE_SPACING; + int ypos = this->height - this->line_height; for (const IConsoleLine *print = IConsoleLine::Get(IConsoleWindow::scroll); print != NULL; print = print->previous) { SetDParamStr(0, print->buffer); ypos = DrawStringMultiLine(5, right, 0, ypos, STR_JUST_RAW_STRING, print->colour, SA_LEFT | SA_BOTTOM | SA_FORCE) - ICON_LINE_SPACING; |