Codechange: Add callbacks to IntSettingDesc to support dynamic strings for title, help and values.

This commit is contained in:
frosch
2024-01-27 22:11:20 +01:00
committed by frosch
parent 022b9e92d2
commit 9e9a8ca7f6
22 changed files with 153 additions and 83 deletions

View File

@@ -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