ACE3/addons/dagr/functions/fnc_toggleOverlay.sqf

51 lines
1.3 KiB
Plaintext
Raw Normal View History

2015-06-07 15:53:37 +00:00
/*
* Author: Rosuto, Ruthberg
* Toggles the DAGR overlay
*
* Arguments:
* Nothing
*
* Return Value:
* Nothing
*
* Example:
*
* Public: No
*/
#include "script_component.hpp"
GVAR(run) = !GVAR(run);
2015-06-07 15:53:37 +00:00
if (GVAR(run)) then {
2015-06-12 16:23:01 +00:00
GVAR(hidden) = true;
2015-06-07 15:53:37 +00:00
[{
EXPLODE_1_PVT(_this select 0,_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"];
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
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;
};