mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into interactMoreOptions
Conflicts: addons/interact_menu/config.cpp
This commit is contained in:
@ -15,7 +15,11 @@ EXPLODE_2_PVT(_this,_newUnit,_oldUnit);
|
||||
|
||||
// add to new unit
|
||||
private "_ehid";
|
||||
_ehid = [_newUnit, "DefaultAction", {EGVAR(interact_menu,openedMenuType) >= 0}, {}] call EFUNC(common,addActionEventHandler);
|
||||
_ehid = [_newUnit, "DefaultAction", {GVAR(openedMenuType) >= 0}, {
|
||||
if !(GVAR(actionOnKeyRelease)) then {
|
||||
[GVAR(openedMenuType),true] call FUNC(keyUp);
|
||||
};
|
||||
}] call EFUNC(common,addActionEventHandler);
|
||||
|
||||
_newUnit setVariable [QGVAR(AAEHID), _ehid];
|
||||
|
||||
|
@ -52,6 +52,12 @@ if (GVAR(useCursorMenu)) then {
|
||||
GVAR(cursorPos) = [_this select 1, _this select 2, 0];
|
||||
};
|
||||
}];
|
||||
// handles LMB in cursor mode when action on keyrelease is disabled
|
||||
((finddisplay 91919) displayctrl 91921) ctrlAddEventHandler ["MouseButtonDown", {
|
||||
if !(GVAR(actionOnKeyRelease)) then {
|
||||
[GVAR(openedMenuType),true] call FUNC(keyUp);
|
||||
};
|
||||
}];
|
||||
setMousePosition [0.5, 0.5];
|
||||
};
|
||||
|
||||
|
@ -12,6 +12,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_calledByClicking";
|
||||
_calledByClicking = _this select 1;
|
||||
|
||||
// Exit if there's no menu opened
|
||||
if (GVAR(openedMenuType) < 0) exitWith {true};
|
||||
|
||||
@ -29,6 +32,9 @@ if(GVAR(actionSelected)) then {
|
||||
// Clear the conditions caches
|
||||
["clearConditionCaches", []] call EFUNC(common,localEvent);
|
||||
|
||||
// exit scope if selecting an action on key release is disabled
|
||||
if (!(GVAR(actionOnKeyRelease)) && !_calledByClicking) exitWith {};
|
||||
|
||||
// Check the action conditions
|
||||
_actionData = GVAR(selectedAction) select 0;
|
||||
if ([_target, _player, _actionData select 6] call (_actionData select 4)) then {
|
||||
|
Reference in New Issue
Block a user