mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
formatting
This commit is contained in:
parent
110635df7b
commit
d487092d84
@ -19,7 +19,7 @@
|
||||
_compiledConfig = "
|
||||
";
|
||||
{
|
||||
/*_settingData = [
|
||||
/*_settingData = [
|
||||
_name,
|
||||
_typeName,
|
||||
_isClientSetable,
|
||||
@ -41,7 +41,7 @@ _compiledConfig = "
|
||||
if (GVAR(ClientSettingsExportIncluded) || !_isClientSetable) then {
|
||||
_value = missionNamespace getvariable [_name, _defaultValue];
|
||||
if (_typeName == "STRING") then { // I dont think we have string values, but just in case
|
||||
_value = format['"%1"', _value];
|
||||
_value = format['"%1"', _value];
|
||||
};
|
||||
|
||||
_compiledConfigEntry = format ["
|
||||
|
@ -19,7 +19,7 @@ _logic = _this select 0;
|
||||
if (isMultiplayer) exitwith {};
|
||||
|
||||
if (_logic getvariable ["allowconfigurationExport", false]) then {
|
||||
GVAR(serverConfigGeneration) = 1;
|
||||
GVAR(serverConfigGeneration) = 1;
|
||||
} else {
|
||||
GVAR(serverConfigGeneration) = 0;
|
||||
GVAR(serverConfigGeneration) = 0;
|
||||
};
|
||||
|
@ -24,18 +24,18 @@ _rightDropDownIndex = lbCurSel 400; //Index of right drop down
|
||||
if (_rightDropDownIndex < 0) then {_rightDropDownIndex = 0;};
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideOptions)))) then {
|
||||
_settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0;
|
||||
[MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting);
|
||||
};
|
||||
[false] call FUNC(settingsMenuUpdateList);
|
||||
};
|
||||
case (MENU_TAB_SERVER_OPTIONS): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideOptions)))) then {
|
||||
_settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0;
|
||||
[MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting);
|
||||
};
|
||||
[false] call FUNC(serverSettingsMenuUpdateList);
|
||||
};
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideOptions)))) then {
|
||||
_settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0;
|
||||
[MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting);
|
||||
};
|
||||
[false] call FUNC(settingsMenuUpdateList);
|
||||
};
|
||||
case (MENU_TAB_SERVER_OPTIONS): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideOptions)))) then {
|
||||
_settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0;
|
||||
[MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting);
|
||||
};
|
||||
[false] call FUNC(serverSettingsMenuUpdateList);
|
||||
};
|
||||
};
|
||||
|
@ -22,22 +22,22 @@ _settingIndex = lbCurSel 200; //Index of left list
|
||||
_inputText = ctrlText 414; //Index of right drop down
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_SERVER_VALUES): {
|
||||
case (MENU_TAB_SERVER_VALUES): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideValues)))) then {
|
||||
try {
|
||||
_setting = (GVAR(serverSideValues) select _settingIndex);
|
||||
_settingName = _setting select 0;
|
||||
try {
|
||||
_setting = (GVAR(serverSideValues) select _settingIndex);
|
||||
_settingName = _setting select 0;
|
||||
|
||||
_convertedValue = switch (toUpper (_setting select 1)) do {
|
||||
case "STRING": {format ['"%1"', _inputText]};
|
||||
case "ARRAY": {format [call compile "[%1]", _inputText]};
|
||||
case "SCALAR": {parseNumber _inputText;};
|
||||
default {throw "Error"};
|
||||
};
|
||||
[MENU_TAB_SERVER_VALUES, _settingName, _convertedValue] call FUNC(updateSetting);
|
||||
} catch {
|
||||
};
|
||||
};
|
||||
_convertedValue = switch (toUpper (_setting select 1)) do {
|
||||
case "STRING": {format ['"%1"', _inputText]};
|
||||
case "ARRAY": {format [call compile "[%1]", _inputText]};
|
||||
case "SCALAR": {parseNumber _inputText;};
|
||||
default {throw "Error"};
|
||||
};
|
||||
[MENU_TAB_SERVER_VALUES, _settingName, _convertedValue] call FUNC(updateSetting);
|
||||
} catch {
|
||||
};
|
||||
};
|
||||
[false] call FUNC(serverSettingsMenuUpdateList);
|
||||
};
|
||||
};
|
||||
|
@ -19,9 +19,9 @@ private "_settingsMenu";
|
||||
disableSerialization;
|
||||
_settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu';
|
||||
if (GVAR(ClientSettingsExportIncluded)) then {
|
||||
(_settingsMenu displayCtrl 1102) ctrlSetText localize ("STR_ACE_OptionsMenu_exClientSettings");
|
||||
(_settingsMenu displayCtrl 1102) ctrlSetText localize ("STR_ACE_OptionsMenu_exClientSettings");
|
||||
} else {
|
||||
(_settingsMenu displayCtrl 1102) ctrlSetText localize ("STR_ACE_OptionsMenu_inClientSettings");
|
||||
(_settingsMenu displayCtrl 1102) ctrlSetText localize ("STR_ACE_OptionsMenu_inClientSettings");
|
||||
};
|
||||
|
||||
[] call FUNC(onServerSettingsMenuOpen);
|
||||
|
Loading…
Reference in New Issue
Block a user