Codechange: add SetDParamStr that accepts std::string&

This commit is contained in:
rubidium42
2021-04-27 20:58:17 +02:00
committed by rubidium42
parent f313a539a5
commit 6bca9e090d
11 changed files with 30 additions and 18 deletions

View File

@@ -435,7 +435,7 @@ public:
}
if (!this->town->text.empty()) {
SetDParamStr(0, this->town->text.c_str());
SetDParamStr(0, this->town->text);
DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y += FONT_HEIGHT_NORMAL, UINT16_MAX, STR_JUST_RAW_STRING, TC_BLACK);
}
}
@@ -517,7 +517,7 @@ public:
if (_settings_game.economy.station_noise_level) aimed_height += FONT_HEIGHT_NORMAL;
if (!this->town->text.empty()) {
SetDParamStr(0, this->town->text.c_str());
SetDParamStr(0, this->town->text);
aimed_height += GetStringHeight(STR_JUST_RAW_STRING, width - WD_FRAMERECT_LEFT - WD_FRAMERECT_RIGHT);
}