Mercurial > hg > openttd
changeset 17239:8beedf93c8b2 draft
(svn r21979) -Fix: Scrolling of the console in pages used wrong line height and scrolled too much.
author | frosch <frosch@openttd.org> |
---|---|
date | Sat, 05 Feb 2011 17:41:05 +0000 |
parents | 1c89caffa68d |
children | b62138a80b9a |
files | src/console_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -177,7 +177,7 @@ 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 @@ 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;