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

Method GetClassName

src/road_gui.cpp:1231–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229 void SetSelectedClass(int id) const override { _roadstop_gui.sel_class = this->GetClassIndex(id); }
1230
1231 StringID GetClassName(int id) const override
1232 {
1233 const auto *rsc = this->GetClass(id);
1234 if (!IsClassChoice(*rsc)) return INVALID_STRING_ID;
1235 return rsc->name;
1236 }
1237
1238 int GetSelectedType() const override { return _roadstop_gui.sel_type; }
1239 void SetSelectedType(int id) const override { _roadstop_gui.sel_type = id; }

Callers

nothing calls this directly

Calls 1

GetClassMethod · 0.80

Tested by

no test coverage detected