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:
+2
-3
@@ -250,11 +250,10 @@ protected:
|
||||
for (const StoryPage *p : this->story_pages) {
|
||||
bool current_page = p->index == this->selected_page_id;
|
||||
if (!p->title.empty()) {
|
||||
list.push_back(MakeDropDownListStringItem(p->title, p->index.base(), current_page));
|
||||
list.push_back(MakeDropDownListStringItem(GetString(STR_JUST_RAW_STRING, p->title), p->index.base(), current_page));
|
||||
} else {
|
||||
/* No custom title => use a generic page title with page number. */
|
||||
SetDParam(0, page_num);
|
||||
list.push_back(MakeDropDownListStringItem(STR_STORY_BOOK_GENERIC_PAGE_ITEM, p->index.base(), current_page));
|
||||
list.push_back(MakeDropDownListStringItem(GetString(STR_STORY_BOOK_GENERIC_PAGE_ITEM, page_num), p->index.base(), current_page));
|
||||
}
|
||||
page_num++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user