Execute statement when hovering over actions that open submenus

This commit is contained in:
Nicolás Badano 2015-03-11 00:21:05 -03:00
parent b33127d3b0
commit 722f49acc4
3 changed files with 7 additions and 4 deletions

View File

@ -23,7 +23,7 @@ if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
#ifdef DEBUG_MODE_FULL
diag_log format ["Calculated result: %1 %2", _namespace, _uid];
} else {
diag_log format ["Cached result : %1 %2", _namespace, _uid];
diag_log format ["Cached result : %1 %2", _namespace, _uid];
#endif
};

View File

@ -23,6 +23,7 @@ GVAR(keyDownTime) = 0;
GVAR(lastTime) = diag_tickTime;
GVAR(rotationAngle) = 0;
GVAR(selectedAction) = [[],[]];
GVAR(selectedStatement) = {};
GVAR(actionSelected) = false;
GVAR(selectedTarget) = objNull;

View File

@ -143,7 +143,9 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
_foundTarget = true;
GVAR(actionSelected) = true;
GVAR(selectedTarget) = (_closest select 0) select 0;
GVAR(selectedStatement) = (((_closest select 0) select 1) select 0) select 3;
GVAR(selectedAction) = (_closest select 0) select 1;
GVAR(selectedStatement) = ((GVAR(selectedAction)) select 0) select 3;
_misMatch = false;
_hoverPath = (_closest select 2);
@ -166,8 +168,8 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
GVAR(expanded) = true;
GVAR(menuDepthPath) = +GVAR(lastPath);
// Execute the menu action when it ex
if(GVAR(actionSelected)) then {
// Execute the current action if it's opening a submenu
if (count (GVAR(selectedAction) select 1) > 0) then {
this = GVAR(selectedTarget);
_player = ACE_Player;
_target = GVAR(selectedTarget);