Changeset - r19307:0eec88c265b6
[Not reviewed]
master
0 4 0
alberth - 12 years ago 2012-05-06 15:03:45
alberth@openttd.org
(svn r24210) -Feature: Split the renew-months setting text in two string values (one before life time and one after).
4 files changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -1185,7 +1185,9 @@ STR_CONFIG_SETTING_ORDER_REVIEW_ON      
 
STR_CONFIG_SETTING_WARN_INCOME_LESS                             :Warn if a vehicle's income is negative: {STRING2}
 
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES                        :Vehicles never expire: {STRING2}
 
STR_CONFIG_SETTING_AUTORENEW_VEHICLE                            :Autorenew vehicle when it gets old: {STRING2}
 
STR_CONFIG_SETTING_AUTORENEW_MONTHS                             :Autorenew when vehicle is {STRING2} month{P 0:2 "" s} before/after max age
 
STR_CONFIG_SETTING_AUTORENEW_MONTHS                             :Autorenew when vehicle is {STRING2} max age
 
STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE                :{COMMA} month{P 0 "" s} before
 
STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_AFTER                 :{COMMA} month{P 0 "" s} after
 
STR_CONFIG_SETTING_AUTORENEW_MONEY                              :Autorenew minimum needed money for renew: {STRING2}
 
STR_CONFIG_SETTING_ERRMSG_DURATION                              :Duration of error message: {STRING2}
 
STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE                        :{COMMA} second{P 0 "" s}
src/settings_gui.cpp
Show inline comments
 
@@ -1289,6 +1289,9 @@ void SettingEntry::DrawSetting(GameSetti
 

	
 
		if ((sdb->flags & SGF_MULTISTRING) != 0) {
 
			SetDParam(1, sdb->val_str - sdb->min + value);
 
		} else if ((sdb->flags & SGF_DISPLAY_ABS) != 0) {
 
			SetDParam(1, sdb->val_str + ((value >= 0) ? 1 : 0));
 
			value = abs(value);
 
		} else {
 
			SetDParam(1, sdb->val_str + ((value == 0 && (sdb->flags & SGF_0ISDISABLED) != 0) ? 1 : 0));
 
		}
src/settings_internal.h
Show inline comments
 
@@ -40,6 +40,7 @@ enum SettingGuiFlagLong {
 
	 * Flags directing saving/loading of a variable */
 
	SGF_NONE = 0,
 
	SGF_0ISDISABLED  = 1 << 0, ///< a value of zero means the feature is disabled
 
	SGF_DISPLAY_ABS  = 1 << 1, ///< display absolute value of the setting
 
	SGF_MULTISTRING  = 1 << 2, ///< the value represents a limited number of string-options (internally integer)
 
	SGF_NETWORK_ONLY = 1 << 3, ///< this setting only applies to network games
 
	SGF_CURRENCY     = 1 << 4, ///< the number represents money, so when reading value multiply by exchange rate
src/table/company_settings.ini
Show inline comments
 
@@ -41,11 +41,12 @@ str      = STR_CONFIG_SETTING_AUTORENEW_
 
base     = CompanySettings
 
var      = engine_renew_months
 
type     = SLE_INT16
 
guiflags = SGF_PER_COMPANY | SGF_DISPLAY_ABS
 
def      = 6
 
min      = -12
 
max      = 12
 
str      = STR_CONFIG_SETTING_AUTORENEW_MONTHS
 
strval   = STR_JUST_COMMA
 
strval   = STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE
 

	
 
[SDT_VAR]
 
base     = CompanySettings
0 comments (0 inline, 0 general)