From 0fd783082dfdc11922f88ba0432ea828d5ac1533 Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 2 May 2015 22:53:23 +0200 Subject: [PATCH 1/2] don't close menu when no action is selected --- addons/interact_menu/functions/fnc_handlePlayerChanged.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf index cff8bb1048..cb21d218db 100644 --- a/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf +++ b/addons/interact_menu/functions/fnc_handlePlayerChanged.sqf @@ -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); From f44aaee7c79cf8e44ce36f4f6ee4a7a7265d54fc Mon Sep 17 00:00:00 2001 From: commy2 Date: Sat, 2 May 2015 23:02:40 +0200 Subject: [PATCH 2/2] also in cursor mode --- addons/interact_menu/functions/fnc_keyDown.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index d4e460c10f..464466ae3a 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -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); }; }];