ACE3/addons/interaction/functions/fnc_onButtonDown.sqf

19 lines
603 B
Plaintext
Raw Normal View History

2015-01-11 19:32:51 +00:00
// by commy2
2015-01-11 23:13:47 +00:00
#include "script_component.hpp"
2015-01-11 19:32:51 +00:00
if (dialog) exitWith {
closeDialog 0;
};
if (isNull (findDisplay 1713999)) then {
if (ACE_player == vehicle ACE_player) then {"" call FUNC(openMenu)} else {[ACE_player, vehicle ACE_player] call FUNC(openMenuSelectUI)};
2015-01-11 19:32:51 +00:00
setMousePosition [0.5, 0.5];
} else {
(findDisplay 1713999) closeDisplay 1;
};
// Raise custom event. @todo: remove
2015-01-13 05:14:27 +00:00
[_player, "interactionMenuOpened", [_player, GVAR(Target), 0]] call EFUNC(common,callCustomEventHandlers);
// Raise ACE localEvent
["interactionMenuOpened", [_player, GVAR(Target), 0]] call EFUNC(common,localEvent);