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

Method GetSettingString

src/newgrf_gui.cpp:273–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271 }
272
273 std::string GetSettingString(const GRFParameterInfo &par_info, int i, uint32_t value) const
274 {
275 auto [param1, param2] = this->GetValueParams(par_info, value);
276 auto name = GetGRFStringFromGRFText(par_info.name);
277 return name.has_value()
278 ? GetString(STR_NEWGRF_PARAMETERS_SETTING, STR_JUST_RAW_STRING, std::string(*name), param1, param2)
279 : GetString(STR_NEWGRF_PARAMETERS_SETTING, STR_NEWGRF_PARAMETERS_DEFAULT_NAME, i + 1, param1, param2);
280 }
281
282 void DrawWidget(const Rect &r, WidgetID widget) const override
283 {

Callers 1

DrawWidgetMethod · 0.95

Calls 4

GetValueParamsMethod · 0.95
GetGRFStringFromGRFTextFunction · 0.85
stringFunction · 0.85
GetStringFunction · 0.70

Tested by

no test coverage detected