MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GuiShowTooltips

Function GuiShowTooltips

src/misc_gui.cpp:693–700  ·  view source on GitHub ↗

* Shows a tooltip * @param parent The window this tooltip is related to. * @param text String to be displayed. May include encoded parameters. * @param close_tooltip the condition under which the tooltip closes */

Source from the content-addressed store, hash-verified

691 * @param close_tooltip the condition under which the tooltip closes
692 */
693void GuiShowTooltips(Window *parent, EncodedString &&text, TooltipCloseCondition close_tooltip)
694{
695 CloseWindowById(WC_TOOLTIPS, 0);
696
697 if (text.empty() || !_cursor.in_window) return;
698
699 new TooltipsWindow(parent, std::move(text), close_tooltip);
700}
701
702void QueryString::HandleEditBox(Window *w, WidgetID wid)
703{

Callers 13

OnTooltipMethod · 0.85
DispatchRightClickEventFunction · 0.85
DispatchHoverEventFunction · 0.85
OnTooltipMethod · 0.85
OnTooltipMethod · 0.85
OnRightClickMethod · 0.85
OnTooltipMethod · 0.85
OnTooltipMethod · 0.85
OnTooltipMethod · 0.85
ShowMeasurementTooltipsFunction · 0.85
ShowTooltipMethod · 0.85
OnTooltipMethod · 0.85

Calls 2

CloseWindowByIdFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected