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

Method GetWidgetString

src/newgrf_debug_gui.cpp:344–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342 }
343
344 std::string GetWidgetString(WidgetID widget, StringID stringid) const override
345 {
346 if (widget != WID_NGRFI_CAPTION) return this->Window::GetWidgetString(widget, stringid);
347
348 return GetFeatureHelper(this->window_number).GetName(this->GetFeatureIndex());
349 }
350
351 void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
352 {

Callers

nothing calls this directly

Calls 2

GetFeatureIndexMethod · 0.95
GetNameMethod · 0.45

Tested by

no test coverage detected