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