From eedb9fe61488c06d36bad18d1808d5158a7acc9d Mon Sep 17 00:00:00 2001 From: commy2 Date: Fri, 9 Feb 2018 21:28:34 +0100 Subject: [PATCH] weaponSelect CBA Setting (#5581) * weaponSelectCBASetting * Update to movedToSQF * Add category --- addons/weaponselect/ACE_Settings.hpp | 6 +----- addons/weaponselect/XEH_preInit.sqf | 2 ++ addons/weaponselect/initSettings.sqf | 8 ++++++++ 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 addons/weaponselect/initSettings.sqf diff --git a/addons/weaponselect/ACE_Settings.hpp b/addons/weaponselect/ACE_Settings.hpp index 5b58659f6e..ba3ccca74f 100644 --- a/addons/weaponselect/ACE_Settings.hpp +++ b/addons/weaponselect/ACE_Settings.hpp @@ -1,10 +1,6 @@ class ACE_Settings { class GVAR(displayText) { - typeName = "BOOL"; - isClientSettable = 1; - value = 1; - displayName = CSTRING(SettingDisplayTextName); - description = CSTRING(SettingDisplayTextDesc); + movedToSQF = 1; }; }; diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf index 0335ee5fda..01c9f2484f 100644 --- a/addons/weaponselect/XEH_preInit.sqf +++ b/addons/weaponselect/XEH_preInit.sqf @@ -26,4 +26,6 @@ GVAR(GrenadesNonFrag) = []; false } count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/weaponselect/initSettings.sqf b/addons/weaponselect/initSettings.sqf new file mode 100644 index 0000000000..d4fc725783 --- /dev/null +++ b/addons/weaponselect/initSettings.sqf @@ -0,0 +1,8 @@ +// CBA Settings [ADDON: ace_weaponselect]: + +[QGVAR(displayText), "CHECKBOX", +[LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)], +localize ELSTRING(common,ACEKeybindCategoryWeapons), +true, // default value +false, // isGlobal +{[QGVAR(displayText), _this] call EFUNC(common,cbaSettings_settingChanged)}] call CBA_settings_fnc_init;