mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Remove snake_case from second chunk of Drawing (#19166)
This commit is contained in:
@@ -198,10 +198,10 @@ void chat_draw(rct_drawpixelinfo* dpi, uint8_t chatBackgroundColor)
|
||||
GfxSetDirtyBlocks({ screenCoords, { screenCoords + ScreenCoordsXY{ _chatWidth, inputLineHeight + 15 } } });
|
||||
|
||||
// TODO: Show caret if the input text has multiple lines
|
||||
if (_chatCaretTicks < 15 && gfx_get_string_width(lineBuffer, FontStyle::Medium) < (_chatWidth - 10))
|
||||
if (_chatCaretTicks < 15 && GfxGetStringWidth(lineBuffer, FontStyle::Medium) < (_chatWidth - 10))
|
||||
{
|
||||
lineBuffer.assign(_chatCurrentLine, _chatTextInputSession->SelectionStart);
|
||||
int32_t caretX = screenCoords.x + gfx_get_string_width(lineBuffer, FontStyle::Medium);
|
||||
int32_t caretX = screenCoords.x + GfxGetStringWidth(lineBuffer, FontStyle::Medium);
|
||||
int32_t caretY = screenCoords.y + 14;
|
||||
|
||||
GfxFillRect(dpi, { { caretX, caretY }, { caretX + 6, caretY + 1 } }, PALETTE_INDEX_56);
|
||||
@@ -279,7 +279,7 @@ static int32_t chat_history_draw_string(
|
||||
FormatStringToBuffer(buffer, sizeof(buffer), "{OUTLINE}{WHITE}{STRING}", text);
|
||||
|
||||
int32_t numLines;
|
||||
gfx_wrap_string(bufferPtr, width, FontStyle::Medium, &numLines);
|
||||
GfxWrapString(bufferPtr, width, FontStyle::Medium, &numLines);
|
||||
auto lineHeight = font_get_line_height(FontStyle::Medium);
|
||||
|
||||
int32_t expectedY = screenCoords.y - (numLines * lineHeight);
|
||||
@@ -291,7 +291,7 @@ static int32_t chat_history_draw_string(
|
||||
auto lineY = screenCoords.y;
|
||||
for (int32_t line = 0; line <= numLines; ++line)
|
||||
{
|
||||
gfx_draw_string(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, bufferPtr, { TEXT_COLOUR_254 });
|
||||
GfxDrawString(dpi, { screenCoords.x, lineY - (numLines * lineHeight) }, bufferPtr, { TEXT_COLOUR_254 });
|
||||
bufferPtr = get_string_end(bufferPtr) + 1;
|
||||
lineY += lineHeight;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ int32_t chat_string_wrapped_get_height(void* args, int32_t width)
|
||||
format_string(bufferPtr, 256, STR_STRING, args);
|
||||
|
||||
int32_t numLines;
|
||||
gfx_wrap_string(bufferPtr, width, FontStyle::Medium, &numLines);
|
||||
GfxWrapString(bufferPtr, width, FontStyle::Medium, &numLines);
|
||||
int32_t lineHeight = font_get_line_height(FontStyle::Medium);
|
||||
|
||||
int32_t lineY = 0;
|
||||
|
||||
Reference in New Issue
Block a user