summaryrefslogtreecommitdiff
path: root/src/console_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-02-05 17:34:13 +0000
committerfrosch <frosch@openttd.org>2011-02-05 17:34:13 +0000
commite06c412a051dd34a08fc521d912897077cfc56c2 (patch)
tree42589cee4cbf2c6cb675d08453a884e35d0f5d06 /src/console_gui.cpp
parent9e1695aa1e8079fc46d05af25a26917cfd678deb (diff)
downloadopenttd-e06c412a051dd34a08fc521d912897077cfc56c2.tar.xz
(svn r21978) -Codechange/Fix: Remove usage of Window::top and left from IConsoleWindow::OnPaint(). Drawing is done relative to the window position. But as the position is (0,0) anyway, it was not noticeable.
Diffstat (limited to 'src/console_gui.cpp')
-rw-r--r--src/console_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp
index 87e2869e7..eda8b5053 100644
--- a/src/console_gui.cpp
+++ b/src/console_gui.cpp
@@ -193,12 +193,12 @@ struct IConsoleWindow : Window
{
const int right = this->width - 5;
- GfxFillRect(this->left, this->top, this->width, this->height - 1, 0);
+ GfxFillRect(0, 0, this->width - 1, this->height - 1, 0);
int ypos = this->height - this->line_height - ICON_LINE_SPACING;
for (const IConsoleLine *print = IConsoleLine::Get(IConsoleWindow::scroll); print != NULL; print = print->previous) {
SetDParamStr(0, print->buffer);
- ypos = DrawStringMultiLine(5, right, top, ypos, STR_JUST_RAW_STRING, print->colour, SA_LEFT | SA_BOTTOM | SA_FORCE) - ICON_LINE_SPACING;
- if (ypos <= top) break;
+ 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;
}
/* 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;