mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Remove snake_case from second chunk of Drawing (#19166)
This commit is contained in:
@@ -223,7 +223,7 @@ public:
|
||||
|
||||
// String length needs to add 12 either side of box
|
||||
// +13 for cursor when max length.
|
||||
gfx_wrap_string(wrapped_string, WW - (24 + 13), FontStyle::Medium, &no_lines);
|
||||
GfxWrapString(wrapped_string, WW - (24 + 13), FontStyle::Medium, &no_lines);
|
||||
|
||||
GfxFillRectInset(
|
||||
&dpi, { { windowPos.x + 10, screenCoords.y }, { windowPos.x + WW - 10, screenCoords.y + 10 * (no_lines + 1) + 3 } },
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
for (int32_t line = 0; line <= no_lines; line++)
|
||||
{
|
||||
screenCoords.x = windowPos.x + 12;
|
||||
gfx_draw_string_no_formatting(&dpi, screenCoords, wrap_pointer, { colours[1], FontStyle::Medium });
|
||||
GfxDrawStringNoFormatting(&dpi, screenCoords, wrap_pointer, { colours[1], FontStyle::Medium });
|
||||
|
||||
size_t string_length = get_string_size(wrap_pointer) - 1;
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
// Make a copy of the string for measuring the width.
|
||||
char temp_string[TEXT_INPUT_SIZE] = { 0 };
|
||||
std::memcpy(temp_string, wrap_pointer, gTextInput->SelectionStart - char_count);
|
||||
cursorX = windowPos.x + 13 + gfx_get_string_width_no_formatting(temp_string, FontStyle::Medium);
|
||||
cursorX = windowPos.x + 13 + GfxGetStringWidthNoFormatting(temp_string, FontStyle::Medium);
|
||||
cursorY = screenCoords.y;
|
||||
|
||||
int32_t textWidth = 6;
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
utf8 tmp[5] = { 0 }; // This is easier than setting temp_string[0..5]
|
||||
uint32_t codepoint = utf8_get_next(_buffer.data() + gTextInput->SelectionStart, nullptr);
|
||||
utf8_write_codepoint(tmp, codepoint);
|
||||
textWidth = std::max(gfx_get_string_width_no_formatting(tmp, FontStyle::Medium) - 2, 4);
|
||||
textWidth = std::max(GfxGetStringWidthNoFormatting(tmp, FontStyle::Medium) - 2, 4);
|
||||
}
|
||||
|
||||
if (_cursorBlink > 15)
|
||||
@@ -310,14 +310,14 @@ public:
|
||||
|
||||
// String length needs to add 12 either side of box +13 for cursor when max length.
|
||||
int32_t numLines{};
|
||||
gfx_wrap_string(wrappedString.data(), WW - (24 + 13), FontStyle::Medium, &numLines);
|
||||
GfxWrapString(wrappedString.data(), WW - (24 + 13), FontStyle::Medium, &numLines);
|
||||
return numLines * 10 + WH;
|
||||
}
|
||||
|
||||
private:
|
||||
static void DrawIMEComposition(rct_drawpixelinfo& dpi, int32_t cursorX, int32_t cursorY)
|
||||
{
|
||||
int compositionWidth = gfx_get_string_width(gTextInput->ImeBuffer, FontStyle::Medium);
|
||||
int compositionWidth = GfxGetStringWidth(gTextInput->ImeBuffer, FontStyle::Medium);
|
||||
ScreenCoordsXY screenCoords(cursorX - (compositionWidth / 2), cursorY + 13);
|
||||
int width = compositionWidth;
|
||||
int height = 10;
|
||||
@@ -326,7 +326,7 @@ private:
|
||||
&dpi, { screenCoords - ScreenCoordsXY{ 1, 1 }, screenCoords + ScreenCoordsXY{ width + 1, height + 1 } },
|
||||
PALETTE_INDEX_12);
|
||||
GfxFillRect(&dpi, { screenCoords, screenCoords + ScreenCoordsXY{ width, height } }, PALETTE_INDEX_0);
|
||||
gfx_draw_string(&dpi, screenCoords, static_cast<const char*>(gTextInput->ImeBuffer), { COLOUR_DARK_GREEN });
|
||||
GfxDrawString(&dpi, screenCoords, static_cast<const char*>(gTextInput->ImeBuffer), { COLOUR_DARK_GREEN });
|
||||
}
|
||||
|
||||
void ExecuteCallback(bool hasValue)
|
||||
|
||||
Reference in New Issue
Block a user