Fix modifer keys selection in settings ui

This commit is contained in:
dP
2021-10-23 18:56:06 +03:00
parent ece06f8510
commit e921aae3bc
2 changed files with 14 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
static void cm_v_RedrawStatusBar(int32 p1);
static std::initializer_list<const char*> _order_mod_actions{"nothing", "full_load", "transfer", "unload_all", "feeder_load", "feeder_unload", "no_load"};
static std::initializer_list<const char*> _mod_keys{"none", "shift", "ctrl", "alt"};
static const SettingVariant _cmclient_settings_table[] = {
[post-amble]
@@ -167,10 +168,11 @@ def = false
str = STR_CM_CONFIG_SETTING_LAND_TOOLTIPS_FOR_HOUSES
strhelp = STR_CM_CONFIG_SETTING_LAND_TOOLTIPS_FOR_HOUSES_HELPTEXT
[SDTC_VAR]
[SDTC_OMANY]
var = gui.cm_fn_mod
type = SLE_UINT8
guiflags = SGF_MULTISTRING
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
full = _mod_keys
def = 2
min = 0
max = 3
@@ -179,10 +181,11 @@ strhelp = STR_CM_CONFIG_SETTING_MODIFIER_FN_HELPTEXT
strval = STR_CM_CONFIG_SETTING_MODIFIER_NONE
cat = SC_ADVANCED
[SDTC_VAR]
[SDTC_OMANY]
var = gui.cm_remove_mod
type = SLE_UINT8
guiflags = SGF_MULTISTRING
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
full = _mod_keys
def = 2
min = 0
max = 3
@@ -191,10 +194,11 @@ strhelp = STR_CM_CONFIG_SETTING_MODIFIER_REMOVE_HELPTEXT
strval = STR_CM_CONFIG_SETTING_MODIFIER_NONE
cat = SC_ADVANCED
[SDTC_VAR]
[SDTC_OMANY]
var = gui.cm_estimate_mod
type = SLE_UINT8
guiflags = SGF_MULTISTRING
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
full = _mod_keys
def = 1
min = 0
max = 3