Merge branch 'master' into csw-separate-settings

This commit is contained in:
johnb432 2024-04-02 15:28:10 +02:00
commit 36b6cb85d9
3 changed files with 16 additions and 17 deletions

View File

@ -625,4 +625,4 @@ GVAR(deviceKeyCurrentIndex) = -1;
};
}] call CBA_fnc_addEventHandler;
GVAR(commonPostInited) = true; call compileScript [QPATHTOF(icon.paa)];
GVAR(commonPostInited) = true;

File diff suppressed because one or more lines are too long

View File

@ -15,12 +15,12 @@
* Public: No
*/
#define __dsp (uiNamespace getVariable "ACE_RscYardage450")
#define __ctrlTarget (__dsp displayCtrl 720041)
#define __ctrlLaser (__dsp displayCtrl 720042)
#define __ctrlRange (__dsp displayCtrl 720043)
#define __ctrlMeters (__dsp displayCtrl 720044)
#define __ctrlYards (__dsp displayCtrl 720045)
#define DISPLAY_YARDAGE (uiNamespace getVariable "ACE_RscYardage450")
#define CTRL_TARGET (DISPLAY_YARDAGE displayCtrl 720041)
#define CTRL_LASER (DISPLAY_YARDAGE displayCtrl 720042)
#define CTRL_RANGE (DISPLAY_YARDAGE displayCtrl 720043)
#define CTRL_METERS (DISPLAY_YARDAGE displayCtrl 720044)
#define CTRL_YARDS (DISPLAY_YARDAGE displayCtrl 720045)
if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {};
@ -38,21 +38,21 @@ GVAR(active) = true;
};
if (currentWeapon ACE_player == "ACE_Yardage450" && cameraView == "GUNNER") then {
if (isNil {__dsp} || {isNull __dsp} || {ctrlIDD __dsp != -1}) then {
TRACE_1("making display",__dsp);
if (isNil {DISPLAY_YARDAGE} || {isNull DISPLAY_YARDAGE} || {ctrlIDD DISPLAY_YARDAGE != -1}) then {
TRACE_1("making display",DISPLAY_YARDAGE);
QUOTE(ADDON) cutRsc ["ACE_RscYardage450", "PLAIN", 1, false];
};
__ctrlLaser ctrlShow GVAR(lasing);
CTRL_LASER ctrlShow GVAR(lasing);
if (GVAR(targetAcquired)) then {
__ctrlTarget ctrlSetText "Target Acquired";
__ctrlRange ctrlSetText GVAR(targetRangeText);
CTRL_TARGET ctrlSetText "Target Acquired";
CTRL_RANGE ctrlSetText GVAR(targetRangeText);
} else {
__ctrlTarget ctrlSetText "";
__ctrlRange ctrlSetText "---";
CTRL_TARGET ctrlSetText "";
CTRL_RANGE ctrlSetText "---";
};
__ctrlMeters ctrlShow !GVAR(useYards);
__ctrlYards ctrlShow GVAR(useYards);
CTRL_METERS ctrlShow !GVAR(useYards);
CTRL_YARDS ctrlShow GVAR(useYards);
} else {
QUOTE(ADDON) cutText ["", "PLAIN"];
};