Merge pull request #994 from acemod/imenumisclick

don't close menu when no action is selected
This commit is contained in:
ViperMaul 2015-05-06 13:31:07 -07:00
commit 996c342087
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ EXPLODE_2_PVT(_this,_newUnit,_oldUnit);
// add to new unit
private "_ehid";
_ehid = [_newUnit, "DefaultAction", {GVAR(openedMenuType) >= 0}, {
if !(GVAR(actionOnKeyRelease)) then {
if (!GVAR(actionOnKeyRelease) && GVAR(actionSelected)) then {
[GVAR(openedMenuType),true] call FUNC(keyUp);
};
}] call EFUNC(common,addActionEventHandler);

View File

@ -54,7 +54,7 @@ if (GVAR(useCursorMenu)) then {
}];
// handles LMB in cursor mode when action on keyrelease is disabled
((finddisplay 91919) displayctrl 91921) ctrlAddEventHandler ["MouseButtonDown", {
if !(GVAR(actionOnKeyRelease)) then {
if (!GVAR(actionOnKeyRelease) && GVAR(actionSelected)) then {
[GVAR(openedMenuType),true] call FUNC(keyUp);
};
}];