diff options
-rw-r--r-- | src/settings_gui.cpp | 10 | ||||
-rw-r--r-- | src/settings_internal.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index dbf80d7a7..e4ebff0c2 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -725,7 +725,7 @@ public: uint i; const SettingDesc *sd = GetSettingFromName("difficulty.max_no_competitors", &i) + widget; int32 value = (int32)ReadValue(GetVariableAddress(&this->opt_mod_temp, &sd->save), sd->save.conv); - SetDParam(0, sd->desc.val_str + value); + SetDParam(0, sd->desc.str_val + value); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) @@ -743,7 +743,7 @@ public: /* Get the string and try all strings from the smallest to the highest value */ StringID str = this->GetWidget<NWidgetCore>(widget)->widget_data; for (int32 value = sdb->min; (uint32)value <= sdb->max; value += sdb->interval) { - SetDParam(0, sdb->val_str + value); + SetDParam(0, sdb->str_val + value); *size = maxdim(*size, GetStringBoundingBox(str)); } } @@ -1288,12 +1288,12 @@ void SettingEntry::DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd editable && value != (sdb->flags & SGF_0ISDISABLED ? 0 : sdb->min), editable && (uint32)value != sdb->max); if ((sdb->flags & SGF_MULTISTRING) != 0) { - SetDParam(1, sdb->val_str - sdb->min + value); + SetDParam(1, sdb->str_val - sdb->min + value); } else if ((sdb->flags & SGF_DISPLAY_ABS) != 0) { - SetDParam(1, sdb->val_str + ((value >= 0) ? 1 : 0)); + SetDParam(1, sdb->str_val + ((value >= 0) ? 1 : 0)); value = abs(value); } else { - SetDParam(1, sdb->val_str + ((value == 0 && (sdb->flags & SGF_0ISDISABLED) != 0) ? 1 : 0)); + SetDParam(1, sdb->str_val + ((value == 0 && (sdb->flags & SGF_0ISDISABLED) != 0) ? 1 : 0)); } SetDParam(2, value); } diff --git a/src/settings_internal.h b/src/settings_internal.h index b4f87f819..f829fb395 100644 --- a/src/settings_internal.h +++ b/src/settings_internal.h @@ -67,7 +67,7 @@ struct SettingDescBase { int32 interval; ///< the interval to use between settings in the 'settings' window. If interval is '0' the interval is dynamically determined const char *many; ///< ONE/MANY_OF_MANY: string of possible values for this type StringID str; ///< (translated) string with descriptive text; gui and console - StringID val_str; ///< (translated) first string describing the value. + StringID str_val; ///< (Translated) first string describing the value. OnChange *proc; ///< callback procedure for when the value is changed OnConvert *proc_cnvt; ///< callback procedure when loading value mechanism fails }; |