1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00

Use SCROLLABLE_ROW_HEIGHT in ride list window.

This commit is contained in:
Aaron van Geffen
2017-12-18 15:59:17 +01:00
committed by Michael Steenbeek
parent a0cadab70b
commit ad5246976c

View File

@@ -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;
}
}