1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Move widget strings from localisation to Widget.h (#22279)

This commit is contained in:
Aaron van Geffen
2024-07-12 20:47:56 +02:00
committed by GitHub
parent 749a1d5ac3
commit cee2eb1461
8 changed files with 18 additions and 22 deletions

View File

@@ -641,8 +641,7 @@ static void WidgetCheckboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex wi
if (WidgetIsPressed(w, widgetIndex))
{
DrawText(
dpi, { midLeft - ScreenCoordsXY{ 0, 5 } }, { colour.withFlag(ColourFlag::translucent, false) },
static_cast<const char*>(CheckBoxMarkString));
dpi, { midLeft - ScreenCoordsXY{ 0, 5 } }, { colour.withFlag(ColourFlag::translucent, false) }, kCheckMarkString);
}
// draw the text
@@ -743,7 +742,7 @@ static void WidgetHScrollbarDraw(
uint8_t flags = (scroll.flags & HSCROLLBAR_LEFT_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0;
GfxFillRectInset(dpi, { { l, t }, { l + (kScrollBarWidth - 1), b } }, colour, flags);
DrawText(dpi, { l + 1, t }, {}, static_cast<const char*>(BlackLeftArrowString));
DrawText(dpi, { l + 1, t }, {}, kBlackLeftArrowString);
}
// Thumb
@@ -760,7 +759,7 @@ static void WidgetHScrollbarDraw(
uint8_t flags = (scroll.flags & HSCROLLBAR_RIGHT_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0;
GfxFillRectInset(dpi, { { r - (kScrollBarWidth - 1), t }, { r, b } }, colour, flags);
DrawText(dpi, { r - 6, t }, {}, static_cast<const char*>(BlackRightArrowString));
DrawText(dpi, { r - 6, t }, {}, kBlackRightArrowString);
}
}
@@ -782,7 +781,7 @@ static void WidgetVScrollbarDraw(
GfxFillRectInset(
dpi, { { l, t }, { r, t + (kScrollBarWidth - 1) } }, colour,
((scroll.flags & VSCROLLBAR_UP_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0));
DrawText(dpi, { l + 1, t - 1 }, {}, static_cast<const char*>(BlackUpArrowString));
DrawText(dpi, { l + 1, t - 1 }, {}, kBlackUpArrowString);
// Thumb
GfxFillRectInset(
@@ -795,7 +794,7 @@ static void WidgetVScrollbarDraw(
GfxFillRectInset(
dpi, { { l, b - (kScrollBarWidth - 1) }, { r, b } }, colour,
((scroll.flags & VSCROLLBAR_DOWN_PRESSED) ? INSET_RECT_FLAG_BORDER_INSET : 0));
DrawText(dpi, { l + 1, b - (kScrollBarWidth - 1) }, {}, static_cast<const char*>(BlackDownArrowString));
DrawText(dpi, { l + 1, b - (kScrollBarWidth - 1) }, {}, kBlackDownArrowString);
}
/**