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

Method OnTooltip

src/cheat_gui.cpp:579–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577 }
578
579 bool OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond) override
580 {
581 if (widget != WID_C_SETTINGS) return false;
582
583 int row = GetRowFromWidget(pt.y, widget, WidgetDimensions::scaled.framerect.top, this->line_height);
584 if (row == INT_MAX) return false;
585
586 const SettingDesc *desc = this->sandbox_settings[row];
587 const IntSettingDesc *sd = desc->AsIntSetting();
588 GuiShowTooltips(this, GetEncodedString(sd->GetHelp()), close_cond);
589
590 return true;
591 }
592
593 void OnTimeout() override
594 {

Callers

nothing calls this directly

Calls 4

GuiShowTooltipsFunction · 0.85
AsIntSettingMethod · 0.80
GetHelpMethod · 0.80
GetEncodedStringFunction · 0.70

Tested by

no test coverage detected