1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Convert CustomWindow into a class

This commit is contained in:
Ted John
2021-01-31 14:07:21 +00:00
parent faf7f5706f
commit 82b1a5eb6d
3 changed files with 703 additions and 723 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1530,9 +1530,10 @@ void window_event_scroll_mousedown_call(rct_window* w, int32_t scrollIndex, cons
void window_event_scroll_mousedrag_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
{
if (w->event_handlers != nullptr)
if (w->event_handlers->scroll_mousedrag != nullptr)
w->event_handlers->scroll_mousedrag(w, scrollIndex, screenCoords);
if (w->event_handlers == nullptr)
w->OnScrollMouseDrag(scrollIndex, screenCoords);
else if (w->event_handlers->scroll_mouseover != nullptr)
w->event_handlers->scroll_mousedrag(w, scrollIndex, screenCoords);
}
void window_event_scroll_mouseover_call(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)

View File

@@ -154,6 +154,9 @@ struct rct_window
{
return {};
}
virtual void OnScrollMouseDrag(int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
{
}
virtual void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
{
}