mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2106 from acemod/optionMenuFiltering
Option Menu Fixes for categories
This commit is contained in:
commit
13abee2612
@ -20,6 +20,7 @@ _parseConfigForDisplayNames = {
|
||||
if !(isClass _optionEntry) exitwith {false};
|
||||
_x set [3, getText (_optionEntry >> "displayName")];
|
||||
_x set [4, getText (_optionEntry >> "description")];
|
||||
_x set [8, getText (_optionEntry >> "category")];
|
||||
|
||||
private "_values";
|
||||
_values = _x select 5;
|
||||
|
@ -3,14 +3,14 @@ class ACE_Settings {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(AlwaysUseCursorSelfInteraction);
|
||||
};
|
||||
class GVAR(cursorKeepCentered) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(cursorKeepCentered);
|
||||
description = CSTRING(cursorKeepCenteredDescription);
|
||||
};
|
||||
@ -18,49 +18,49 @@ class ACE_Settings {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(AlwaysUseCursorInteraction);
|
||||
};
|
||||
class GVAR(UseListMenu) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(UseListMenu);
|
||||
};
|
||||
class GVAR(colorTextMax) {
|
||||
value[] = {1, 1, 1, 1};
|
||||
typeName = "COLOR";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(ColorTextMax);
|
||||
};
|
||||
class GVAR(colorTextMin) {
|
||||
value[] = {1, 1, 1, 0.25};
|
||||
typeName = "COLOR";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(ColorTextMin);
|
||||
};
|
||||
class GVAR(colorShadowMax) {
|
||||
value[] = {0, 0, 0, 1};
|
||||
typeName = "COLOR";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(ColorShadowMax);
|
||||
};
|
||||
class GVAR(colorShadowMin) {
|
||||
value[] = {0, 0, 0, 0.25};
|
||||
typeName = "COLOR";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(ColorShadowMin);
|
||||
};
|
||||
class GVAR(textSize) {
|
||||
value = 2;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(textSize);
|
||||
values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"};
|
||||
};
|
||||
@ -68,7 +68,7 @@ class ACE_Settings {
|
||||
value = 2;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(shadowSetting);
|
||||
description = CSTRING(shadowSettingDescription);
|
||||
values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)};
|
||||
@ -77,14 +77,14 @@ class ACE_Settings {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(ActionOnKeyRelease);
|
||||
};
|
||||
class GVAR(menuBackground) {
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(background);
|
||||
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)};
|
||||
};
|
||||
@ -92,7 +92,7 @@ class ACE_Settings {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
category = LSTRING(Category_InteractionMenu);
|
||||
category = CSTRING(Category_InteractionMenu);
|
||||
displayName = CSTRING(addBuildingActions);
|
||||
description = CSTRING(addBuildingActionsDescription);
|
||||
};
|
||||
|
@ -1,116 +1,116 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(level) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
value = 1;
|
||||
typeName = "SCALAR";
|
||||
values[] = {"Disabled", "Basic", "Advanced"};
|
||||
};
|
||||
class GVAR(medicSetting) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
value = 1;
|
||||
typeName = "SCALAR";
|
||||
values[] = {"Disabled", "Normal", "Advanced"};
|
||||
};
|
||||
class GVAR(enableFor) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
values[] = {"Players only", "Players and AI"};
|
||||
};
|
||||
class GVAR(enableOverdosing) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(bleedingCoefficient) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(painCoefficient) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(enableAirway) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = false;
|
||||
};
|
||||
class GVAR(enableFractures) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = false;
|
||||
};
|
||||
class GVAR(enableAdvancedWounds) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = false;
|
||||
};
|
||||
class GVAR(enableVehicleCrashes) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(enableScreams) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(playerDamageThreshold) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(AIDamageThreshold) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(enableUnconsciousnessAI) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
value = 1;
|
||||
typeName = "SCALAR";
|
||||
values[] = {"Disabled", "50/50", "Enabled"};
|
||||
};
|
||||
class GVAR(remoteControlledAI) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(preventInstaDeath) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(enableRevive) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 0;
|
||||
values[] = {"Disabled", "Players only", "Players and AI"};
|
||||
};
|
||||
class GVAR(maxReviveTime) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 120;
|
||||
};
|
||||
class GVAR(amountOfReviveLives) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = -1;
|
||||
};
|
||||
class GVAR(allowDeadBodyMovement) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(allowLitterCreation) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(litterSimulationDetail) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
displayName = CSTRING(litterSimulationDetail);
|
||||
description = CSTRING(litterSimulationDetail_Desc);
|
||||
typeName = "SCALAR";
|
||||
@ -122,48 +122,48 @@ class ACE_Settings {
|
||||
isClientSettable = 1;
|
||||
};
|
||||
class GVAR(litterCleanUpDelay) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(medicSetting_PAK) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
values[] = {"Anyone", "Medics only", "Doctors only"};
|
||||
};
|
||||
class GVAR(medicSetting_SurgicalKit) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 1;
|
||||
values[] = {"Anyone", "Medics only", "Doctors only"};
|
||||
};
|
||||
class GVAR(consumeItem_PAK) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 0;
|
||||
values[] = {"No", "Yes"};
|
||||
};
|
||||
class GVAR(consumeItem_SurgicalKit) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 0;
|
||||
values[] = {"No", "Yes"};
|
||||
};
|
||||
class GVAR(useLocation_PAK) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 3;
|
||||
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
|
||||
};
|
||||
class GVAR(useLocation_SurgicalKit) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "SCALAR";
|
||||
value = 2;
|
||||
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
|
||||
};
|
||||
class GVAR(useCondition_PAK) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName);
|
||||
description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description);
|
||||
typeName = "SCALAR";
|
||||
@ -171,7 +171,7 @@ class ACE_Settings {
|
||||
values[] = {"Anytime", "Stable"};
|
||||
};
|
||||
class GVAR(useCondition_SurgicalKit) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName);
|
||||
description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description);
|
||||
typeName = "SCALAR";
|
||||
@ -179,24 +179,24 @@ class ACE_Settings {
|
||||
values[] = {"Anytime", "Stable"};
|
||||
};
|
||||
class GVAR(keepLocalSettingsSynced) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(healHitPointAfterAdvBandage) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
displayName = CSTRING(healHitPointAfterAdvBandage);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(painIsOnlySuppressed) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
displayName = CSTRING(painIsOnlySuppressed);
|
||||
typeName = "BOOL";
|
||||
value = 1;
|
||||
};
|
||||
class GVAR(painEffectType) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
displayName = CSTRING(painEffectType);
|
||||
typeName = "SCALAR";
|
||||
value = 0;
|
||||
@ -204,18 +204,18 @@ class ACE_Settings {
|
||||
isClientSettable = 1;
|
||||
};
|
||||
class GVAR(allowUnconsciousAnimationOnTreatment) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
class GVAR(moveUnitsFromGroupOnUnconscious) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
typeName = "BOOL";
|
||||
value = 0;
|
||||
};
|
||||
|
||||
class GVAR(menuTypeStyle) {
|
||||
category = LSTRING(Category_Medical);
|
||||
category = CSTRING(Category_Medical);
|
||||
displayName = CSTRING(menuTypeDisplay);
|
||||
description = CSTRING(menuTypeDescription);
|
||||
typeName = "SCALAR";
|
||||
|
@ -4,6 +4,7 @@ class ACE_Settings {
|
||||
typeName = "COLOR";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(DefaultNametagColor);
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(showPlayerNames) {
|
||||
value = 1;
|
||||
@ -12,29 +13,34 @@ class ACE_Settings {
|
||||
displayName = CSTRING(ShowPlayerNames);
|
||||
description = CSTRING(ShowPlayerNames_Desc);
|
||||
values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress)};
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(showPlayerRanks) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(ShowPlayerRanks);
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(showVehicleCrewInfo) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(ShowVehicleCrewInfo);
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(showNamesForAI) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(ShowNamesForAI);
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(showCursorTagForVehicles) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 0;
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(showSoundWaves) {
|
||||
value = 1;
|
||||
@ -43,16 +49,19 @@ class ACE_Settings {
|
||||
displayName = CSTRING(ShowSoundWaves);
|
||||
description = CSTRING(ShowSoundWaves_Desc);
|
||||
values[] = {ECSTRING(common,Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)};
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(playerNamesViewDistance) {
|
||||
value = 5;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 0;
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(playerNamesMaxAlpha) {
|
||||
value = 0.8;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 0;
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
class GVAR(tagSize) {
|
||||
value = 2;
|
||||
@ -61,5 +70,6 @@ class ACE_Settings {
|
||||
displayName = CSTRING(TagSize_Name);
|
||||
description = CSTRING(TagSize_Description);
|
||||
values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"};
|
||||
category = CSTRING(Module_DisplayName);
|
||||
};
|
||||
};
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu"];
|
||||
private ["_settingsMenu", "_ctrlComboBox"];
|
||||
|
||||
disableSerialization;
|
||||
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
|
||||
@ -24,4 +24,4 @@ _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
|
||||
_ctrlComboBox = (_settingsMenu displayCtrl 14);
|
||||
GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox;
|
||||
|
||||
[false] call FUNC(settingsMenuUpdateList);
|
||||
[true] call FUNC(settingsMenuUpdateList);
|
||||
|
@ -18,11 +18,15 @@
|
||||
|
||||
private ["_settingIndex", "_rightDropDownIndex"];
|
||||
|
||||
_settingIndex = lbCurSel 200; //Index of left list
|
||||
_rightDropDownIndex = lbCurSel 400; //Index of right drop down
|
||||
|
||||
if (_rightDropDownIndex < 0) then {_rightDropDownIndex = 0;};
|
||||
|
||||
_settingIndex = -1;
|
||||
if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
|
||||
_settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
|
||||
};
|
||||
if (_settingIndex == -1) exitWith {};
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideOptions)))) then {
|
||||
|
@ -23,4 +23,4 @@ _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu';
|
||||
_ctrlComboBox = (_settingsMenu displayCtrl 14);
|
||||
GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox;
|
||||
|
||||
[false] call FUNC(serverSettingsMenuUpdateList);
|
||||
[true] call FUNC(serverSettingsMenuUpdateList);
|
||||
|
@ -18,9 +18,13 @@
|
||||
|
||||
private ["_settingIndex", "_inputText", "_setting", "_settingName", "_convertedValue"];
|
||||
|
||||
_settingIndex = lbCurSel 200; //Index of left list
|
||||
_inputText = ctrlText 414; //Index of right drop down
|
||||
|
||||
_settingIndex = -1;
|
||||
if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
|
||||
_settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
|
||||
};
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_SERVER_VALUES): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideValues)))) then {
|
||||
|
@ -72,7 +72,6 @@ lbClear (_menu displayCtrl 14);
|
||||
if (_x == "") then {
|
||||
_x = localize (LSTRING(category_all));
|
||||
};
|
||||
if (isLocalized _x) then {_x = localize _x};
|
||||
(_menu displayCtrl 14) lbAdd _x;
|
||||
} forEach GVAR(categories);
|
||||
|
||||
|
@ -56,9 +56,8 @@ if (GVAR(serverConfigGeneration) == 0) then {
|
||||
lbClear (_menu displayCtrl 14);
|
||||
{
|
||||
if (_x == "") then {
|
||||
_x = localize "STR_ACE_OptionsMenu_category_all";
|
||||
_x = localize LSTRING(category_all);
|
||||
};
|
||||
if (isLocalized _x) then {_x = localize _x};
|
||||
(_menu displayCtrl 14) lbAdd _x;
|
||||
} forEach GVAR(categories);
|
||||
|
||||
|
@ -18,7 +18,11 @@
|
||||
|
||||
private ["_newColor", "_settingIndex"];
|
||||
|
||||
_settingIndex = lbCurSel 200;
|
||||
_settingIndex = -1;
|
||||
if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
|
||||
_settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
|
||||
};
|
||||
if (_settingIndex == -1) exitWith {};
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_COLORS): {
|
||||
|
@ -30,8 +30,8 @@ private ["_name", "_default", "_lastSelected"];
|
||||
[MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting);
|
||||
} forEach GVAR(clientSideColors);
|
||||
|
||||
_lastSelected = lbCurSel 200;
|
||||
_lastSelected = lnbCurSelRow 200;
|
||||
[GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged);
|
||||
if (_lastSelected != -1) then {
|
||||
lbSetCurSel [200, _lastSelected];
|
||||
lnbSetCurSelRow [200, _lastSelected];
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ private ["_name", "_default", "_lastSelected"];
|
||||
[MENU_TAB_SERVER_VALUES, _name, _default] call FUNC(updateSetting);
|
||||
} forEach GVAR(serverSideVakyes);
|
||||
|
||||
_lastSelected = lbCurSel 200;
|
||||
_lastSelected = lnbCurSelRow 200;
|
||||
[GVAR(optionMenu_openTab)] call FUNC(onserverListBoxShowSelectionChanged);
|
||||
if (_lastSelected != -1) then {
|
||||
lbSetCurSel [200, _lastSelected];
|
||||
|
@ -16,11 +16,10 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor", "_expectedType", "_filteredCollection", "_selectedCategory"];
|
||||
private ["_settingsMenu", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor", "_expectedType"];
|
||||
disableSerialization;
|
||||
|
||||
_settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu';
|
||||
_ctrlList = _settingsMenu displayCtrl 200;
|
||||
|
||||
_collection = switch (GVAR(optionMenu_openTab)) do {
|
||||
case MENU_TAB_SERVER_OPTIONS: {GVAR(serverSideOptions)};
|
||||
@ -29,24 +28,13 @@ _collection = switch (GVAR(optionMenu_openTab)) do {
|
||||
default {[]};
|
||||
};
|
||||
|
||||
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection);
|
||||
_filteredCollection = [];
|
||||
{
|
||||
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
|
||||
_filteredCollection pushBack _x;
|
||||
};
|
||||
} forEach _collection;
|
||||
_settingIndex = -1;
|
||||
if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
|
||||
_settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
|
||||
};
|
||||
|
||||
if (count _filteredCollection > 0) then {
|
||||
_settingIndex = (lbCurSel _ctrlList);
|
||||
if (_settingIndex > (count _filteredCollection)) then {
|
||||
_settingIndex = count _filteredCollection - 1;
|
||||
};
|
||||
|
||||
if (_settingIndex < 0) then {
|
||||
_settingIndex = 0;
|
||||
};
|
||||
_setting = _filteredCollection select _settingIndex;
|
||||
if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then {
|
||||
_setting = _collection select _settingIndex;
|
||||
|
||||
_entryName = _setting select 0;
|
||||
_localizedName = _setting select 3;
|
||||
|
@ -16,26 +16,26 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"];
|
||||
private ["_settingName", "_added", "_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"];
|
||||
DEFAULT_PARAM(0,_updateKeyView,true);
|
||||
|
||||
disableSerialization;
|
||||
_settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu';
|
||||
_ctrlList = _settingsMenu displayCtrl 200;
|
||||
|
||||
lbclear _ctrlList;
|
||||
lnbClear _ctrlList;
|
||||
|
||||
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection);
|
||||
|
||||
|
||||
_added = 0;
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_SERVER_OPTIONS): {
|
||||
{
|
||||
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then {
|
||||
if ((_x select 3) != "") then {
|
||||
_ctrlList lbadd (_x select 3);
|
||||
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
|
||||
_settingName = if ((_x select 3) != "") then {
|
||||
(_x select 3);
|
||||
} else {
|
||||
_ctrlList lbadd (_x select 0);
|
||||
(_x select 0);
|
||||
};
|
||||
|
||||
_settingsValue = _x select 9;
|
||||
@ -47,41 +47,45 @@ switch (GVAR(optionMenu_openTab)) do {
|
||||
(_x select 5) select _settingsValue;
|
||||
};
|
||||
|
||||
_ctrlList lbadd (_settingsText);
|
||||
_added = _ctrlList lnbAddRow [_settingName, _settingsText];
|
||||
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
|
||||
};
|
||||
}foreach GVAR(serverSideOptions);
|
||||
};
|
||||
case (MENU_TAB_SERVER_COLORS): {
|
||||
{
|
||||
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then {
|
||||
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
|
||||
_color = +(_x select 9);
|
||||
{
|
||||
_color set [_forEachIndex, ((round (_x * 100))/100)];
|
||||
} forEach _color;
|
||||
_settingsColor = str _color;
|
||||
if ((_x select 3) != "") then {
|
||||
_ctrlList lbadd (_x select 3);
|
||||
_settingName = if ((_x select 3) != "") then {
|
||||
(_x select 3);
|
||||
} else {
|
||||
_ctrlList lbadd (_x select 0);
|
||||
(_x select 0);
|
||||
};
|
||||
_ctrlList lbadd (_settingsColor);
|
||||
|
||||
_added = _ctrlList lnbAddRow [_settingName, _settingsColor];
|
||||
_ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 9)];
|
||||
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
|
||||
};
|
||||
}foreach GVAR(serverSideColors);
|
||||
};
|
||||
case (MENU_TAB_SERVER_VALUES): {
|
||||
{
|
||||
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then {
|
||||
if ((_x select 3) != "") then {
|
||||
_ctrlList lbadd (_x select 3);
|
||||
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
|
||||
_settingName = if ((_x select 3) != "") then {
|
||||
(_x select 3);
|
||||
} else {
|
||||
_ctrlList lbadd (_x select 0);
|
||||
(_x select 0);
|
||||
};
|
||||
_settingsValue = _x select 9;
|
||||
if (typeName _settingsValue != "STRINg") then {
|
||||
if (typeName _settingsValue != "STRING") then {
|
||||
_settingsValue = format["%1", _settingsValue];
|
||||
};
|
||||
_ctrlList lbadd (_settingsValue);
|
||||
_added = _ctrlList lnbAddRow [_settingName, _settingsValue];
|
||||
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
|
||||
};
|
||||
}foreach GVAR(serverSideValues);
|
||||
};
|
||||
|
@ -28,24 +28,13 @@ _collection = switch (GVAR(optionMenu_openTab)) do {
|
||||
default {[]};
|
||||
};
|
||||
|
||||
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection);
|
||||
_filteredCollection = [];
|
||||
{
|
||||
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
|
||||
_filteredCollection pushBack _x;
|
||||
};
|
||||
} forEach _collection;
|
||||
_settingIndex = -1;
|
||||
if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
|
||||
_settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
|
||||
};
|
||||
|
||||
if (count _filteredCollection > 0) then {
|
||||
_settingIndex = (lbCurSel _ctrlList);
|
||||
if (_settingIndex > (count _filteredCollection)) then {
|
||||
_settingIndex = count _filteredCollection - 1;
|
||||
};
|
||||
|
||||
if (_settingIndex < 0) then {
|
||||
_settingIndex = 0;
|
||||
};
|
||||
_setting = _filteredCollection select _settingIndex;
|
||||
if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then {
|
||||
_setting = _collection select _settingIndex;
|
||||
|
||||
_entryName = _setting select 0;
|
||||
_localizedName = _setting select 3;
|
||||
|
@ -16,22 +16,22 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"];
|
||||
private ["_settingName", "_added", "_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView", "_settingsValue", "_selectedCategory"];
|
||||
DEFAULT_PARAM(0,_updateKeyView,true);
|
||||
|
||||
disableSerialization;
|
||||
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
|
||||
_ctrlList = _settingsMenu displayCtrl 200;
|
||||
|
||||
lbclear _ctrlList;
|
||||
lnbClear _ctrlList;
|
||||
|
||||
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection);
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
{
|
||||
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then {
|
||||
_ctrlList lbadd (_x select 3);
|
||||
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
|
||||
_settingName = (_x select 3);
|
||||
_settingsValue = _x select 9;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
@ -40,21 +40,24 @@ switch (GVAR(optionMenu_openTab)) do {
|
||||
} else {
|
||||
(_x select 5) select _settingsValue;
|
||||
};
|
||||
_ctrlList lbadd (_settingsText);
|
||||
_added = _ctrlList lnbAddRow [_settingName, _settingsText];
|
||||
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
|
||||
};
|
||||
}foreach GVAR(clientSideOptions);
|
||||
} foreach GVAR(clientSideOptions);
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
{
|
||||
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then {
|
||||
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
|
||||
_color = +(_x select 9);
|
||||
{
|
||||
_color set [_forEachIndex, ((round (_x * 100))/100)];
|
||||
} forEach _color;
|
||||
_settingsColor = str _color;
|
||||
_ctrlList lbadd (_x select 3);
|
||||
_ctrlList lbadd (_settingsColor);
|
||||
_settingName = (_x select 3);
|
||||
|
||||
_added = _ctrlList lnbAddRow [_settingName, _settingsColor];
|
||||
_ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 9)];
|
||||
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
|
||||
};
|
||||
}foreach GVAR(clientSideColors);
|
||||
};
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private ["_str", "_array", "_maxIndex"];
|
||||
private ["_str", "_array", "_maxIndex", "_isEven"];
|
||||
_str = _this;
|
||||
|
||||
_isEven = {
|
||||
|
@ -256,7 +256,7 @@ class ACE_settingsMenu {
|
||||
idc = 1102;
|
||||
text = CSTRING(OpenExport);
|
||||
x = X_PART(18);
|
||||
action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {createDialog 'ACE_serverSettingsMenu'; });
|
||||
action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {closeDialog 0; createDialog 'ACE_serverSettingsMenu';});
|
||||
};
|
||||
class action_debug: actionClose {
|
||||
idc = 1102;
|
||||
|
Loading…
Reference in New Issue
Block a user