1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 07:44:38 +01:00

Use dpi ref in rect and line drawing functions

This commit is contained in:
Gymnasiast
2023-04-03 23:16:34 +02:00
committed by duncanspumpkin
parent 2941f6f7a5
commit bb83a80eab
47 changed files with 276 additions and 278 deletions

View File

@@ -1110,7 +1110,7 @@ private:
void OnScrollDrawRides(DrawPixelInfo& dpi, int32_t scrollIndex)
{
int32_t colour = ColourMapA[colours[1]].mid_light;
GfxFillRect(&dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, colour);
GfxFillRect(dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width - 1, dpi.y + dpi.height - 1 } }, colour);
for (int32_t i = 0; i < no_list_items; i++)
{
@@ -1120,14 +1120,14 @@ private:
continue;
// Checkbox
GfxFillRectInset(&dpi, { { 2, y }, { 11, y + 10 } }, colours[1], INSET_RECT_F_E0);
GfxFillRectInset(dpi, { { 2, y }, { 11, y + 10 } }, colours[1], INSET_RECT_F_E0);
// Highlighted
auto stringId = STR_BLACK_STRING;
if (i == selected_list_item)
{
stringId = STR_WINDOW_COLOUR_2_STRINGID;
GfxFilterRect(&dpi, { 0, y, width, y + 11 }, FilterPaletteID::PaletteDarken1);
GfxFilterRect(dpi, { 0, y, width, y + 11 }, FilterPaletteID::PaletteDarken1);
}
// Checkbox mark