Codechange: Replace SF_GUI_NEGATIVE_IS_SPECIAL with a settings value callback.

This commit is contained in:
frosch
2024-01-27 22:50:40 +01:00
committed by frosch
parent 28c83089f6
commit 17dfc1a49a
4 changed files with 10 additions and 5 deletions

View File

@@ -11,6 +11,7 @@
static void UpdateAllServiceInterval(int32_t new_value);
static bool CanUpdateServiceInterval(VehicleType type, int32_t &new_value);
static void UpdateServiceInterval(VehicleType type, int32_t new_value);
static void SettingsValueAbsolute(const IntSettingDesc &sd, uint first_param, int32_t value);
static const SettingVariant _company_settings_table[] = {
[post-amble]
@@ -52,13 +53,14 @@ cat = SC_BASIC
[SDT_VAR]
var = engine_renew_months
type = SLE_INT16
flags = SF_PER_COMPANY | SF_GUI_NEGATIVE_IS_SPECIAL
flags = SF_PER_COMPANY
def = 6
min = -12
max = 12
str = STR_CONFIG_SETTING_AUTORENEW_MONTHS
strhelp = STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT
strval = STR_CONFIG_SETTING_AUTORENEW_MONTHS_VALUE_BEFORE
val_cb = SettingsValueAbsolute
[SDT_VAR]
var = engine_renew_money