From 9fe65f93fea28f573160b85cbcf9505c0d9b2e3b Mon Sep 17 00:00:00 2001 From: alberth Date: Sun, 6 Mar 2011 15:51:44 +0000 Subject: (svn r22210) -Add: Add a variable for the value strings in the settings tables. --- src/settings_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/settings_gui.cpp') diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index f25d1b843..751075a20 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -615,7 +615,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.str + value); + SetDParam(0, sd->desc.val_str + value); } virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) @@ -633,7 +633,7 @@ public: /* Get the string and try all strings from the smallest to the highest value */ StringID str = this->GetWidget(widget)->widget_data; for (int32 value = sdb->min; (uint32)value <= sdb->max; value += sdb->interval) { - SetDParam(0, sdb->str + value); + SetDParam(0, sdb->val_str + value); *size = maxdim(*size, GetStringBoundingBox(str)); } } @@ -1171,7 +1171,7 @@ void SettingEntry::DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd if (sdb->flags & SGF_CURRENCY) { SetDParam(0, STR_JUST_CURRENCY); } else if (sdb->flags & SGF_MULTISTRING) { - SetDParam(0, sdb->str - sdb->min + value + 1); + SetDParam(0, sdb->val_str - sdb->min + value); } else { SetDParam(0, (sdb->flags & SGF_NOCOMMA) ? STR_JUST_INT : STR_JUST_COMMA); } -- cgit v1.2.3-54-g00ecf