mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
DAGR overlay auto hide
This commit is contained in:
parent
f84a936d95
commit
9130546c8c
@ -2,7 +2,10 @@
|
||||
|
||||
#include "initKeybinds.sqf"
|
||||
|
||||
GVAR(outputPFH) = -1;
|
||||
|
||||
GVAR(run) = false;
|
||||
GVAR(hidden) = true;
|
||||
GVAR(menuRun) = false;
|
||||
GVAR(useDegrees) = true;
|
||||
GVAR(updateInterval) = 0.5;
|
||||
|
@ -27,11 +27,14 @@
|
||||
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_gps.paa));
|
||||
|
||||
[{
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xgrid", "_ygrid", "_xcoord", "_ycoord", "_speed", "_dagrHeading", "_dagrGrid", "_dagrElevation", "_dagrSpeed", "_dagrTime", "_elevation"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -27,11 +27,14 @@
|
||||
|
||||
__background ctrlSetText QUOTE(PATHTOF(UI\dagr_wp.paa));
|
||||
|
||||
[{
|
||||
if (GVAR(outputPFH) != -1) exitWith {};
|
||||
|
||||
GVAR(outputPFH) = [{
|
||||
private ["_pos", "_mapSize", "_gridConfig", "_offsetX", "_offsetY", "_stepX", "_stepY", "_xGrid", "_yGrid", "_xCoord", "_yCoord", "_dagrHeading", "_dagrGrid", "_bearing", "_MYpos", "_WPpos", "_dagrDistance", "_distance"];
|
||||
|
||||
// Abort Condition
|
||||
if !(GVAR(run) && [ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {
|
||||
GVAR(outputPFH) = -1;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -14,11 +14,25 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (cameraView == "GUNNER") exitWith {};
|
||||
|
||||
GVAR(run) = !GVAR(run);
|
||||
|
||||
if (GVAR(run)) then {
|
||||
GVAR(hidden) = true;
|
||||
[{
|
||||
EXPLODE_1_PVT(_this select 0,_vehicle);
|
||||
if (!GVAR(run) || (!alive ACE_player) || (vehicle ACE_player != _vehicle)) exitWith {
|
||||
GVAR(run) = false;
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
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);
|
||||
@ -30,11 +44,7 @@ if (GVAR(run)) then {
|
||||
call FUNC(outputData);
|
||||
};
|
||||
};
|
||||
[{
|
||||
EXPLODE_1_PVT(_this select 0,_vehicle);
|
||||
if (!GVAR(run) || (!alive ACE_player) || (cameraView == "GUNNER") || (vehicle ACE_player != _vehicle)) exitWith {
|
||||
135471 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
};
|
||||
}, 0.1, [vehicle ACE_player]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user