diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index c368490e8d..8d829092e9 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -10,7 +10,7 @@ // MINIMAL required version for the Mod. Components can specify others.. #define REQUIRED_VERSION 1.88 -#define REQUIRED_CBA_VERSION {3,11,1} +#define REQUIRED_CBA_VERSION {3,11,2} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/vector/CfgOpticsEffect.hpp b/addons/vector/CfgOpticsEffect.hpp new file mode 100644 index 0000000000..2b9542ba9c --- /dev/null +++ b/addons/vector/CfgOpticsEffect.hpp @@ -0,0 +1,7 @@ +class CfgOpticsEffect { + class GVAR(OpticsRadBlur1) { + type = "radialblur"; + params[] = {0.01,0.01,0.18,0.36}; + priority = 950; + }; +}; diff --git a/addons/vector/CfgVehicles.hpp b/addons/vector/CfgVehicles.hpp index 23aa8d7412..3854ea675a 100644 --- a/addons/vector/CfgVehicles.hpp +++ b/addons/vector/CfgVehicles.hpp @@ -5,16 +5,36 @@ class CfgVehicles { scope = 2; scopeCurator = 2; displayName = CSTRING(VectorName); + editorCategory = "EdCat_Equipment"; + editorSubcategory = "EdSubcat_InventoryItems"; vehicleClass = "Items"; + model = "\A3\Weapons_F\DummyBinoc.p3d"; + class TransportItems { MACRO_ADDITEM(ACE_Vector,1); }; }; + class ACE_Item_VectorDay: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(VectorDayName); + editorCategory = "EdCat_Equipment"; + editorSubcategory = "EdSubcat_InventoryItems"; + vehicleClass = "Items"; + model = "\A3\Weapons_F\DummyBinoc.p3d"; + + class TransportItems { + MACRO_ADDITEM(ACE_VectorDay,1); + }; + }; + class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { - MACRO_ADDITEM(ACE_Vector,6); + MACRO_ADDITEM(ACE_Vector,3); + MACRO_ADDITEM(ACE_VectorDay,3); }; }; }; diff --git a/addons/vector/CfgWeapons.hpp b/addons/vector/CfgWeapons.hpp index cc2cf985f6..5ffe99eea9 100644 --- a/addons/vector/CfgWeapons.hpp +++ b/addons/vector/CfgWeapons.hpp @@ -1,4 +1,3 @@ - class CfgWeapons { class Binocular; class ACE_Vector: Binocular { @@ -6,13 +5,24 @@ class CfgWeapons { displayName = CSTRING(VectorName); descriptionShort = CSTRING(VectorDescription); model = QPATHTOF(ace_vector.p3d); - modelOptics = QPATHTOF(ace_vector_optics.p3d); picture = QPATHTOF(UI\ace_vector_x_ca.paa); visionMode[] = {"Normal","NVG"}; - opticsZoomMax = 0.06621; - opticsZoomMin = 0.06621; + opticsZoomMax = 0.25/7; + opticsZoomMin = 0.25/7; + modelOptics = "\A3\Weapons_F\empty.p3d"; + + class CBA_ScriptedOptic { + reticleTexture = QPATHTOF(data\reticles\ace_vector_reticle_ca.paa); + reticleTextureSize = 1.026; + bodyTexture = QPATHTOF(data\reticles\ace_vector_body_co.paa); + bodyTextureSize = 1.25; + reticleSafezoneSize = 1; + hidePeripheralVision = 1; + opticsPPEffects[] = {QGVAR(OpticsRadBlur1)}; + }; weaponInfoType = "ACE_RscOptics_vector"; }; + class ACE_VectorDay: ACE_Vector { author = ECSTRING(common,ACETeam); displayName = CSTRING(VectorDayName); diff --git a/addons/vector/RscInGameUI.hpp b/addons/vector/RscInGameUI.hpp index 704dd4838c..7e2f705765 100644 --- a/addons/vector/RscInGameUI.hpp +++ b/addons/vector/RscInGameUI.hpp @@ -1,163 +1,138 @@ - class RscText; class RscPicture; - -//class ScrollBar; -class RscControlsGroup { - class VScrollbar;//: ScrollBar {}; - class HScrollbar;//: ScrollBar {}; -}; +class RscControlsGroupNoScrollbars; class RscInGameUI { - class RscUnitInfo; - class ACE_RscOptics_vector: RscUnitInfo { - onLoad = "[""onLoad"",_this,""RscUnitInfo"",'IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable ['ACE_dlgVector', _this select 0];"; - onUnload = "[""onUnload"",_this,""RscUnitInfo"",'IGUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay')"; - idd = 300; - controls[] = {"CA_Distance","CA_Heading","CA_OpticsPitch","CA_Elev","CA_OpticsZoom","CA_VisionMode","ACE_ScriptedDisplayControlsGroup"}; + class RscWeaponZeroing; + class CBA_ScriptedOptic: RscWeaponZeroing { + class CA_Zeroing; + }; + + class ACE_RscOptics_vector: CBA_ScriptedOptic { + controls[] = { + "CA_FOVMode","ScopeBlack","Reticle","BodyNight","BodyDay","TrippleHeadLeft","TrippleHeadRight","CA_Zeroing","Magnification","ActiveDisplayHelper", + "CA_Distance","CA_Heading","CA_OpticsPitch","CA_Elev","CA_OpticsZoom","CA_VisionMode","ACE_ScriptedDisplayControlsGroup" + }; class CA_Distance: RscText { - idc = 151; // distance + idc = 151; // distance w = 0; h = 0; }; - class CA_Heading: RscText { - idc = 156; // azimuth + idc = 156; // azimuth w = 0; h = 0; }; - class CA_OpticsPitch: RscText { - idc = 182; // inclination + idc = 182; // inclination w = 0; h = 0; }; - class CA_Elev: RscText { - idc = 175; // inclination, more accurate + idc = 175; // inclination, more accurate w = 0; h = 0; }; - class CA_OpticsZoom: RscText { - idc = 180; // some kind of zoom + idc = 180; // some kind of zoom w = 0; h = 0; }; - class CA_VisionMode: RscText { - idc = 179; // ??? + idc = 179; // ??? w = 0; h = 0; }; + class CA_Zeroing: CA_Zeroing { + onLoad = "(_this select 0) ctrlShow false"; + }; - class ACE_ScriptedDisplayControlsGroup: RscControlsGroup { + class ACE_ScriptedDisplayControlsGroup: RscControlsGroupNoScrollbars { + onLoad = "uiNamespace setVariable ['ACE_dlgVector', ctrlParent (_this select 0)];"; idc = 170; - x = "SafezoneX"; - y = "SafezoneY"; - w = "SafezoneW"; - h = "SafezoneH"; - - class VScrollbar: VScrollbar { - width = 0; - }; - - class HScrollbar: HScrollbar { - height = 0; - }; + x = "safezoneX"; + y = "safezoneY"; + w = "safezoneW"; + h = "safezoneH"; class controls { class Center: RscPicture { - idc = 1301; - text = ""; + idc = IDC_CENTER; colorText[] = {1,0,0,0.5}; - x = 0.488 * safezoneW /*+ safezoneX*/; - y = 0.4783 * safezoneH /*+ safezoneY*/; - w = 0.4 / 16 * safezoneW; - h = 0.4 / 9 * safezoneH; + x = "0.5 - (0.8 / 16 * safezoneW)/2 - safezoneX"; + y = "0.5 - (0.8 / 9 * safezoneH)/2 - safezoneY"; + w = "0.8 / 16 * safezoneW"; + h = "0.8 / 9 * safezoneH"; }; - class Crosshair: Center { - idc = 1302; - x = 0.4848 * safezoneW /*+ safezoneX*/; - y = 0.4732 * safezoneH /*+ safezoneY*/; - w = 0.5 / 16 * safezoneW; - h = 0.5 / 9 * safezoneH; + idc = IDC_CROSSHAIR; + x = "0.5 - (0.7 / 16 * safezoneW)/2 - safezoneX"; + y = "0.5 - (0.7 / 9 * safezoneH)/2 - safezoneY"; + w = "0.7 / 16 * safezoneW"; + h = "0.7 / 9 * safezoneH"; }; class Digit0: Center { - idc = 1310; - x = (0.54 + 0 * 0.02) * safezoneW /*+ safezoneX*/; - y = 0.54 * safezoneH /*+ safezoneY*/; - w = 0.5 / 16 * safezoneW; - h = 0.5 / 9 * safezoneH; + idc = IDC_DIGIT_0; + x = "(0.54 + 0 * 0.02) * safezoneW"; + y = "0.54 * safezoneH"; + w = "0.5 / 16 * safezoneW"; + h = "0.5 / 9 * safezoneH"; }; - class Digit1: Digit0 { - idc = 1311; - x = (0.54 + 1 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_1; + x = "(0.54 + 1 * 0.02) * safezoneW"; }; - class Digit2: Digit0 { - idc = 1312; - x = (0.54 + 2 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_2; + x = "(0.54 + 2 * 0.02) * safezoneW"; }; - class Digit3: Digit0 { - idc = 1313; - x = (0.54 + 3 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_3; + x = "(0.54 + 3 * 0.02) * safezoneW"; }; - class Digit4: Digit0 { - idc = 1314; - x = (0.54 + 4 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_4; + x = "(0.54 + 4 * 0.02) * safezoneW"; }; - class Digit5: Digit0 { - idc = 1315; - x = (0.35 + 0 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_5; + x = "(0.35 + 0 * 0.02) * safezoneW"; }; - class Digit6: Digit0 { - idc = 1316; - x = (0.35 + 1 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_6; + x = "(0.35 + 1 * 0.02) * safezoneW"; }; - class Digit7: Digit0 { - idc = 1317; - x = (0.35 + 2 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_7; + x = "(0.35 + 2 * 0.02) * safezoneW"; }; - class Digit8: Digit0 { - idc = 1318; - x = (0.35 + 3 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_8; + x = "(0.35 + 3 * 0.02) * safezoneW"; }; - class Digit9: Digit0 { - idc = 1319; - x = (0.35 + 4 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_9; + x = "(0.35 + 4 * 0.02) * safezoneW"; }; class DigitE1: Digit0 { - idc = 1321; - x = (0.39 + 0 * 0.02) * safezoneW /*+ safezoneX*/; - y = 0.42 * safezoneH /*+ safezoneY*/; + idc = IDC_DIGIT_E1; + x = "(0.39 + 0 * 0.02) * safezoneW"; + y = "0.42 * safezoneH"; }; - class DigitE2: DigitE1 { - idc = 1322; - x = (0.39 + 1 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_E2; + x = "(0.39 + 1 * 0.02) * safezoneW"; }; - class DigitE3: DigitE1 { - idc = 1323; - x = (0.39 + 2 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_E3; + x = "(0.39 + 2 * 0.02) * safezoneW"; }; - class DigitE4: DigitE1 { - idc = 1324; - x = (0.39 + 3 * 0.02) * safezoneW /*+ safezoneX*/; + idc = IDC_DIGIT_E4; + x = "(0.39 + 3 * 0.02) * safezoneW"; }; }; }; diff --git a/addons/vector/XEH_PREP.hpp b/addons/vector/XEH_PREP.hpp index f03d99ed83..1f259e3ff9 100644 --- a/addons/vector/XEH_PREP.hpp +++ b/addons/vector/XEH_PREP.hpp @@ -1,4 +1,3 @@ - PREP(clearDisplay); PREP(convertToTexturesDegree); PREP(convertToTexturesDistance); diff --git a/addons/vector/ace_vector_optics.p3d b/addons/vector/ace_vector_optics.p3d deleted file mode 100644 index 15cfb1c910..0000000000 Binary files a/addons/vector/ace_vector_optics.p3d and /dev/null differ diff --git a/addons/vector/config.cpp b/addons/vector/config.cpp index cf6f235a5e..10371047e6 100644 --- a/addons/vector/config.cpp +++ b/addons/vector/config.cpp @@ -3,8 +3,8 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {"ACE_Item_Vector"}; - weapons[] = {"ACE_Vector", "ACE_VectorDay"}; + units[] = {"ACE_Item_Vector","ACE_Item_VectorDay"}; + weapons[] = {"ACE_Vector","ACE_VectorDay"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); @@ -15,8 +15,11 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" - #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" - +#include "CfgOpticsEffect.hpp" #include "RscInGameUI.hpp" + +class CBA_PIPItems { + GVAR(enable) = "-"; +}; diff --git a/addons/vector/data/reticles/ace_vector_body_co.paa b/addons/vector/data/reticles/ace_vector_body_co.paa new file mode 100644 index 0000000000..71e1984c6e Binary files /dev/null and b/addons/vector/data/reticles/ace_vector_body_co.paa differ diff --git a/addons/vector/data/reticles/ace_vector_reticle.paa b/addons/vector/data/reticles/ace_vector_reticle.paa deleted file mode 100644 index 425dbb85b2..0000000000 Binary files a/addons/vector/data/reticles/ace_vector_reticle.paa and /dev/null differ diff --git a/addons/vector/data/reticles/ace_vector_reticle_1_ca.paa b/addons/vector/data/reticles/ace_vector_reticle_1_ca.paa new file mode 100644 index 0000000000..255d8fa338 Binary files /dev/null and b/addons/vector/data/reticles/ace_vector_reticle_1_ca.paa differ diff --git a/addons/vector/data/reticles/ace_vector_reticle_2_ca.paa b/addons/vector/data/reticles/ace_vector_reticle_2_ca.paa new file mode 100644 index 0000000000..98ab3d04ba Binary files /dev/null and b/addons/vector/data/reticles/ace_vector_reticle_2_ca.paa differ diff --git a/addons/vector/data/reticles/ace_vector_reticle_3_ca.paa b/addons/vector/data/reticles/ace_vector_reticle_3_ca.paa new file mode 100644 index 0000000000..85d4e6940d Binary files /dev/null and b/addons/vector/data/reticles/ace_vector_reticle_3_ca.paa differ diff --git a/addons/vector/data/reticles/ace_vector_reticle_4_ca.paa b/addons/vector/data/reticles/ace_vector_reticle_4_ca.paa new file mode 100644 index 0000000000..85a38b4145 Binary files /dev/null and b/addons/vector/data/reticles/ace_vector_reticle_4_ca.paa differ diff --git a/addons/vector/data/reticles/ace_vector_reticle_5_ca.paa b/addons/vector/data/reticles/ace_vector_reticle_5_ca.paa new file mode 100644 index 0000000000..ff4f89edd4 Binary files /dev/null and b/addons/vector/data/reticles/ace_vector_reticle_5_ca.paa differ diff --git a/addons/vector/data/reticles/ace_vector_reticle_ca.paa b/addons/vector/data/reticles/ace_vector_reticle_ca.paa new file mode 100644 index 0000000000..4db7c71ff6 Binary files /dev/null and b/addons/vector/data/reticles/ace_vector_reticle_ca.paa differ diff --git a/addons/vector/functions/fnc_adjustBrightness.sqf b/addons/vector/functions/fnc_adjustBrightness.sqf index 2cf2d5a923..cfe7f119a8 100644 --- a/addons/vector/functions/fnc_adjustBrightness.sqf +++ b/addons/vector/functions/fnc_adjustBrightness.sqf @@ -20,22 +20,22 @@ private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); private _color = [[1,0,0,0.5], [1,0,0,1]] select (_this select 0); -(_dlgVector displayCtrl 1301) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1302) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1310) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1311) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1312) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1313) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1314) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1315) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1316) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1317) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1318) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1319) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1321) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1322) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1323) ctrlSetTextColor _color; -(_dlgVector displayCtrl 1324) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_CENTER) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_CROSSHAIR) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_E1) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_E2) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_E3) ctrlSetTextColor _color; +(_dlgVector displayCtrl IDC_DIGIT_E4) ctrlSetTextColor _color; GVAR(illuminate) = _this select 0; diff --git a/addons/vector/functions/fnc_clearDisplay.sqf b/addons/vector/functions/fnc_clearDisplay.sqf index 8d4578a2da..1f723dd2f8 100644 --- a/addons/vector/functions/fnc_clearDisplay.sqf +++ b/addons/vector/functions/fnc_clearDisplay.sqf @@ -20,18 +20,18 @@ private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); switch (_this select 0) do { case ("azimuth"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText ""; - (_dlgVector displayCtrl 1318) ctrlSetText ""; - (_dlgVector displayCtrl 1319) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText ""; }; case ("distance"): { - (_dlgVector displayCtrl 1310) ctrlSetText ""; - (_dlgVector displayCtrl 1311) ctrlSetText ""; - (_dlgVector displayCtrl 1312) ctrlSetText ""; - (_dlgVector displayCtrl 1313) ctrlSetText ""; - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; }; diff --git a/addons/vector/functions/fnc_getRelativeHeightLength.sqf b/addons/vector/functions/fnc_getRelativeHeightLength.sqf index 2bd6e4795c..1049ba84b6 100644 --- a/addons/vector/functions/fnc_getRelativeHeightLength.sqf +++ b/addons/vector/functions/fnc_getRelativeHeightLength.sqf @@ -15,24 +15,20 @@ * Public: No */ -private _distanceP1 = GVAR(pData) select 0; -private _directionP1 = GVAR(pData) select 1; -private _azimuthP1 = _directionP1 select 0; -private _inclinationP1 = _directionP1 select 1; +GVAR(pData) params ["_distanceP1", "_directionP1"]; +_directionP1 params ["_azimuthP1", "_inclinationP1"]; private _distanceP2 = call FUNC(getDistance); private _directionP2 = call FUNC(getDirection); -private _azimuthP2 = _directionP2 select 0; -private _inclinationP2 = _directionP2 select 1; - -private _azimuth = abs (_azimuthP1 - _azimuthP2); -private _inclination = abs (_inclinationP1 - _inclinationP2); -private _height = sqrt (_distanceP1 ^ 2 + _distanceP2 ^ 2 - 2 * _distanceP1 * _distanceP2 * cos _inclination); -private _length = sqrt (_distanceP1 ^ 2 + _distanceP2 ^ 2 - 2 * _distanceP1 * _distanceP2 * cos _azimuth); - -if (_inclination < 0) then {_height = -1 * _height}; +_directionP2 params ["_azimuthP2", "_inclinationP2"]; if (_distanceP1 < -999 || {_distanceP2 < -999}) exitWith { [-1000, -1000] // return }; +private _position1 = [_distanceP1, _azimuthP1, _inclinationP1] call CBA_fnc_polar2vect; +private _position2 = [_distanceP2, _azimuthP2, _inclinationP2] call CBA_fnc_polar2vect; + +private _length = _position1 distance2D _position2; +private _height = abs ((_position1 vectorDiff _position2) select 2); + [_height, _length] diff --git a/addons/vector/functions/fnc_illuminate.sqf b/addons/vector/functions/fnc_illuminate.sqf index 999fc5c29a..0c91da0ac0 100644 --- a/addons/vector/functions/fnc_illuminate.sqf +++ b/addons/vector/functions/fnc_illuminate.sqf @@ -20,31 +20,28 @@ private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); if (_this select 0) then { { - if (ctrlIDC _x != 170) then { - private _string = ctrlText _x; - private _index = _string find ".paa"; + private _control = _dlgVector displayCtrl _x; + private _string = ctrlText _control; + private _index = _string find ".paa"; - if (_index != -1 && {_string find "_illum.paa" == -1}) then { - _string = toArray _string; - _string resize _index; + if (_index != -1 && {_string find "_illum.paa" == -1}) then { + _string = toArray _string; + _string resize _index; - _x ctrlSetText format ["%1_illum.paa", toString _string]; - }; + _control ctrlSetText format ["%1_illum.paa", toString _string]; }; - } forEach allControls _dlgVector; + } forEach ILLUM_CONTROLS; } else { { - if (ctrlIDC _x != 170) then { - private _string = ctrlText _x; - private _index = _string find "_illum.paa"; + private _control = _dlgVector displayCtrl _x; + private _string = ctrlText _control; + private _index = _string find "_illum.paa"; - if (_index != -1) then { - _string = toArray _string; - _string resize _index; - - _x ctrlSetText format ["%1.paa", toString _string]; - }; + if (_index != -1) then { + _string = toArray _string; + _string resize _index; + _control ctrlSetText format ["%1.paa", toString _string]; }; - } forEach allControls _dlgVector; + } forEach ILLUM_CONTROLS; }; diff --git a/addons/vector/functions/fnc_showAzimuth.sqf b/addons/vector/functions/fnc_showAzimuth.sqf index 4a0854f3d5..e07f093b5d 100644 --- a/addons/vector/functions/fnc_showAzimuth.sqf +++ b/addons/vector/functions/fnc_showAzimuth.sqf @@ -22,9 +22,9 @@ private _direction = call FUNC(getDirection); private _digits = _direction call FUNC(convertToTexturesDegree); -(_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText (_digits select 3); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showAzimuthInclination.sqf b/addons/vector/functions/fnc_showAzimuthInclination.sqf index 15e206fbbd..e7769a3e7b 100644 --- a/addons/vector/functions/fnc_showAzimuthInclination.sqf +++ b/addons/vector/functions/fnc_showAzimuthInclination.sqf @@ -23,17 +23,17 @@ private _direction = call FUNC(getDirection); // azimuth private _digits = [_direction select 0] call FUNC(convertToTexturesDegree); -(_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText (_digits select 3); // inclination _digits = [_direction select 1] call FUNC(convertToTexturesDegree); -(_dlgVector displayCtrl 1311) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 3); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showCenter.sqf b/addons/vector/functions/fnc_showCenter.sqf index fef128240f..d9e3542fac 100644 --- a/addons/vector/functions/fnc_showCenter.sqf +++ b/addons/vector/functions/fnc_showCenter.sqf @@ -15,6 +15,6 @@ * Public: No */ -((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QPATHTOF(rsc\vector_center.paa)] select (_this select 0)); +((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl IDC_CENTER) ctrlSetText (["", QPATHTOF(rsc\vector_center.paa)] select (_this select 0)); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showDistance.sqf b/addons/vector/functions/fnc_showDistance.sqf index 447622355c..3009d5ea5d 100644 --- a/addons/vector/functions/fnc_showDistance.sqf +++ b/addons/vector/functions/fnc_showDistance.sqf @@ -22,9 +22,9 @@ private _distance = call FUNC(getDistance); private _digits = [_distance] call FUNC(convertToTexturesDistance); -(_dlgVector displayCtrl 1311) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 3); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showFallOfShot.sqf b/addons/vector/functions/fnc_showFallOfShot.sqf index 3df9fa8357..ac03fc6bbf 100644 --- a/addons/vector/functions/fnc_showFallOfShot.sqf +++ b/addons/vector/functions/fnc_showFallOfShot.sqf @@ -26,37 +26,37 @@ if !(_this select 0) then { // of ordinate private _digits = [_fosData, 1] call FUNC(convertToTexturesFOS); - (_dlgVector displayCtrl 1310) ctrlSetText (_digits select 0); - (_dlgVector displayCtrl 1311) ctrlSetText (_digits select 1); - (_dlgVector displayCtrl 1312) ctrlSetText (_digits select 2); - (_dlgVector displayCtrl 1313) ctrlSetText (_digits select 3); - (_dlgVector displayCtrl 1314) ctrlSetText (_digits select 4); + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText (_digits select 0); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 1); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 2); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 3); + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 4); // of abscissa _digits = [_fosData, 0] call FUNC(convertToTexturesFOS); - (_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0); - (_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); - (_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); - (_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); - (_dlgVector displayCtrl 1319) ctrlSetText (_digits select 4); + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText (_digits select 0); + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText (_digits select 1); + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText (_digits select 2); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText (_digits select 3); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText (_digits select 4); } else { // applicate private _digits = [_fosData, 2] call FUNC(convertToTexturesFOS); - (_dlgVector displayCtrl 1310) ctrlSetText (_digits select 0); - (_dlgVector displayCtrl 1311) ctrlSetText (_digits select 1); - (_dlgVector displayCtrl 1312) ctrlSetText (_digits select 2); - (_dlgVector displayCtrl 1313) ctrlSetText (_digits select 3); - (_dlgVector displayCtrl 1314) ctrlSetText (_digits select 4); + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText (_digits select 0); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 1); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 2); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 3); + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 4); // nothing - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText ""; - (_dlgVector displayCtrl 1318) ctrlSetText ""; - (_dlgVector displayCtrl 1319) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText ""; }; diff --git a/addons/vector/functions/fnc_showHeightDistance.sqf b/addons/vector/functions/fnc_showHeightDistance.sqf index 7c8c0cc02e..ce4e3011a9 100644 --- a/addons/vector/functions/fnc_showHeightDistance.sqf +++ b/addons/vector/functions/fnc_showHeightDistance.sqf @@ -23,17 +23,17 @@ private _heightDistance = call FUNC(getHeightDistance); // height private _digits = [_heightDistance select 0] call FUNC(convertToTexturesDistance); -(_dlgVector displayCtrl 1311) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 3); // non-slope distance _digits = [_heightDistance select 1] call FUNC(convertToTexturesDistance); -(_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText (_digits select 3); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showP1.sqf b/addons/vector/functions/fnc_showP1.sqf index 2d587e03d1..4cb25adfaa 100644 --- a/addons/vector/functions/fnc_showP1.sqf +++ b/addons/vector/functions/fnc_showP1.sqf @@ -19,15 +19,15 @@ disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); if (_this select 0) then { - (_dlgVector displayCtrl 1321) ctrlSetText QPATHTOF(rsc\vector_1.paa); - (_dlgVector displayCtrl 1322) ctrlSetText QPATHTOF(rsc\vector_minus.paa); - (_dlgVector displayCtrl 1323) ctrlSetText QPATHTOF(rsc\vector_p.paa); - (_dlgVector displayCtrl 1324) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E1) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl IDC_DIGIT_E2) ctrlSetText QPATHTOF(rsc\vector_minus.paa); + (_dlgVector displayCtrl IDC_DIGIT_E3) ctrlSetText QPATHTOF(rsc\vector_p.paa); + (_dlgVector displayCtrl IDC_DIGIT_E4) ctrlSetText ""; } else { - (_dlgVector displayCtrl 1321) ctrlSetText ""; - (_dlgVector displayCtrl 1322) ctrlSetText ""; - (_dlgVector displayCtrl 1323) ctrlSetText ""; - (_dlgVector displayCtrl 1324) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E1) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E2) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E3) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E4) ctrlSetText ""; }; [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf index 82f1f7eaf6..74365cc6c7 100644 --- a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf +++ b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf @@ -23,17 +23,17 @@ private _azimuthDistance = call FUNC(getRelativeAzimuthDistance); // relative azimuth private _digits = [_azimuthDistance select 0] call FUNC(convertToTexturesDegree); -(_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText (_digits select 3); // relative non-slope distance _digits = [_azimuthDistance select 1] call FUNC(convertToTexturesDistance); -(_dlgVector displayCtrl 1311) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 3); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showRelativeDistance.sqf b/addons/vector/functions/fnc_showRelativeDistance.sqf index 0bd4d23ec0..b8ddd9f04f 100644 --- a/addons/vector/functions/fnc_showRelativeDistance.sqf +++ b/addons/vector/functions/fnc_showRelativeDistance.sqf @@ -23,7 +23,7 @@ private _distance = call FUNC(getRelativeDistance); // relative slope distance private _digits = [_distance] call FUNC(convertToTexturesDistance); -(_dlgVector displayCtrl 1311) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 3); diff --git a/addons/vector/functions/fnc_showRelativeHeightLength.sqf b/addons/vector/functions/fnc_showRelativeHeightLength.sqf index fe9823e170..1fb9ddcb2f 100644 --- a/addons/vector/functions/fnc_showRelativeHeightLength.sqf +++ b/addons/vector/functions/fnc_showRelativeHeightLength.sqf @@ -23,17 +23,17 @@ private _heightLength = call FUNC(getRelativeHeightLength); // height private _digits = [_heightLength select 0] call FUNC(convertToTexturesDistance); -(_dlgVector displayCtrl 1311) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1312) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1313) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1314) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText (_digits select 3); // length _digits = [_heightLength select 1] call FUNC(convertToTexturesDistance); -(_dlgVector displayCtrl 1315) ctrlSetText (_digits select 0); -(_dlgVector displayCtrl 1316) ctrlSetText (_digits select 1); -(_dlgVector displayCtrl 1317) ctrlSetText (_digits select 2); -(_dlgVector displayCtrl 1318) ctrlSetText (_digits select 3); +(_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText (_digits select 0); +(_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText (_digits select 1); +(_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText (_digits select 2); +(_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText (_digits select 3); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showReticle.sqf b/addons/vector/functions/fnc_showReticle.sqf index 5fd1729c4f..fabf3cad15 100644 --- a/addons/vector/functions/fnc_showReticle.sqf +++ b/addons/vector/functions/fnc_showReticle.sqf @@ -15,6 +15,6 @@ * Public: No */ -((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QPATHTOF(rsc\vector_crosshair.paa)] select (_this select 0)); +((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl IDC_CROSSHAIR) ctrlSetText (["", QPATHTOF(rsc\vector_crosshair.paa)] select (_this select 0)); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showText.sqf b/addons/vector/functions/fnc_showText.sqf index a8556e7a58..23f4481082 100644 --- a/addons/vector/functions/fnc_showText.sqf +++ b/addons/vector/functions/fnc_showText.sqf @@ -20,149 +20,149 @@ private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); switch (_this select 0) do { case ("config"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_c.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_o.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_n.paa); - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_f.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_i.paa); - (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_g.paa); - (_dlgVector displayCtrl 1313) ctrlSetText ""; - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_c.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText QPATHTOF(rsc\vector_g.paa); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("settings"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_u.paa); - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_n.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_i.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_t.paa); - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_5.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_e.paa); - (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_t.paa); - (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_t.paa); - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText QPATHTOF(rsc\vector_u.paa); + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_5.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("nigt"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_n.paa); - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_i.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_g.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_g.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_t.paa); }; case ("eret"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_e.paa); - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_r.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_e.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_r.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_t.paa); }; case ("on"): { - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_o.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_n.paa); - (_dlgVector displayCtrl 1312) ctrlSetText ""; - (_dlgVector displayCtrl 1313) ctrlSetText ""; - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("off"): { - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_o.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_f.paa); - (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_f.paa); - (_dlgVector displayCtrl 1313) ctrlSetText ""; - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("deg"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_3.paa); - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_6.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_0.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_degree.paa); + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText QPATHTOF(rsc\vector_3.paa); + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_6.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_0.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_degree.paa); }; case ("mil"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_6.paa); - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_4.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_0.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_0.paa); + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText QPATHTOF(rsc\vector_6.paa); + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_4.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_0.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_0.paa); }; case ("meter"): { - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_5.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_1.paa); - (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_minus.paa); - (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_u.paa); - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_5.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText QPATHTOF(rsc\vector_minus.paa); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText QPATHTOF(rsc\vector_u.paa); + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("feet"): { - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_f.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_e.paa); - (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_e.paa); - (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_t.paa); - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("stor"): { - (_dlgVector displayCtrl 1321) ctrlSetText QPATHTOF(rsc\vector_5.paa); - (_dlgVector displayCtrl 1322) ctrlSetText QPATHTOF(rsc\vector_t.paa); - (_dlgVector displayCtrl 1323) ctrlSetText QPATHTOF(rsc\vector_o.paa); - (_dlgVector displayCtrl 1324) ctrlSetText QPATHTOF(rsc\vector_r.paa); + (_dlgVector displayCtrl IDC_DIGIT_E1) ctrlSetText QPATHTOF(rsc\vector_5.paa); + (_dlgVector displayCtrl IDC_DIGIT_E2) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_E3) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl IDC_DIGIT_E4) ctrlSetText QPATHTOF(rsc\vector_r.paa); }; case ("old_config"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_o.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_1.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_d.paa); - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_c.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_o.paa); - (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_n.paa); - (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_f.paa); - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_d.paa); + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_c.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("old_settings"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_o.paa); - (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_1.paa); - (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_d.paa); - (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_u.paa); - (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_n.paa); - (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_i.paa); - (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_t.paa); - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText QPATHTOF(rsc\vector_d.paa); + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText QPATHTOF(rsc\vector_u.paa); + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("clear_left"): { - (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText ""; - (_dlgVector displayCtrl 1318) ctrlSetText ""; - (_dlgVector displayCtrl 1319) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_5) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_6) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_7) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_8) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_9) ctrlSetText ""; }; case ("clear_right"): { - (_dlgVector displayCtrl 1310) ctrlSetText ""; - (_dlgVector displayCtrl 1311) ctrlSetText ""; - (_dlgVector displayCtrl 1312) ctrlSetText ""; - (_dlgVector displayCtrl 1313) ctrlSetText ""; - (_dlgVector displayCtrl 1314) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_0) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_1) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_2) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_3) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_4) ctrlSetText ""; }; case ("clear_stor"): { - (_dlgVector displayCtrl 1321) ctrlSetText ""; - (_dlgVector displayCtrl 1322) ctrlSetText ""; - (_dlgVector displayCtrl 1323) ctrlSetText ""; - (_dlgVector displayCtrl 1324) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E1) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E2) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E3) ctrlSetText ""; + (_dlgVector displayCtrl IDC_DIGIT_E4) ctrlSetText ""; }; }; diff --git a/addons/vector/initKeybinds.sqf b/addons/vector/initKeybinds.sqf index 5b099235da..7d81561993 100644 --- a/addons/vector/initKeybinds.sqf +++ b/addons/vector/initKeybinds.sqf @@ -1,11 +1,8 @@ -// by commy2 - -["ACE3 Equipment", QGVAR(AzimuthKey), localize LSTRING(AzimuthKey), -{ +["ACE3 Equipment", QGVAR(AzimuthKey), localize LSTRING(AzimuthKey), { // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false}; + if !(currentWeapon ACE_player isKindOf ["ACE_Vector", configFile >> "CfgWeapons"] && {cameraView == "GUNNER"}) exitWith {false}; // prevent holding down if (GETGVAR(isDownStateKey1,false)) exitWith {false}; @@ -14,8 +11,7 @@ // Statement ["azimuth"] call FUNC(onKeyDown); false -}, -{ +}, { // prevent holding down GVAR(isDownStateKey1) = false; @@ -25,16 +21,13 @@ // Statement ["azimuth"] call FUNC(onKeyUp); false -}, -[15, [false, false, false]], false, 0] call CBA_fnc_addKeybind; //Tab Key +}, [DIK_TAB, [false, false, false]], false, 0] call CBA_fnc_addKeybind; - -["ACE3 Equipment", QGVAR(DistanceKey), localize LSTRING(DistanceKey), -{ +["ACE3 Equipment", QGVAR(DistanceKey), localize LSTRING(DistanceKey), { // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false}; + if !(currentWeapon ACE_player isKindOf ["ACE_Vector", configFile >> "CfgWeapons"] && {cameraView == "GUNNER"}) exitWith {false}; // prevent holding down if (GETGVAR(isDownStateKey2,false)) exitWith {false}; @@ -43,8 +36,7 @@ // Statement ["distance"] call FUNC(onKeyDown); false -}, -{ +}, { // prevent holding down GVAR(isDownStateKey2) = false; @@ -54,5 +46,4 @@ // Statement ["distance"] call FUNC(onKeyUp); false -}, -[19, [false, false, false]], false] call CBA_fnc_addKeybind; //R Key +}, [DIK_R, [false, false, false]], false, 0] call CBA_fnc_addKeybind; diff --git a/addons/vector/script_component.hpp b/addons/vector/script_component.hpp index 15787b140f..0c3646f1ff 100644 --- a/addons/vector/script_component.hpp +++ b/addons/vector/script_component.hpp @@ -15,3 +15,31 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + +#include "\a3\ui_f\hpp\defineDIKCodes.inc" + +#define IDC_CENTER 1301 +#define IDC_CROSSHAIR 1302 + +#define IDC_DIGIT_0 1310 +#define IDC_DIGIT_1 1311 +#define IDC_DIGIT_2 1312 +#define IDC_DIGIT_3 1313 +#define IDC_DIGIT_4 1314 +#define IDC_DIGIT_5 1315 +#define IDC_DIGIT_6 1316 +#define IDC_DIGIT_7 1317 +#define IDC_DIGIT_8 1318 +#define IDC_DIGIT_9 1319 + +#define IDC_DIGIT_E1 1321 +#define IDC_DIGIT_E2 1322 +#define IDC_DIGIT_E3 1323 +#define IDC_DIGIT_E4 1324 + +#define ILLUM_CONTROLS [\ + IDC_CENTER, IDC_CROSSHAIR,\ + IDC_DIGIT_0, IDC_DIGIT_1, IDC_DIGIT_2, IDC_DIGIT_3, IDC_DIGIT_4,\ + IDC_DIGIT_5, IDC_DIGIT_6, IDC_DIGIT_7, IDC_DIGIT_8, IDC_DIGIT_9,\ + IDC_DIGIT_E1, IDC_DIGIT_E2, IDC_DIGIT_E3, IDC_DIGIT_E4\ +]