summaryrefslogtreecommitdiff
path: root/src/console_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-02-05 17:44:44 +0000
committerfrosch <frosch@openttd.org>2011-02-05 17:44:44 +0000
commit582d30c9798bda47f0510f41912009604559a950 (patch)
tree05622ea150b6e6401e9e917d03fccd467f5e172d /src/console_gui.cpp
parentc000f6b9394bd58fbfc31ae6922a5a8c38f4dd40 (diff)
downloadopenttd-582d30c9798bda47f0510f41912009604559a950.tar.xz
(svn r21980) -Codechange: Draw one line more at the top of the console, i.e. clip the top-most line if there is not enough room instead of not drawing it at all.
Diffstat (limited to 'src/console_gui.cpp')
-rw-r--r--src/console_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp
index 2a67c543c..a352dd333 100644
--- a/src/console_gui.cpp
+++ b/src/console_gui.cpp
@@ -197,8 +197,8 @@ struct IConsoleWindow : Window
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;
- if (ypos <= 0) break;
+ ypos = DrawStringMultiLine(5, right, -this->line_height, ypos, STR_JUST_RAW_STRING, print->colour, SA_LEFT | SA_BOTTOM | SA_FORCE) - ICON_LINE_SPACING;
+ if (ypos < 0) break;
}
/* If the text is longer than the window, don't show the starting ']' */
int delta = this->width - this->line_offset - _iconsole_cmdline.pixels - ICON_RIGHT_BORDERWIDTH;