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