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

Method OnTooltip

src/textfile_gui.cpp:537–547  ·  view source on GitHub ↗

virtual */

Source from the content-addressed store, hash-verified

535}
536
537/* virtual */ bool TextfileWindow::OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond)
538{
539 if (widget != WID_TF_BACKGROUND) return false;
540
541 const Hyperlink *link = this->GetHyperlink(pt);
542 if (link == nullptr) return false;
543
544 GuiShowTooltips(this, GetEncodedString(STR_JUST_RAW_STRING, link->destination), close_cond);
545
546 return true;
547}
548
549/* virtual */ void TextfileWindow::DrawWidget(const Rect &r, WidgetID widget) const
550{

Callers 2

DispatchRightClickEventFunction · 0.45
DispatchHoverEventFunction · 0.45

Calls 3

GetHyperlinkMethod · 0.95
GuiShowTooltipsFunction · 0.85
GetEncodedStringFunction · 0.70

Tested by

no test coverage detected