mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 11:22:45 +01:00
Codechange: Use only raw strings in drop down lists. (#13667)
Strings with parameters are now pre-formatted, avoiding global parameters. Helper functions still allow StringID.
This commit is contained in:
@@ -98,9 +98,8 @@ static CallBackFunction _last_started_action = CBF_NONE; ///< Last started user
|
||||
*/
|
||||
class DropDownListCompanyItem : public DropDownIcon<DropDownIcon<DropDownString<DropDownListItem>, true>> {
|
||||
public:
|
||||
DropDownListCompanyItem(CompanyID company, bool shaded) : DropDownIcon<DropDownIcon<DropDownString<DropDownListItem>, true>>(SPR_COMPANY_ICON, COMPANY_SPRITE_COLOUR(company), NetworkCanJoinCompany(company) ? SPR_EMPTY : SPR_LOCK, PAL_NONE, STR_NULL, company.base(), false, shaded)
|
||||
DropDownListCompanyItem(CompanyID company, bool shaded) : DropDownIcon<DropDownIcon<DropDownString<DropDownListItem>, true>>(SPR_COMPANY_ICON, COMPANY_SPRITE_COLOUR(company), NetworkCanJoinCompany(company) ? SPR_EMPTY : SPR_LOCK, PAL_NONE, GetString(STR_COMPANY_NAME_COMPANY_NUM, company, company), company.base(), false, shaded)
|
||||
{
|
||||
this->SetString(GetString(STR_COMPANY_NAME_COMPANY_NUM, company, company));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -659,7 +658,7 @@ static void AddDropDownLeagueTableOptions(DropDownList &list)
|
||||
{
|
||||
if (LeagueTable::GetNumItems() > 0) {
|
||||
for (LeagueTable *lt : LeagueTable::Iterate()) {
|
||||
list.push_back(MakeDropDownListStringItem(lt->title, lt->index.base()));
|
||||
list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_RAW_STRING, lt->title), lt->index.base()));
|
||||
}
|
||||
} else {
|
||||
list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_COMPANY_LEAGUE_TABLE, LTMN_PERFORMANCE_LEAGUE));
|
||||
|
||||
Reference in New Issue
Block a user