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

Method GetWidgetString

src/script/script_gui.cpp:606–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604 }
605
606 std::string GetWidgetString(WidgetID widget, StringID stringid) const override
607 {
608 if (widget == WID_TF_CAPTION) {
609 return GetString(stringid, (this->slot == OWNER_DEITY) ? STR_CONTENT_TYPE_GAME_SCRIPT : STR_CONTENT_TYPE_AI, GetConfig(this->slot)->GetInfo()->GetName());
610 }
611
612 return this->Window::GetWidgetString(widget, stringid);
613 }
614
615 void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
616 {

Callers

nothing calls this directly

Calls 4

GetConfigFunction · 0.85
GetStringFunction · 0.50
GetNameMethod · 0.45
GetInfoMethod · 0.45

Tested by

no test coverage detected