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

Method GetClassName

src/object_gui.cpp:67–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 void SetSelectedClass(int id) const override { _object_gui.sel_class = this->GetClassIndex(id); }
66
67 StringID GetClassName(int id) const override
68 {
69 const auto *objclass = this->GetClass(id);
70 if (objclass->GetUISpecCount() == 0) return INVALID_STRING_ID;
71 return objclass->name;
72 }
73
74 int GetSelectedType() const override { return _object_gui.sel_type; }
75 void SetSelectedType(int id) const override { _object_gui.sel_type = id; }

Callers

nothing calls this directly

Calls 2

GetClassMethod · 0.80
GetUISpecCountMethod · 0.80

Tested by

no test coverage detected