Codechange: Add callbacks to IntSettingDesc to support dynamic strings for title, help and values.
This commit is contained in:
@@ -12,7 +12,7 @@ static const SettingVariant _linkgraph_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@@ -25,6 +25,9 @@ strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
|
||||
strval = STR_NULL
|
||||
pre_cb = nullptr
|
||||
post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
||||
Reference in New Issue
Block a user