changeset 19336:ad5c89d6d7e9 draft

(svn r24233) -Codechange: Rename 'val_str' to 'str_val' to better match with 'strval' in the ini files.
author alberth <alberth@openttd.org>
date Sat, 12 May 2012 10:07:18 +0000
parents 6bc710e256a4
children f112223f5607
files src/settings_gui.cpp src/settings_internal.h
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -725,7 +725,7 @@
 		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 @@
 		/* 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 @@
 				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);
 	}
--- a/src/settings_internal.h
+++ b/src/settings_internal.h
@@ -67,7 +67,7 @@
 	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
 };