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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user