1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 23:33:04 +01:00

Rework tooltip to be more logical (#13137)

This commit is contained in:
Duncan
2020-10-10 14:49:56 +01:00
committed by GitHub
parent 61c8cbf88b
commit f28907a87d
10 changed files with 52 additions and 37 deletions

View File

@@ -1520,12 +1520,16 @@ void window_event_unknown_15_call(rct_window* w, int32_t scrollIndex, int32_t sc
w->event_handlers->unknown_15(w, scrollIndex, scrollAreaType);
}
rct_string_id window_event_tooltip_call(rct_window* w, rct_widgetindex widgetIndex)
OpenRCT2String window_event_tooltip_call(rct_window* w, const rct_widgetindex widgetIndex, const rct_string_id fallback)
{
rct_string_id result = 0;
if (w->event_handlers->tooltip != nullptr)
w->event_handlers->tooltip(w, widgetIndex, &result);
return result;
{
return w->event_handlers->tooltip(w, widgetIndex, fallback);
}
else
{
return { fallback, {} };
}
}
int32_t window_event_cursor_call(rct_window* w, rct_widgetindex widgetIndex, const ScreenCoordsXY& screenCoords)