mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 21:13:05 +01:00
Merge pull request #19480 from Gymnasiast/refactor/dpi-string
Pass DPI by ref to string drawing
This commit is contained in:
@@ -314,7 +314,7 @@ void InGameConsole::Draw(DrawPixelInfo* dpi) const
|
||||
{
|
||||
const size_t index = i + _consoleScrollPos;
|
||||
lineBuffer = _colourFormatStr + _consoleLines[index];
|
||||
GfxDrawString(dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontStyle() });
|
||||
GfxDrawString(*dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontStyle() });
|
||||
screenCoords.y += lineHeight;
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ void InGameConsole::Draw(DrawPixelInfo* dpi) const
|
||||
|
||||
// Draw current line
|
||||
lineBuffer = _colourFormatStr + _consoleCurrentLine;
|
||||
DrawText(dpi, screenCoords, { TEXT_COLOUR_255, InGameConsoleGetFontStyle() }, lineBuffer.c_str(), true);
|
||||
DrawText(*dpi, screenCoords, { TEXT_COLOUR_255, InGameConsoleGetFontStyle() }, lineBuffer.c_str(), true);
|
||||
|
||||
// Draw caret
|
||||
if (_consoleCaretTicks < CONSOLE_CARET_FLASH_THRESHOLD)
|
||||
|
||||
Reference in New Issue
Block a user