Codechange: Build engine preview strings from separate strings. (#13579)
This replaces stuffing substrings and parameters in various global parameters and uses local parameters instead.
This commit is contained in:
@@ -430,7 +430,7 @@ struct NewsWindow : Window {
|
||||
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
||||
{
|
||||
StringID str = STR_NULL;
|
||||
std::string str;
|
||||
switch (widget) {
|
||||
case WID_N_CAPTION: {
|
||||
/* Caption is not a real caption (so that the window cannot be moved)
|
||||
@@ -447,16 +447,16 @@ struct NewsWindow : Window {
|
||||
|
||||
case WID_N_MESSAGE:
|
||||
CopyInDParam(this->ni->params);
|
||||
str = this->ni->string_id;
|
||||
str = GetString(this->ni->string_id);
|
||||
break;
|
||||
|
||||
case WID_N_COMPANY_MSG:
|
||||
str = this->GetCompanyMessageString();
|
||||
str = GetString(this->GetCompanyMessageString());
|
||||
break;
|
||||
|
||||
case WID_N_VEH_NAME:
|
||||
case WID_N_VEH_TITLE:
|
||||
str = this->GetNewVehicleMessageString(widget);
|
||||
str = GetString(this->GetNewVehicleMessageString(widget));
|
||||
break;
|
||||
|
||||
case WID_N_VEH_INFO: {
|
||||
|
||||
Reference in New Issue
Block a user