2015-06-11 09:56:25 +00:00
|
|
|
|
2017-07-19 18:57:20 +00:00
|
|
|
["ACE3 Equipment", QGVAR(MenuKey), localize LSTRING(ConfigureDAGR),
|
2015-06-11 09:56:25 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-06-13 20:08:13 +00:00
|
|
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-06-13 19:29:34 +00:00
|
|
|
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
|
|
|
|
2015-06-11 09:56:25 +00:00
|
|
|
// Statement
|
|
|
|
if (!GVAR(menuRun)) then {
|
|
|
|
[] call FUNC(menuInit);
|
|
|
|
} else {
|
|
|
|
GVAR(PWR) = true; // Simulate pressing the power button
|
|
|
|
};
|
|
|
|
true
|
|
|
|
},
|
|
|
|
{false},
|
2015-11-30 15:45:20 +00:00
|
|
|
[0, [false, true, false]], false] call CBA_fnc_addKeybind; // (empty default key)
|
2015-06-11 09:56:25 +00:00
|
|
|
|
2017-07-19 18:57:20 +00:00
|
|
|
["ACE3 Equipment", QGVAR(ToggleKey), localize LSTRING(ToggleDAGR),
|
2015-06-11 09:56:25 +00:00
|
|
|
{
|
|
|
|
// Conditions: canInteract
|
2015-06-13 20:08:13 +00:00
|
|
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2015-06-13 19:29:34 +00:00
|
|
|
if !([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem)) exitWith {false};
|
|
|
|
|
2015-06-11 09:56:25 +00:00
|
|
|
// Statement
|
|
|
|
[] call FUNC(toggleOverlay);
|
|
|
|
true
|
|
|
|
},
|
|
|
|
{false},
|
2015-11-30 15:45:20 +00:00
|
|
|
[0, [false, false, false]], false] call CBA_fnc_addKeybind; // (empty default key)
|
2015-06-14 07:59:06 +00:00
|
|
|
|
|
|
|
//Add deviceKey entry:
|
2017-10-10 14:39:59 +00:00
|
|
|
private _conditonCode = {
|
2015-06-14 07:59:06 +00:00
|
|
|
([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem));
|
|
|
|
};
|
2017-10-10 14:39:59 +00:00
|
|
|
private _toggleCode = {
|
2015-06-14 07:59:06 +00:00
|
|
|
// Conditions: canInteract
|
2021-09-25 15:43:09 +00:00
|
|
|
if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2015-06-14 07:59:06 +00:00
|
|
|
// Statement
|
|
|
|
[] call FUNC(toggleOverlay);
|
|
|
|
if (!GVAR(run)) then {
|
|
|
|
[] call FUNC(menuInit);
|
|
|
|
};
|
|
|
|
};
|
2017-10-10 14:39:59 +00:00
|
|
|
private _closeCode = {
|
2015-06-14 07:59:06 +00:00
|
|
|
// Statement
|
|
|
|
if (GVAR(run)) then {
|
|
|
|
//If dispaly is open, close it:
|
|
|
|
[] call FUNC(toggleOverlay);
|
|
|
|
};
|
|
|
|
if (dialog && GVAR(menuRun)) then {
|
|
|
|
//If dialog is open, close it:
|
|
|
|
GVAR(menuRun) = false;
|
|
|
|
closeDialog 0;
|
|
|
|
};
|
|
|
|
};
|
2016-04-08 18:34:50 +00:00
|
|
|
["DAGR", QPATHTOF(UI\DAGR_Icon.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|