mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
handle cursor mode
This commit is contained in:
parent
5ec8b6d36c
commit
8c8e310d66
@ -16,9 +16,9 @@ EXPLODE_2_PVT(_this,_newUnit,_oldUnit);
|
||||
// add to new unit
|
||||
private "_ehid";
|
||||
_ehid = [_newUnit, "DefaultAction", {GVAR(openedMenuType) >= 0}, {
|
||||
if !(GVAR(actionOnKeyRelease)) then {
|
||||
[GVAR(openedMenuType),true] call FUNC(keyUp);
|
||||
};
|
||||
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];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user