mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 23:33:04 +01:00
Name unknown_15 window event as ScrollSelect
Co-authored-by: leoleotte <leoleotte@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c5904d81d6
commit
99e13e023e
@@ -618,7 +618,7 @@ static void InputScrollBegin(rct_window& w, WidgetIndex widgetIndex, const Scree
|
||||
|
||||
_currentScrollArea = scroll_area;
|
||||
_currentScrollIndex = scroll_id;
|
||||
window_event_unknown_15_call(&w, scroll_id, scroll_area);
|
||||
window_event_scroll_select_call(&w, scroll_id, scroll_area);
|
||||
if (scroll_area == SCROLL_PART_VIEW)
|
||||
{
|
||||
window_event_scroll_mousedown_call(&w, scroll_id, scrollCoords);
|
||||
|
||||
@@ -628,7 +628,7 @@ static WindowEventList window_ride_graphs_events([](auto& events) {
|
||||
events.mouse_down = &WindowRideGraphsMousedown;
|
||||
events.update = &WindowRideGraphsUpdate;
|
||||
events.get_scroll_size = &WindowRideGraphsScrollgetheight;
|
||||
events.unknown_15 = &WindowRideGraphs15;
|
||||
events.scroll_select = &WindowRideGraphs15;
|
||||
events.tooltip = &WindowRideGraphsTooltip;
|
||||
events.invalidate = &WindowRideGraphsInvalidate;
|
||||
events.paint = &WindowRideGraphsPaint;
|
||||
|
||||
@@ -1574,11 +1574,12 @@ void window_event_viewport_rotate_call(rct_window* w)
|
||||
w->event_handlers->viewport_rotate(w);
|
||||
}
|
||||
|
||||
void window_event_unknown_15_call(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType)
|
||||
void window_event_scroll_select_call(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType)
|
||||
{
|
||||
if (w->event_handlers != nullptr)
|
||||
if (w->event_handlers->unknown_15 != nullptr)
|
||||
w->event_handlers->unknown_15(w, scrollIndex, scrollAreaType);
|
||||
if (w->event_handlers == nullptr)
|
||||
w->OnScrollSelect(scrollIndex, scrollAreaType);
|
||||
else if (w->event_handlers->scroll_select != nullptr)
|
||||
w->event_handlers->scroll_select(w, scrollIndex, scrollAreaType);
|
||||
}
|
||||
|
||||
OpenRCT2String window_event_tooltip_call(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback)
|
||||
|
||||
@@ -241,7 +241,7 @@ struct WindowEventList
|
||||
void (*scroll_mouseover)(struct rct_window*, int32_t, const ScreenCoordsXY&){};
|
||||
void (*text_input)(struct rct_window*, WidgetIndex, char*){};
|
||||
void (*viewport_rotate)(struct rct_window*){};
|
||||
void (*unknown_15)(struct rct_window*, int32_t, int32_t){};
|
||||
void (*scroll_select)(struct rct_window*, int32_t, int32_t){};
|
||||
OpenRCT2String (*tooltip)(struct rct_window*, const WidgetIndex, const StringId){};
|
||||
void (*cursor)(struct rct_window*, WidgetIndex, const ScreenCoordsXY&, CursorID*){};
|
||||
void (*moved)(struct rct_window*, const ScreenCoordsXY&){};
|
||||
@@ -685,7 +685,7 @@ void window_event_scroll_mousedrag_call(rct_window* w, int32_t scrollIndex, cons
|
||||
void window_event_scroll_mouseover_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords);
|
||||
void window_event_textinput_call(rct_window* w, WidgetIndex widgetIndex, char* text);
|
||||
void window_event_viewport_rotate_call(rct_window* w);
|
||||
void window_event_unknown_15_call(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType);
|
||||
void window_event_scroll_select_call(rct_window* w, int32_t scrollIndex, int32_t scrollAreaType);
|
||||
OpenRCT2String window_event_tooltip_call(rct_window* w, const WidgetIndex widgetIndex, const StringId fallback);
|
||||
CursorID window_event_cursor_call(rct_window* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords);
|
||||
void window_event_moved_call(rct_window* w, const ScreenCoordsXY& screenCoords);
|
||||
|
||||
@@ -157,6 +157,9 @@ struct rct_window
|
||||
{
|
||||
return {};
|
||||
}
|
||||
virtual void OnScrollSelect(int32_t scrollIndex, int32_t scrollAreaType)
|
||||
{
|
||||
}
|
||||
virtual void OnScrollMouseDrag(int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user