mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix issue with more than two rct_scrolls not working
This commit is contained in:
parent
2e64bdbe26
commit
2e95c64a7c
|
@ -862,14 +862,12 @@ void widget_scroll_get_part(
|
||||||
rct_window* w, rct_widget* widget, int32_t x, int32_t y, int32_t* output_x, int32_t* output_y, int32_t* output_scroll_area,
|
rct_window* w, rct_widget* widget, int32_t x, int32_t y, int32_t* output_x, int32_t* output_y, int32_t* output_scroll_area,
|
||||||
int32_t* scroll_id)
|
int32_t* scroll_id)
|
||||||
{
|
{
|
||||||
rct_widget* iterator = w->widgets;
|
|
||||||
*scroll_id = 0;
|
*scroll_id = 0;
|
||||||
while (++iterator != widget)
|
for (rct_widget* iterator = w->widgets; iterator != widget; iterator++)
|
||||||
{
|
{
|
||||||
if (iterator->type == WWT_SCROLL)
|
if (iterator->type == WWT_SCROLL)
|
||||||
{
|
{
|
||||||
(*scroll_id)++;
|
*scroll_id += 1;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue