mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 07:43:01 +01:00
OnToolUpdate, OnToolDrag, OnToolUp now being used
This commit is contained in:
@@ -1462,8 +1462,9 @@ void window_event_unknown_08_call(rct_window* w)
|
||||
|
||||
void window_event_tool_update_call(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
if (w->event_handlers != nullptr)
|
||||
if (w->event_handlers->tool_update != nullptr)
|
||||
if (w->event_handlers == nullptr)
|
||||
w->OnToolUpdate(widgetIndex, screenCoords);
|
||||
else if (w->event_handlers->tool_update != nullptr)
|
||||
w->event_handlers->tool_update(w, widgetIndex, screenCoords);
|
||||
}
|
||||
|
||||
@@ -1477,15 +1478,17 @@ void window_event_tool_down_call(rct_window* w, rct_widgetindex widgetIndex, con
|
||||
|
||||
void window_event_tool_drag_call(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
if (w->event_handlers != nullptr)
|
||||
if (w->event_handlers->tool_drag != nullptr)
|
||||
if (w->event_handlers == nullptr)
|
||||
w->OnToolDrag(widgetIndex, screenCoords);
|
||||
else if (w->event_handlers->tool_drag != nullptr)
|
||||
w->event_handlers->tool_drag(w, widgetIndex, screenCoords);
|
||||
}
|
||||
|
||||
void window_event_tool_up_call(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
if (w->event_handlers != nullptr)
|
||||
if (w->event_handlers->tool_up != nullptr)
|
||||
if (w->event_handlers == nullptr)
|
||||
w->OnToolUp(widgetIndex, screenCoords);
|
||||
else if (w->event_handlers->tool_up != nullptr)
|
||||
w->event_handlers->tool_up(w, widgetIndex, screenCoords);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user