mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-25 07:44:38 +01:00
Apply review request
This commit is contained in:
@@ -26,14 +26,14 @@ using namespace OpenRCT2::Ui;
|
||||
|
||||
static InGameConsole _inGameConsole;
|
||||
|
||||
static FontSpriteBase InGameconsoleGetFontSpriteBase()
|
||||
static FontSpriteBase InGameConsoleGetFontSpriteBase()
|
||||
{
|
||||
return (gConfigInterface.console_small_font ? FontSpriteBase::SMALL : FontSpriteBase::MEDIUM);
|
||||
}
|
||||
|
||||
static int32_t InGameConsoleGetLineHeight()
|
||||
{
|
||||
return font_get_line_height(InGameconsoleGetFontSpriteBase());
|
||||
return font_get_line_height(InGameConsoleGetFontSpriteBase());
|
||||
}
|
||||
|
||||
InGameConsole::InGameConsole()
|
||||
@@ -150,7 +150,7 @@ void InGameConsole::RefreshCaret(size_t position)
|
||||
_selectionStart = position;
|
||||
char tempString[TEXT_INPUT_SIZE] = { 0 };
|
||||
std::memcpy(tempString, &_consoleCurrentLine, _selectionStart);
|
||||
_caretScreenPosX = gfx_get_string_width_no_formatting(tempString, InGameconsoleGetFontSpriteBase());
|
||||
_caretScreenPosX = gfx_get_string_width_no_formatting(tempString, InGameConsoleGetFontSpriteBase());
|
||||
}
|
||||
|
||||
void InGameConsole::Scroll(int32_t linesToScroll)
|
||||
@@ -321,7 +321,7 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const
|
||||
{
|
||||
const size_t index = i + _consoleScrollPos;
|
||||
lineBuffer = colourFormatStr + _consoleLines[index];
|
||||
gfx_draw_string(dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameconsoleGetFontSpriteBase() });
|
||||
gfx_draw_string(dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontSpriteBase() });
|
||||
screenCoords.y += lineHeight;
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ void InGameConsole::Draw(rct_drawpixelinfo* dpi) const
|
||||
|
||||
// Draw current line
|
||||
lineBuffer = colourFormatStr + _consoleCurrentLine;
|
||||
gfx_draw_string_no_formatting(dpi, screenCoords, lineBuffer.c_str(), { TEXT_COLOUR_255, InGameconsoleGetFontSpriteBase() });
|
||||
gfx_draw_string_no_formatting(dpi, screenCoords, lineBuffer.c_str(), { TEXT_COLOUR_255, InGameConsoleGetFontSpriteBase() });
|
||||
|
||||
// Draw caret
|
||||
if (_consoleCaretTicks < CONSOLE_CARET_FLASH_THRESHOLD)
|
||||
|
||||
Reference in New Issue
Block a user