mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
DAGR now supports the new multiple devices framework
This commit is contained in:
parent
48d8d5e076
commit
906e365b94
@ -1,5 +1,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
#include "initKeybinds.sqf"
|
#include "initKeybinds.sqf"
|
||||||
|
|
||||||
GVAR(outputPFH) = -1;
|
GVAR(outputPFH) = -1;
|
||||||
|
@ -69,7 +69,7 @@ GVAR(showOutOfSpace) = false;
|
|||||||
GVAR(PWR) = false;
|
GVAR(PWR) = false;
|
||||||
GVAR(menuRun) = true;
|
GVAR(menuRun) = true;
|
||||||
[{
|
[{
|
||||||
if (!dialog || GVAR(PWR)) exitWith {
|
if (!dialog || GVAR(PWR) || !GVAR(menuRun)) exitWith {
|
||||||
closeDialog 266860;
|
closeDialog 266860;
|
||||||
GVAR(menuRun) = false;
|
GVAR(menuRun) = false;
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||||
|
@ -17,6 +17,10 @@
|
|||||||
GVAR(run) = !GVAR(run);
|
GVAR(run) = !GVAR(run);
|
||||||
|
|
||||||
if (GVAR(run)) then {
|
if (GVAR(run)) then {
|
||||||
|
if (GVAR(menuRun) && dialog) then {
|
||||||
|
GVAR(menuRun) = false;
|
||||||
|
closeDialog 0;
|
||||||
|
};
|
||||||
GVAR(hidden) = true;
|
GVAR(hidden) = true;
|
||||||
[{
|
[{
|
||||||
EXPLODE_1_PVT(_this select 0,_vehicle);
|
EXPLODE_1_PVT(_this select 0,_vehicle);
|
||||||
|
@ -28,3 +28,32 @@
|
|||||||
},
|
},
|
||||||
{false},
|
{false},
|
||||||
[0, [false, false, false]], false] call cba_fnc_addKeybind; // (empty default key)
|
[0, [false, false, false]], false] call cba_fnc_addKeybind; // (empty default key)
|
||||||
|
|
||||||
|
//Add deviceKey entry:
|
||||||
|
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||||
|
_conditonCode = {
|
||||||
|
([ACE_player, "ACE_DAGR"] call EFUNC(common,hasItem));
|
||||||
|
};
|
||||||
|
_toggleCode = {
|
||||||
|
// Conditions: canInteract
|
||||||
|
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {};
|
||||||
|
|
||||||
|
// Statement
|
||||||
|
[] call FUNC(toggleOverlay);
|
||||||
|
if (!GVAR(run)) then {
|
||||||
|
[] call FUNC(menuInit);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_closeCode = {
|
||||||
|
// 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
["DAGR", QUOTE(PATHTOF(UI\DAGR_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||||
|
Loading…
Reference in New Issue
Block a user