diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 75c960522b..8d68a34268 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -69,7 +69,12 @@ _recurseFnc = { _showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0; _enableInside = (getNumber (_entryCfg >> "enableInside")) > 0; _canCollapse = (getNumber (_entryCfg >> "canCollapse")) > 0; - _runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0; + _runOnHover = false; + if (isText (_entryCfg >> "runOnHover")) then { + _runOnHover = compile getText (_entryCfg >> "runOnHover"); + } else { + _runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0; + }; _condition = compile _condition; _children = [_entryCfg] call _recurseFnc; diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 10426460d7..b33b06563c 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -53,7 +53,12 @@ _recurseFnc = { _showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0; _enableInside = (getNumber (_entryCfg >> "enableInside")) > 0; _canCollapse = (getNumber (_entryCfg >> "canCollapse")) > 0; - _runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0; + _runOnHover = true; + if (isText (_entryCfg >> "runOnHover")) then { + _runOnHover = compile getText (_entryCfg >> "runOnHover"); + } else { + _runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0; + }; _condition = compile _condition; _children = [_entryCfg] call _recurseFnc; diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 66c9830a0c..55ca280c43 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -89,7 +89,17 @@ if (GVAR(openedMenuType) >= 0) then { // Execute the current action if it's run on hover private "_runOnHover"; - _runOnHover = ((GVAR(selectedAction) select 0) select 9) select 3; + _tmp = ((GVAR(selectedAction) select 0) select 9) select 3; + _runOnHover = true; + if ((typeName _tmp) == "CODE" ) then { + _runOnHover = call _tmp; + } else { + if ((typeName _tmp) == "BOOL" ) then { + _runOnHover = _tmp; + } else { + _runOnHover = _tmp > 0; + }; + }; if (_runOnHover) then { this = GVAR(selectedTarget); _player = ACE_Player;