1
0
Fork 0
pull/12692/merge
Peter Nelson 2025-05-03 12:24:57 +00:00 committed by GitHub
commit ceb0018e25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@
/** @file console_gui.cpp Handling the GUI of the in-game console. */
#include "stdafx.h"
#include "core/backup_type.hpp"
#include "textbuf_type.h"
#include "window_gui.h"
#include "autocompletion.h"
@ -160,6 +161,7 @@ struct IConsoleWindow : Window
void OnInit() override
{
AutoRestoreBackup textdir(_current_text_dir, TD_LTR);
this->line_height = GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.hsep_normal;
this->line_offset = GetStringBoundingBox("] ").width + WidgetDimensions::scaled.frametext.left;
this->cursor_width = GetCharacterWidth(FS_NORMAL, '_');
@ -192,6 +194,7 @@ struct IConsoleWindow : Window
void OnPaint() override
{
AutoRestoreBackup textdir(_current_text_dir, TD_LTR);
const int right = this->width - WidgetDimensions::scaled.frametext.right;
GfxFillRect(0, 0, this->width - 1, this->height - 1, PC_BLACK);