diff options
author | Patric Stout <truebrain@openttd.org> | 2021-05-29 23:27:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 23:27:01 +0200 |
commit | d70fb74ac669bdb64b5f594894629ec91801fd76 (patch) | |
tree | 344150f3a69cd97cf774eec16eed291ed4e2467c /src/table | |
parent | 5799402f7a4872d03809838dd7fa01db42bbd282 (diff) | |
download | openttd-d70fb74ac669bdb64b5f594894629ec91801fd76.tar.xz |
Codechange: use setting name instead of index for CmdChange(Company)Setting (#9306)
This is mostly done as there are now constraints on settings.ini you might not
expected. For example, conditional settings always have to come last, as otherwise
they would influence the index.
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/settings/settings.ini | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/src/table/settings/settings.ini b/src/table/settings/settings.ini index afa6db52f..4f9ea607a 100644 --- a/src/table/settings/settings.ini +++ b/src/table/settings/settings.ini @@ -2533,6 +2533,21 @@ str = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE strhelp = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT cat = SC_BASIC +; We might need to emulate a right mouse button on mac +[SDTC_VAR] +ifdef = __APPLE__ +var = gui.right_mouse_btn_emulation +type = SLE_UINT8 +flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC +guiflags = SGF_MULTISTRING +def = 0 +min = 0 +max = 2 +str = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU +strhelp = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT +strval = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND +cat = SC_BASIC + [SDTC_BOOL] var = gui.measure_tooltip flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC @@ -3873,24 +3888,3 @@ var = network.no_http_content_downloads flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC def = false cat = SC_EXPERT - -; Since the network code (CmdChangeSetting and friends) use the index in this array to decide -; which setting the server is talking about all conditional compilation of this array must be at the -; end. This isn't really the best solution, the settings the server can tell the client about should -; either use a separate array or some other form of identifier. - -; -; We might need to emulate a right mouse button on mac -[SDTC_VAR] -ifdef = __APPLE__ -var = gui.right_mouse_btn_emulation -type = SLE_UINT8 -flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC -guiflags = SGF_MULTISTRING -def = 0 -min = 0 -max = 2 -str = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU -strhelp = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT -strval = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND -cat = SC_BASIC |