From f1cdc99afcefee9d6b74d04e73b1fbb95ce8439d Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sun, 1 Nov 2015 20:55:54 +0000 Subject: [PATCH] Fix #2079. Scroll windows no longer have incorrect tooltips There was an issue with forgetting to reset the x/y variable introduced when I fixed a different bug. Possibly fixes #2136 --- src/input.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index 24c66838b6..947138e16b 100644 --- a/src/input.c +++ b/src/input.c @@ -1036,14 +1036,19 @@ void process_mouse_over(int x, int y) RCT2_GLOBAL(0x9DE558, uint16) = x; RCT2_GLOBAL(0x9DE55A, uint16) = y; int output_scroll_area, scroll_id; - widget_scroll_get_part(window, &window->widgets[widgetId], x, y, &x, &y, &output_scroll_area, &scroll_id); + int scroll_x, scroll_y; + widget_scroll_get_part(window, &window->widgets[widgetId], x, y, &scroll_x, &scroll_y, &output_scroll_area, &scroll_id); cursorId = scroll_id; if (output_scroll_area != SCROLL_PART_VIEW) { cursorId = CURSOR_ARROW; break; } - //Fall through to default + // Same as default but with scroll_x/y + cursorId = window_event_cursor_call(window, widgetId, scroll_x, scroll_y); + if (cursorId == -1) + cursorId = CURSOR_ARROW; + break; default: cursorId = window_event_cursor_call(window, widgetId, x, y); if (cursorId == -1)