mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #1415 from GitHawk/master
runOnHover can now be CODE & SurgicalKits
This commit is contained in:
commit
8f15856084
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user