2015-05-28 19:59:04 +00:00
|
|
|
["ACE3 Equipment", QGVAR(KestrelDialogKey), localize LSTRING(KestrelDialogKey),
|
2015-04-07 15:43:54 +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-05-17 09:23:31 +00:00
|
|
|
if (GVAR(Kestrel4500)) exitWith {
|
|
|
|
closeDialog 0;
|
|
|
|
false
|
2016-05-03 00:32:44 +00:00
|
|
|
};
|
2015-04-07 15:43:54 +00:00
|
|
|
// Statement
|
|
|
|
[] call FUNC(createKestrelDialog);
|
|
|
|
false
|
|
|
|
},
|
|
|
|
{false},
|
2015-04-15 13:06:28 +00:00
|
|
|
[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
2015-04-07 15:43:54 +00:00
|
|
|
|
2015-05-28 19:59:04 +00:00
|
|
|
["ACE3 Equipment", QGVAR(DisplayKestrelKey), localize LSTRING(DisplayKestrelKey),
|
2015-04-07 15:43:54 +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};
|
2016-05-03 00:32:44 +00:00
|
|
|
|
2015-04-07 15:43:54 +00:00
|
|
|
// Statement
|
|
|
|
[] call FUNC(displayKestrel);
|
|
|
|
false
|
|
|
|
},
|
|
|
|
{false},
|
2015-04-15 13:06:28 +00:00
|
|
|
[0, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key)
|
2015-06-05 22:50:04 +00:00
|
|
|
|
2015-06-06 00:46:19 +00:00
|
|
|
|
2015-05-10 21:54:24 +00:00
|
|
|
//Add deviceKey entry:
|
2017-10-10 14:39:59 +00:00
|
|
|
private _conditonCode = {
|
2015-05-10 21:54:24 +00:00
|
|
|
[] call FUNC(canShow);
|
|
|
|
};
|
2017-10-10 14:39:59 +00:00
|
|
|
private _toggleCode = {
|
2015-04-07 15:43:54 +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-04-07 15:43:54 +00:00
|
|
|
// Statement
|
2015-05-12 02:49:13 +00:00
|
|
|
if (!GVAR(Overlay)) then {
|
|
|
|
//If no overlay, show it:
|
|
|
|
[] call FUNC(displayKestrel);
|
|
|
|
} else {
|
|
|
|
//If overlay is up, switch to dialog:
|
|
|
|
[] call FUNC(createKestrelDialog);
|
|
|
|
};
|
2015-05-10 21:54:24 +00:00
|
|
|
};
|
2017-10-10 14:39:59 +00:00
|
|
|
private _closeCode = {
|
2015-04-07 15:43:54 +00:00
|
|
|
// Statement
|
2015-05-12 02:49:13 +00:00
|
|
|
if (GVAR(Overlay)) then {
|
|
|
|
//If dispaly is open, close it:
|
|
|
|
GVAR(Overlay) = false;
|
|
|
|
};
|
|
|
|
if (dialog && {!isNull (uiNamespace getVariable ["Kestrel4500_Display", displayNull])}) then {
|
|
|
|
//If dialog is open, close it:
|
|
|
|
GVAR(Kestrel4500) = false;
|
|
|
|
closeDialog 0;
|
|
|
|
};
|
2015-05-10 21:54:24 +00:00
|
|
|
};
|
2016-04-08 18:34:50 +00:00
|
|
|
[(localize LSTRING(Name)), QPATHTOF(UI\Kestrel4500.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|