Merge pull request #2106 from acemod/optionMenuFiltering

Option Menu Fixes for categories
This commit is contained in:
PabstMirror 2015-08-14 19:31:17 -05:00
commit 13abee2612
19 changed files with 141 additions and 136 deletions

View File

@ -20,6 +20,7 @@ _parseConfigForDisplayNames = {
if !(isClass _optionEntry) exitwith {false}; if !(isClass _optionEntry) exitwith {false};
_x set [3, getText (_optionEntry >> "displayName")]; _x set [3, getText (_optionEntry >> "displayName")];
_x set [4, getText (_optionEntry >> "description")]; _x set [4, getText (_optionEntry >> "description")];
_x set [8, getText (_optionEntry >> "category")];
private "_values"; private "_values";
_values = _x select 5; _values = _x select 5;

View File

@ -3,14 +3,14 @@ class ACE_Settings {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(AlwaysUseCursorSelfInteraction); displayName = CSTRING(AlwaysUseCursorSelfInteraction);
}; };
class GVAR(cursorKeepCentered) { class GVAR(cursorKeepCentered) {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(cursorKeepCentered); displayName = CSTRING(cursorKeepCentered);
description = CSTRING(cursorKeepCenteredDescription); description = CSTRING(cursorKeepCenteredDescription);
}; };
@ -18,49 +18,49 @@ class ACE_Settings {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(AlwaysUseCursorInteraction); displayName = CSTRING(AlwaysUseCursorInteraction);
}; };
class GVAR(UseListMenu) { class GVAR(UseListMenu) {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(UseListMenu); displayName = CSTRING(UseListMenu);
}; };
class GVAR(colorTextMax) { class GVAR(colorTextMax) {
value[] = {1, 1, 1, 1}; value[] = {1, 1, 1, 1};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorTextMax); displayName = CSTRING(ColorTextMax);
}; };
class GVAR(colorTextMin) { class GVAR(colorTextMin) {
value[] = {1, 1, 1, 0.25}; value[] = {1, 1, 1, 0.25};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorTextMin); displayName = CSTRING(ColorTextMin);
}; };
class GVAR(colorShadowMax) { class GVAR(colorShadowMax) {
value[] = {0, 0, 0, 1}; value[] = {0, 0, 0, 1};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorShadowMax); displayName = CSTRING(ColorShadowMax);
}; };
class GVAR(colorShadowMin) { class GVAR(colorShadowMin) {
value[] = {0, 0, 0, 0.25}; value[] = {0, 0, 0, 0.25};
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(ColorShadowMin); displayName = CSTRING(ColorShadowMin);
}; };
class GVAR(textSize) { class GVAR(textSize) {
value = 2; value = 2;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(textSize); displayName = CSTRING(textSize);
values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"};
}; };
@ -68,7 +68,7 @@ class ACE_Settings {
value = 2; value = 2;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(shadowSetting); displayName = CSTRING(shadowSetting);
description = CSTRING(shadowSettingDescription); description = CSTRING(shadowSettingDescription);
values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)}; values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)};
@ -77,14 +77,14 @@ class ACE_Settings {
value = 1; value = 1;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(ActionOnKeyRelease); displayName = CSTRING(ActionOnKeyRelease);
}; };
class GVAR(menuBackground) { class GVAR(menuBackground) {
value = 0; value = 0;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(background); displayName = CSTRING(background);
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)}; values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(backgroundBlur), CSTRING(backgroundBlack)};
}; };
@ -92,7 +92,7 @@ class ACE_Settings {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
category = LSTRING(Category_InteractionMenu); category = CSTRING(Category_InteractionMenu);
displayName = CSTRING(addBuildingActions); displayName = CSTRING(addBuildingActions);
description = CSTRING(addBuildingActionsDescription); description = CSTRING(addBuildingActionsDescription);
}; };

View File

@ -1,116 +1,116 @@
class ACE_Settings { class ACE_Settings {
class GVAR(level) { class GVAR(level) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
value = 1; value = 1;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Disabled", "Basic", "Advanced"}; values[] = {"Disabled", "Basic", "Advanced"};
}; };
class GVAR(medicSetting) { class GVAR(medicSetting) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
value = 1; value = 1;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Disabled", "Normal", "Advanced"}; values[] = {"Disabled", "Normal", "Advanced"};
}; };
class GVAR(enableFor) { class GVAR(enableFor) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
value = 0; value = 0;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Players only", "Players and AI"}; values[] = {"Players only", "Players and AI"};
}; };
class GVAR(enableOverdosing) { class GVAR(enableOverdosing) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(bleedingCoefficient) { class GVAR(bleedingCoefficient) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(painCoefficient) { class GVAR(painCoefficient) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(enableAirway) { class GVAR(enableAirway) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = false; value = false;
}; };
class GVAR(enableFractures) { class GVAR(enableFractures) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = false; value = false;
}; };
class GVAR(enableAdvancedWounds) { class GVAR(enableAdvancedWounds) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = false; value = false;
}; };
class GVAR(enableVehicleCrashes) { class GVAR(enableVehicleCrashes) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(enableScreams) { class GVAR(enableScreams) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(playerDamageThreshold) { class GVAR(playerDamageThreshold) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(AIDamageThreshold) { class GVAR(AIDamageThreshold) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
}; };
class GVAR(enableUnconsciousnessAI) { class GVAR(enableUnconsciousnessAI) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
value = 1; value = 1;
typeName = "SCALAR"; typeName = "SCALAR";
values[] = {"Disabled", "50/50", "Enabled"}; values[] = {"Disabled", "50/50", "Enabled"};
}; };
class GVAR(remoteControlledAI) { class GVAR(remoteControlledAI) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(preventInstaDeath) { class GVAR(preventInstaDeath) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(enableRevive) { class GVAR(enableRevive) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
values[] = {"Disabled", "Players only", "Players and AI"}; values[] = {"Disabled", "Players only", "Players and AI"};
}; };
class GVAR(maxReviveTime) { class GVAR(maxReviveTime) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 120; value = 120;
}; };
class GVAR(amountOfReviveLives) { class GVAR(amountOfReviveLives) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = -1; value = -1;
}; };
class GVAR(allowDeadBodyMovement) { class GVAR(allowDeadBodyMovement) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(allowLitterCreation) { class GVAR(allowLitterCreation) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(litterSimulationDetail) { class GVAR(litterSimulationDetail) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
displayName = CSTRING(litterSimulationDetail); displayName = CSTRING(litterSimulationDetail);
description = CSTRING(litterSimulationDetail_Desc); description = CSTRING(litterSimulationDetail_Desc);
typeName = "SCALAR"; typeName = "SCALAR";
@ -122,48 +122,48 @@ class ACE_Settings {
isClientSettable = 1; isClientSettable = 1;
}; };
class GVAR(litterCleanUpDelay) { class GVAR(litterCleanUpDelay) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
}; };
class GVAR(medicSetting_PAK) { class GVAR(medicSetting_PAK) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"}; values[] = {"Anyone", "Medics only", "Doctors only"};
}; };
class GVAR(medicSetting_SurgicalKit) { class GVAR(medicSetting_SurgicalKit) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 1; value = 1;
values[] = {"Anyone", "Medics only", "Doctors only"}; values[] = {"Anyone", "Medics only", "Doctors only"};
}; };
class GVAR(consumeItem_PAK) { class GVAR(consumeItem_PAK) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
values[] = {"No", "Yes"}; values[] = {"No", "Yes"};
}; };
class GVAR(consumeItem_SurgicalKit) { class GVAR(consumeItem_SurgicalKit) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
values[] = {"No", "Yes"}; values[] = {"No", "Yes"};
}; };
class GVAR(useLocation_PAK) { class GVAR(useLocation_PAK) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 3; value = 3;
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
}; };
class GVAR(useLocation_SurgicalKit) { class GVAR(useLocation_SurgicalKit) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "SCALAR"; typeName = "SCALAR";
value = 2; value = 2;
values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"}; values[] = {"Anywhere", "Medical vehicles", "Medical facility", "vehicle & facility", "Disabled"};
}; };
class GVAR(useCondition_PAK) { class GVAR(useCondition_PAK) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName); displayName = CSTRING(AdvancedMedicalSettings_useCondition_PAK_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description); description = CSTRING(AdvancedMedicalSettings_useCondition_PAK_Description);
typeName = "SCALAR"; typeName = "SCALAR";
@ -171,7 +171,7 @@ class ACE_Settings {
values[] = {"Anytime", "Stable"}; values[] = {"Anytime", "Stable"};
}; };
class GVAR(useCondition_SurgicalKit) { class GVAR(useCondition_SurgicalKit) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName); displayName = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_DisplayName);
description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description); description = CSTRING(AdvancedMedicalSettings_useCondition_SurgicalKit_Description);
typeName = "SCALAR"; typeName = "SCALAR";
@ -179,24 +179,24 @@ class ACE_Settings {
values[] = {"Anytime", "Stable"}; values[] = {"Anytime", "Stable"};
}; };
class GVAR(keepLocalSettingsSynced) { class GVAR(keepLocalSettingsSynced) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(healHitPointAfterAdvBandage) { class GVAR(healHitPointAfterAdvBandage) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
displayName = CSTRING(healHitPointAfterAdvBandage); displayName = CSTRING(healHitPointAfterAdvBandage);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(painIsOnlySuppressed) { class GVAR(painIsOnlySuppressed) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
displayName = CSTRING(painIsOnlySuppressed); displayName = CSTRING(painIsOnlySuppressed);
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
}; };
class GVAR(painEffectType) { class GVAR(painEffectType) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
displayName = CSTRING(painEffectType); displayName = CSTRING(painEffectType);
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
@ -204,18 +204,18 @@ class ACE_Settings {
isClientSettable = 1; isClientSettable = 1;
}; };
class GVAR(allowUnconsciousAnimationOnTreatment) { class GVAR(allowUnconsciousAnimationOnTreatment) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(moveUnitsFromGroupOnUnconscious) { class GVAR(moveUnitsFromGroupOnUnconscious) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
typeName = "BOOL"; typeName = "BOOL";
value = 0; value = 0;
}; };
class GVAR(menuTypeStyle) { class GVAR(menuTypeStyle) {
category = LSTRING(Category_Medical); category = CSTRING(Category_Medical);
displayName = CSTRING(menuTypeDisplay); displayName = CSTRING(menuTypeDisplay);
description = CSTRING(menuTypeDescription); description = CSTRING(menuTypeDescription);
typeName = "SCALAR"; typeName = "SCALAR";

View File

@ -4,6 +4,7 @@ class ACE_Settings {
typeName = "COLOR"; typeName = "COLOR";
isClientSettable = 1; isClientSettable = 1;
displayName = CSTRING(DefaultNametagColor); displayName = CSTRING(DefaultNametagColor);
category = CSTRING(Module_DisplayName);
}; };
class GVAR(showPlayerNames) { class GVAR(showPlayerNames) {
value = 1; value = 1;
@ -12,29 +13,34 @@ class ACE_Settings {
displayName = CSTRING(ShowPlayerNames); displayName = CSTRING(ShowPlayerNames);
description = CSTRING(ShowPlayerNames_Desc); description = CSTRING(ShowPlayerNames_Desc);
values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress)}; values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress)};
category = CSTRING(Module_DisplayName);
}; };
class GVAR(showPlayerRanks) { class GVAR(showPlayerRanks) {
value = 1; value = 1;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
displayName = CSTRING(ShowPlayerRanks); displayName = CSTRING(ShowPlayerRanks);
category = CSTRING(Module_DisplayName);
}; };
class GVAR(showVehicleCrewInfo) { class GVAR(showVehicleCrewInfo) {
value = 1; value = 1;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
displayName = CSTRING(ShowVehicleCrewInfo); displayName = CSTRING(ShowVehicleCrewInfo);
category = CSTRING(Module_DisplayName);
}; };
class GVAR(showNamesForAI) { class GVAR(showNamesForAI) {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 1; isClientSettable = 1;
displayName = CSTRING(ShowNamesForAI); displayName = CSTRING(ShowNamesForAI);
category = CSTRING(Module_DisplayName);
}; };
class GVAR(showCursorTagForVehicles) { class GVAR(showCursorTagForVehicles) {
value = 0; value = 0;
typeName = "BOOL"; typeName = "BOOL";
isClientSettable = 0; isClientSettable = 0;
category = CSTRING(Module_DisplayName);
}; };
class GVAR(showSoundWaves) { class GVAR(showSoundWaves) {
value = 1; value = 1;
@ -43,16 +49,19 @@ class ACE_Settings {
displayName = CSTRING(ShowSoundWaves); displayName = CSTRING(ShowSoundWaves);
description = CSTRING(ShowSoundWaves_Desc); description = CSTRING(ShowSoundWaves_Desc);
values[] = {ECSTRING(common,Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)}; values[] = {ECSTRING(common,Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)};
category = CSTRING(Module_DisplayName);
}; };
class GVAR(playerNamesViewDistance) { class GVAR(playerNamesViewDistance) {
value = 5; value = 5;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 0; isClientSettable = 0;
category = CSTRING(Module_DisplayName);
}; };
class GVAR(playerNamesMaxAlpha) { class GVAR(playerNamesMaxAlpha) {
value = 0.8; value = 0.8;
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 0; isClientSettable = 0;
category = CSTRING(Module_DisplayName);
}; };
class GVAR(tagSize) { class GVAR(tagSize) {
value = 2; value = 2;
@ -61,5 +70,6 @@ class ACE_Settings {
displayName = CSTRING(TagSize_Name); displayName = CSTRING(TagSize_Name);
description = CSTRING(TagSize_Description); description = CSTRING(TagSize_Description);
values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"};
category = CSTRING(Module_DisplayName);
}; };
}; };

View File

@ -16,7 +16,7 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_settingsMenu"]; private ["_settingsMenu", "_ctrlComboBox"];
disableSerialization; disableSerialization;
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
@ -24,4 +24,4 @@ _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
_ctrlComboBox = (_settingsMenu displayCtrl 14); _ctrlComboBox = (_settingsMenu displayCtrl 14);
GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox;
[false] call FUNC(settingsMenuUpdateList); [true] call FUNC(settingsMenuUpdateList);

View File

@ -18,24 +18,28 @@
private ["_settingIndex", "_rightDropDownIndex"]; private ["_settingIndex", "_rightDropDownIndex"];
_settingIndex = lbCurSel 200; //Index of left list
_rightDropDownIndex = lbCurSel 400; //Index of right drop down _rightDropDownIndex = lbCurSel 400; //Index of right drop down
if (_rightDropDownIndex < 0) then {_rightDropDownIndex = 0;}; 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 { 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);
}; };
}; };

View File

@ -23,4 +23,4 @@ _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu';
_ctrlComboBox = (_settingsMenu displayCtrl 14); _ctrlComboBox = (_settingsMenu displayCtrl 14);
GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox;
[false] call FUNC(serverSettingsMenuUpdateList); [true] call FUNC(serverSettingsMenuUpdateList);

View File

@ -18,9 +18,13 @@
private ["_settingIndex", "_inputText", "_setting", "_settingName", "_convertedValue"]; private ["_settingIndex", "_inputText", "_setting", "_settingName", "_convertedValue"];
_settingIndex = lbCurSel 200; //Index of left list
_inputText = ctrlText 414; //Index of right drop down _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 { 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 {

View File

@ -72,7 +72,6 @@ lbClear (_menu displayCtrl 14);
if (_x == "") then { if (_x == "") then {
_x = localize (LSTRING(category_all)); _x = localize (LSTRING(category_all));
}; };
if (isLocalized _x) then {_x = localize _x};
(_menu displayCtrl 14) lbAdd _x; (_menu displayCtrl 14) lbAdd _x;
} forEach GVAR(categories); } forEach GVAR(categories);

View File

@ -56,9 +56,8 @@ if (GVAR(serverConfigGeneration) == 0) then {
lbClear (_menu displayCtrl 14); lbClear (_menu displayCtrl 14);
{ {
if (_x == "") then { 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; (_menu displayCtrl 14) lbAdd _x;
} forEach GVAR(categories); } forEach GVAR(categories);

View File

@ -18,7 +18,11 @@
private ["_newColor", "_settingIndex"]; 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 { switch (GVAR(optionMenu_openTab)) do {
case (MENU_TAB_COLORS): { case (MENU_TAB_COLORS): {

View File

@ -30,8 +30,8 @@ private ["_name", "_default", "_lastSelected"];
[MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting); [MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting);
} forEach GVAR(clientSideColors); } forEach GVAR(clientSideColors);
_lastSelected = lbCurSel 200; _lastSelected = lnbCurSelRow 200;
[GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged); [GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged);
if (_lastSelected != -1) then { if (_lastSelected != -1) then {
lbSetCurSel [200, _lastSelected]; lnbSetCurSelRow [200, _lastSelected];
}; };

View File

@ -36,7 +36,7 @@ private ["_name", "_default", "_lastSelected"];
[MENU_TAB_SERVER_VALUES, _name, _default] call FUNC(updateSetting); [MENU_TAB_SERVER_VALUES, _name, _default] call FUNC(updateSetting);
} forEach GVAR(serverSideVakyes); } forEach GVAR(serverSideVakyes);
_lastSelected = lbCurSel 200; _lastSelected = lnbCurSelRow 200;
[GVAR(optionMenu_openTab)] call FUNC(onserverListBoxShowSelectionChanged); [GVAR(optionMenu_openTab)] call FUNC(onserverListBoxShowSelectionChanged);
if (_lastSelected != -1) then { if (_lastSelected != -1) then {
lbSetCurSel [200, _lastSelected]; lbSetCurSel [200, _lastSelected];

View File

@ -16,11 +16,10 @@
#include "script_component.hpp" #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; disableSerialization;
_settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu';
_ctrlList = _settingsMenu displayCtrl 200;
_collection = switch (GVAR(optionMenu_openTab)) do { _collection = switch (GVAR(optionMenu_openTab)) do {
case MENU_TAB_SERVER_OPTIONS: {GVAR(serverSideOptions)}; case MENU_TAB_SERVER_OPTIONS: {GVAR(serverSideOptions)};
@ -29,24 +28,13 @@ _collection = switch (GVAR(optionMenu_openTab)) do {
default {[]}; default {[]};
}; };
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); _settingIndex = -1;
_filteredCollection = []; if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
{ _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { };
_filteredCollection pushBack _x;
};
} forEach _collection;
if (count _filteredCollection > 0) then { if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then {
_settingIndex = (lbCurSel _ctrlList); _setting = _collection select _settingIndex;
if (_settingIndex > (count _filteredCollection)) then {
_settingIndex = count _filteredCollection - 1;
};
if (_settingIndex < 0) then {
_settingIndex = 0;
};
_setting = _filteredCollection select _settingIndex;
_entryName = _setting select 0; _entryName = _setting select 0;
_localizedName = _setting select 3; _localizedName = _setting select 3;

View File

@ -16,26 +16,26 @@
#include "script_component.hpp" #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); DEFAULT_PARAM(0,_updateKeyView,true);
disableSerialization; disableSerialization;
_settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu';
_ctrlList = _settingsMenu displayCtrl 200; _ctrlList = _settingsMenu displayCtrl 200;
lbclear _ctrlList; lnbClear _ctrlList;
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); _selectedCategory = GVAR(categories) select GVAR(currentCategorySelection);
_added = 0;
switch (GVAR(optionMenu_openTab)) do { switch (GVAR(optionMenu_openTab)) do {
case (MENU_TAB_SERVER_OPTIONS): { case (MENU_TAB_SERVER_OPTIONS): {
{ {
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
if ((_x select 3) != "") then { _settingName = if ((_x select 3) != "") then {
_ctrlList lbadd (_x select 3); (_x select 3);
} else { } else {
_ctrlList lbadd (_x select 0); (_x select 0);
}; };
_settingsValue = _x select 9; _settingsValue = _x select 9;
@ -47,41 +47,45 @@ switch (GVAR(optionMenu_openTab)) do {
(_x select 5) select _settingsValue; (_x select 5) select _settingsValue;
}; };
_ctrlList lbadd (_settingsText); _added = _ctrlList lnbAddRow [_settingName, _settingsText];
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
}; };
}foreach GVAR(serverSideOptions); }foreach GVAR(serverSideOptions);
}; };
case (MENU_TAB_SERVER_COLORS): { case (MENU_TAB_SERVER_COLORS): {
{ {
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
_color = +(_x select 9); _color = +(_x select 9);
{ {
_color set [_forEachIndex, ((round (_x * 100))/100)]; _color set [_forEachIndex, ((round (_x * 100))/100)];
} forEach _color; } forEach _color;
_settingsColor = str _color; _settingsColor = str _color;
if ((_x select 3) != "") then { _settingName = if ((_x select 3) != "") then {
_ctrlList lbadd (_x select 3); (_x select 3);
} else { } 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 lnbSetColor [[_forEachIndex, 1], (_x select 9)];
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
}; };
}foreach GVAR(serverSideColors); }foreach GVAR(serverSideColors);
}; };
case (MENU_TAB_SERVER_VALUES): { case (MENU_TAB_SERVER_VALUES): {
{ {
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
if ((_x select 3) != "") then { _settingName = if ((_x select 3) != "") then {
_ctrlList lbadd (_x select 3); (_x select 3);
} else { } else {
_ctrlList lbadd (_x select 0); (_x select 0);
}; };
_settingsValue = _x select 9; _settingsValue = _x select 9;
if (typeName _settingsValue != "STRINg") then { if (typeName _settingsValue != "STRING") then {
_settingsValue = format["%1", _settingsValue]; _settingsValue = format["%1", _settingsValue];
}; };
_ctrlList lbadd (_settingsValue); _added = _ctrlList lnbAddRow [_settingName, _settingsValue];
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
}; };
}foreach GVAR(serverSideValues); }foreach GVAR(serverSideValues);
}; };

View File

@ -28,24 +28,13 @@ _collection = switch (GVAR(optionMenu_openTab)) do {
default {[]}; default {[]};
}; };
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); _settingIndex = -1;
_filteredCollection = []; if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then {
{ _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]];
if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { };
_filteredCollection pushBack _x;
};
} forEach _collection;
if (count _filteredCollection > 0) then { if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then {
_settingIndex = (lbCurSel _ctrlList); _setting = _collection select _settingIndex;
if (_settingIndex > (count _filteredCollection)) then {
_settingIndex = count _filteredCollection - 1;
};
if (_settingIndex < 0) then {
_settingIndex = 0;
};
_setting = _filteredCollection select _settingIndex;
_entryName = _setting select 0; _entryName = _setting select 0;
_localizedName = _setting select 3; _localizedName = _setting select 3;

View File

@ -16,22 +16,22 @@
#include "script_component.hpp" #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); DEFAULT_PARAM(0,_updateKeyView,true);
disableSerialization; disableSerialization;
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
_ctrlList = _settingsMenu displayCtrl 200; _ctrlList = _settingsMenu displayCtrl 200;
lbclear _ctrlList; lnbClear _ctrlList;
_selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); _selectedCategory = GVAR(categories) select GVAR(currentCategorySelection);
switch (GVAR(optionMenu_openTab)) do { switch (GVAR(optionMenu_openTab)) do {
case (MENU_TAB_OPTIONS): { case (MENU_TAB_OPTIONS): {
{ {
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
_ctrlList lbadd (_x select 3); _settingName = (_x select 3);
_settingsValue = _x select 9; _settingsValue = _x select 9;
// Created disable/enable options for bools // Created disable/enable options for bools
@ -40,21 +40,24 @@ switch (GVAR(optionMenu_openTab)) do {
} else { } else {
(_x select 5) select _settingsValue; (_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): { case (MENU_TAB_COLORS): {
{ {
if (_selectedCategory == "" || _selectedCategory == (_X select 8)) then { if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then {
_color = +(_x select 9); _color = +(_x select 9);
{ {
_color set [_forEachIndex, ((round (_x * 100))/100)]; _color set [_forEachIndex, ((round (_x * 100))/100)];
} forEach _color; } forEach _color;
_settingsColor = str _color; _settingsColor = str _color;
_ctrlList lbadd (_x select 3); _settingName = (_x select 3);
_ctrlList lbadd (_settingsColor);
_added = _ctrlList lnbAddRow [_settingName, _settingsColor];
_ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 9)]; _ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 9)];
_ctrlList lnbSetValue [[_added, 0], _forEachIndex];
}; };
}foreach GVAR(clientSideColors); }foreach GVAR(clientSideColors);
}; };

View File

@ -14,7 +14,7 @@
* Public: No * Public: No
*/ */
private ["_str", "_array", "_maxIndex"]; private ["_str", "_array", "_maxIndex", "_isEven"];
_str = _this; _str = _this;
_isEven = { _isEven = {

View File

@ -256,7 +256,7 @@ class ACE_settingsMenu {
idc = 1102; idc = 1102;
text = CSTRING(OpenExport); text = CSTRING(OpenExport);
x = X_PART(18); 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 { class action_debug: actionClose {
idc = 1102; idc = 1102;