diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index d7fe753c97..30b674c0bc 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -421,7 +421,7 @@ static void window_ride_list_scrollgetsize(rct_window *w, sint32 scrollIndex, si { sint32 top; - *height = w->no_list_items * 10; + *height = w->no_list_items * SCROLLABLE_ROW_HEIGHT; if (w->selected_list_item != -1) { w->selected_list_item = -1; window_invalidate(w); @@ -444,7 +444,7 @@ static void window_ride_list_scrollmousedown(rct_window *w, sint32 scrollIndex, { sint32 index; - index = y / 10; + index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) return; @@ -469,7 +469,7 @@ static void window_ride_list_scrollmouseover(rct_window *w, sint32 scrollIndex, { sint32 index; - index = y / 10; + index = y / SCROLLABLE_ROW_HEIGHT; if (index >= w->no_list_items) return; @@ -590,7 +590,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, // Background highlight if (i == w->selected_list_item) { - gfx_filter_rect(dpi, 0, y, 800, y + 9, PALETTE_DARKEN_1); + gfx_filter_rect(dpi, 0, y, 800, y + SCROLLABLE_ROW_HEIGHT - 1, PALETTE_DARKEN_1); format = (_quickDemolishMode ? STR_LIGHTPINK_STRINGID : STR_WINDOW_COLOUR_2_STRINGID); } @@ -715,7 +715,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, set_format_arg(0, rct_string_id, formatSecondary); gfx_draw_string_left_clipped(dpi, format, gCommonFormatArgs, COLOUR_BLACK, 160, y - 1, 157); - y += 10; + y += SCROLLABLE_ROW_HEIGHT; } }