2015-03-09 15:46:59 +00:00
|
|
|
//XEH_clientInit.sqf
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
2015-05-10 20:17:50 +00:00
|
|
|
//Add deviceKey entry:
|
2017-10-10 14:39:59 +00:00
|
|
|
private _conditonCode = {
|
2018-09-17 19:03:28 +00:00
|
|
|
"ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems))
|
2015-05-10 19:59:53 +00:00
|
|
|
};
|
2017-10-10 14:39:59 +00:00
|
|
|
private _toggleCode = {
|
2015-06-13 20:08:13 +00:00
|
|
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {};
|
2015-03-24 08:50:06 +00:00
|
|
|
[] call FUNC(openDisplay); //toggle display mode
|
2015-05-10 19:59:53 +00:00
|
|
|
};
|
2017-10-10 14:39:59 +00:00
|
|
|
private _closeCode = {
|
2015-06-06 00:46:19 +00:00
|
|
|
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {};
|
2015-05-10 19:59:53 +00:00
|
|
|
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
|
|
|
|
};
|
2016-04-08 18:34:50 +00:00
|
|
|
[(localize LSTRING(itemName)), QPATHTOF(images\microDAGR_item.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
2015-06-06 00:46:19 +00:00
|
|
|
|
2021-04-22 03:37:25 +00:00
|
|
|
// Mode keybinds:
|
|
|
|
["ACE3 Equipment", QGVAR(previousMode), LLSTRING(previousMode), {
|
|
|
|
private _newMode = GVAR(currentApplicationPage) - 1;
|
|
|
|
if (_newMode < APP_MODE_INFODISPLAY) then {
|
|
|
|
_newMode = APP_MODE_SETUP;
|
|
|
|
};
|
|
|
|
[_newMode] call FUNC(saveCurrentAndSetNewMode);
|
|
|
|
}, ""] call CBA_fnc_addKeybind;
|
|
|
|
|
|
|
|
["ACE3 Equipment", QGVAR(nextMode), LLSTRING(nextMode), {
|
|
|
|
private _newMode = GVAR(currentApplicationPage) + 1;
|
|
|
|
if (_newMode > APP_MODE_SETUP) then {
|
|
|
|
_newMode = APP_MODE_INFODISPLAY;
|
|
|
|
};
|
|
|
|
[_newMode] call FUNC(saveCurrentAndSetNewMode);
|
|
|
|
}, ""] call CBA_fnc_addKeybind;
|
2015-03-09 15:46:59 +00:00
|
|
|
|
|
|
|
//Add Eventhandler:
|
2024-03-28 18:57:23 +00:00
|
|
|
[QEGVAR(vector,rangefinderData), LINKFUNC(recieveRangefinderData)] call CBA_fnc_addEventHandler;
|
2015-03-09 15:46:59 +00:00
|
|
|
|
|
|
|
//Global Variables to default:
|
2015-03-11 07:06:07 +00:00
|
|
|
GVAR(gpsPositionASL) = [0,0,0];
|
2015-03-09 15:46:59 +00:00
|
|
|
GVAR(mapAutoTrackPosition) = true;
|
|
|
|
GVAR(mapShowTexture) = false;
|
|
|
|
GVAR(mapPosition) = [-999, -999];
|
|
|
|
GVAR(mapZoom) = 0.075;
|
|
|
|
GVAR(currentApplicationPage) = APP_MODE_NULL;
|
|
|
|
GVAR(currentShowMode) = DISPLAY_MODE_CLOSED;
|
|
|
|
|
2015-03-11 02:48:57 +00:00
|
|
|
//User Settings
|
|
|
|
GVAR(settingUseMils) = false;
|
|
|
|
GVAR(settingShowAllWaypointsOnMap) = true;
|
|
|
|
|
2015-03-09 15:46:59 +00:00
|
|
|
GVAR(newWaypointPosition) = [];
|
|
|
|
GVAR(currentWaypoint) = -1;
|
|
|
|
GVAR(rangeFinderPositionASL) = [];
|
2015-03-09 18:52:15 +00:00
|
|
|
|
2015-06-30 17:26:51 +00:00
|
|
|
GVAR(mgrsGridZoneDesignator) = format ["%1 %2",EGVAR(common,MGRS_data) select 0, EGVAR(common,MGRS_data) select 1];
|