2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-06-07 15:53:37 +00:00
|
|
|
/*
|
|
|
|
* Author: Rosuto, Ruthberg
|
|
|
|
* Toggles the DAGR overlay
|
|
|
|
*
|
|
|
|
* Arguments:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-06-07 15:53:37 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-06-07 15:53:37 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2017-06-08 13:31:51 +00:00
|
|
|
* call ace_dagr_fnc_toggleOverlay
|
2015-06-07 15:53:37 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-06-09 20:46:04 +00:00
|
|
|
GVAR(run) = !GVAR(run);
|
2015-06-07 15:53:37 +00:00
|
|
|
|
2015-06-09 20:46:04 +00:00
|
|
|
if (GVAR(run)) then {
|
2015-06-14 07:59:06 +00:00
|
|
|
if (GVAR(menuRun) && dialog) then {
|
|
|
|
GVAR(menuRun) = false;
|
|
|
|
closeDialog 0;
|
|
|
|
};
|
2015-06-12 16:23:01 +00:00
|
|
|
GVAR(hidden) = true;
|
2015-06-07 15:53:37 +00:00
|
|
|
[{
|
2015-08-09 00:33:00 +00:00
|
|
|
params ["_args", "_idPFH"];
|
|
|
|
_args params ["_vehicle"];
|
2015-06-12 16:23:01 +00:00
|
|
|
if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith {
|
|
|
|
GVAR(run) = false;
|
2015-06-07 15:53:37 +00:00
|
|
|
135471 cutText ["", "PLAIN"];
|
2015-08-09 00:33:00 +00:00
|
|
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
2015-06-07 15:53:37 +00:00
|
|
|
};
|
2015-06-12 16:23:01 +00:00
|
|
|
if (cameraView == "GUNNER") then {
|
|
|
|
if (!GVAR(hidden)) then {
|
|
|
|
GVAR(hidden) = true;
|
|
|
|
135471 cutText ["", "PLAIN"];
|
|
|
|
};
|
|
|
|
} else {
|
|
|
|
if (GVAR(hidden)) then {
|
|
|
|
GVAR(hidden) = false;
|
|
|
|
switch (toUpper GVAR(displaySelection)) do {
|
|
|
|
case "WP" : {
|
|
|
|
call FUNC(outputWP);
|
|
|
|
};
|
|
|
|
case "VECTOR" : {
|
|
|
|
call FUNC(outputVector);
|
|
|
|
};
|
|
|
|
case "DATA" : {
|
|
|
|
call FUNC(outputData);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2015-06-07 15:53:37 +00:00
|
|
|
}, 0.1, [vehicle ACE_player]] call CBA_fnc_addPerFrameHandler;
|
|
|
|
};
|