mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
(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.
This commit is contained in:
parent
c000f6b939
commit
582d30c979
@ -197,8 +197,8 @@ struct IConsoleWindow : Window
|
|||||||
int ypos = this->height - this->line_height;
|
int ypos = this->height - this->line_height;
|
||||||
for (const IConsoleLine *print = IConsoleLine::Get(IConsoleWindow::scroll); print != NULL; print = print->previous) {
|
for (const IConsoleLine *print = IConsoleLine::Get(IConsoleWindow::scroll); print != NULL; print = print->previous) {
|
||||||
SetDParamStr(0, print->buffer);
|
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;
|
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 (ypos < 0) break;
|
||||||
}
|
}
|
||||||
/* If the text is longer than the window, don't show the starting ']' */
|
/* 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;
|
int delta = this->width - this->line_offset - _iconsole_cmdline.pixels - ICON_RIGHT_BORDERWIDTH;
|
||||||
|
Loading…
Reference in New Issue
Block a user