mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +01:00
Use ScreenCoordsXY for scroll_mouse* functions
This commit is contained in:
@@ -291,8 +291,8 @@ static void window_object_load_error_close(rct_window *w);
|
||||
static void window_object_load_error_update(rct_window *w);
|
||||
static void window_object_load_error_mouseup(rct_window *w, rct_widgetindex widgetIndex);
|
||||
static void window_object_load_error_scrollgetsize(rct_window *w, int32_t scrollIndex, int32_t *width, int32_t *height);
|
||||
static void window_object_load_error_scrollmouseover(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y);
|
||||
static void window_object_load_error_scrollmousedown(rct_window *w, int32_t scrollIndex, int32_t x, int32_t y);
|
||||
static void window_object_load_error_scrollmouseover(rct_window *w, int32_t scrollIndex, ScreenCoordsXY screenCoords);
|
||||
static void window_object_load_error_scrollmousedown(rct_window *w, int32_t scrollIndex, ScreenCoordsXY screenCoords);
|
||||
static void window_object_load_error_paint(rct_window *w, rct_drawpixelinfo *dpi);
|
||||
static void window_object_load_error_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int32_t scrollIndex);
|
||||
#ifndef DISABLE_HTTP
|
||||
@@ -519,11 +519,11 @@ static void window_object_load_error_mouseup(rct_window* w, rct_widgetindex widg
|
||||
}
|
||||
}
|
||||
|
||||
static void window_object_load_error_scrollmouseover(rct_window* w, int32_t scrollIndex, int32_t x, int32_t y)
|
||||
static void window_object_load_error_scrollmouseover(rct_window* w, int32_t scrollIndex, ScreenCoordsXY screenCoords)
|
||||
{
|
||||
// Highlight item that the cursor is over, or remove highlighting if none
|
||||
int32_t selected_item;
|
||||
selected_item = y / SCROLLABLE_ROW_HEIGHT;
|
||||
selected_item = screenCoords.y / SCROLLABLE_ROW_HEIGHT;
|
||||
if (selected_item < 0 || selected_item >= w->no_list_items)
|
||||
highlighted_index = -1;
|
||||
else
|
||||
@@ -545,10 +545,10 @@ static void window_object_load_error_select_element_from_list(rct_window* w, int
|
||||
widget_invalidate(w, WIDX_SCROLL);
|
||||
}
|
||||
|
||||
static void window_object_load_error_scrollmousedown(rct_window* w, int32_t scrollIndex, int32_t x, int32_t y)
|
||||
static void window_object_load_error_scrollmousedown(rct_window* w, int32_t scrollIndex, ScreenCoordsXY screenCoords)
|
||||
{
|
||||
int32_t selected_item;
|
||||
selected_item = y / SCROLLABLE_ROW_HEIGHT;
|
||||
selected_item = screenCoords.y / SCROLLABLE_ROW_HEIGHT;
|
||||
window_object_load_error_select_element_from_list(w, selected_item);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user