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

@@ -108,6 +108,13 @@ static void SettingsValueVelocityUnit(const IntSettingDesc &, uint first_param,
SetDParam(first_param, val);
}
/** A negative value has another string (the one after "strval"). */
static void SettingsValueAbsolute(const IntSettingDesc &sd, uint first_param, int32_t value)
{
SetDParam(first_param, sd.str_val + ((value >= 0) ? 1 : 0));
SetDParam(first_param + 1, abs(value));
}
/** Reposition the main toolbar as the setting changed. */
static void v_PositionMainToolbar(int32_t)
{