2015-01-18 18:38:27 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
ADDON = false;
|
|
|
|
|
2015-03-20 02:32:44 +00:00
|
|
|
PREP(addActionToClass);
|
|
|
|
PREP(addActionToObject);
|
2015-02-19 21:03:14 +00:00
|
|
|
PREP(compileMenu);
|
|
|
|
PREP(compileMenuSelfAction);
|
2015-03-03 02:29:57 +00:00
|
|
|
PREP(collectActiveActionTree);
|
2015-03-19 16:00:10 +00:00
|
|
|
PREP(createAction);
|
2015-04-25 11:28:21 +00:00
|
|
|
PREP(ctrlSetParsedTextCached);
|
2015-03-20 02:32:44 +00:00
|
|
|
PREP(findActionNode);
|
2015-04-15 04:20:20 +00:00
|
|
|
PREP(handlePlayerChanged);
|
2015-03-21 12:37:01 +00:00
|
|
|
PREP(isSubPath);
|
2015-01-18 18:38:27 +00:00
|
|
|
PREP(keyDown);
|
|
|
|
PREP(keyUp);
|
2015-03-20 02:32:44 +00:00
|
|
|
PREP(removeActionFromClass);
|
|
|
|
PREP(removeActionFromObject);
|
2015-02-19 21:03:14 +00:00
|
|
|
PREP(render);
|
2015-03-24 15:27:27 +00:00
|
|
|
PREP(renderActionPoints);
|
2015-03-03 02:29:57 +00:00
|
|
|
PREP(renderBaseMenu);
|
2015-03-20 02:32:44 +00:00
|
|
|
PREP(renderIcon);
|
2015-02-19 21:03:14 +00:00
|
|
|
PREP(renderMenu);
|
2015-03-23 21:08:31 +00:00
|
|
|
PREP(renderSelector);
|
2015-04-20 23:28:01 +00:00
|
|
|
PREP(setupTextColors);
|
2015-03-20 02:32:44 +00:00
|
|
|
PREP(splitPath);
|
2015-01-18 18:38:27 +00:00
|
|
|
|
2015-05-02 04:33:28 +00:00
|
|
|
// Event handlers for all interact menu controls
|
|
|
|
DFUNC(handleMouseMovement) = {
|
|
|
|
if (GVAR(cursorKeepCentered)) then {
|
|
|
|
GVAR(cursorPos) = GVAR(cursorPos) vectorAdd [_this select 1, _this select 2, 0] vectorDiff [0.5, 0.5, 0];
|
|
|
|
setMousePosition [0.5, 0.5];
|
|
|
|
} else {
|
|
|
|
GVAR(cursorPos) = [_this select 1, _this select 2, 0];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
DFUNC(handleMouseButtonDown) = {
|
|
|
|
if !(GVAR(actionOnKeyRelease)) then {
|
|
|
|
[GVAR(openedMenuType),true] call FUNC(keyUp);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-01-18 18:38:27 +00:00
|
|
|
GVAR(keyDown) = false;
|
2015-02-18 21:58:06 +00:00
|
|
|
GVAR(keyDownSelfAction) = false;
|
2015-01-18 18:38:27 +00:00
|
|
|
GVAR(keyDownTime) = 0;
|
2015-03-24 15:27:27 +00:00
|
|
|
GVAR(openedMenuType) = -1;
|
2015-01-18 18:38:27 +00:00
|
|
|
|
2015-05-21 16:42:44 +00:00
|
|
|
GVAR(lastTime) = ACE_diagTime;
|
2015-01-18 18:38:27 +00:00
|
|
|
GVAR(rotationAngle) = 0;
|
|
|
|
|
2015-03-11 03:21:05 +00:00
|
|
|
GVAR(selectedAction) = [[],[]];
|
2015-01-18 18:38:27 +00:00
|
|
|
GVAR(actionSelected) = false;
|
|
|
|
GVAR(selectedTarget) = objNull;
|
|
|
|
|
|
|
|
GVAR(menuDepthPath) = [];
|
|
|
|
GVAR(lastPos) = [0,0,0];
|
|
|
|
|
|
|
|
GVAR(currentOptions) = [];
|
|
|
|
|
|
|
|
GVAR(lastPath) = [];
|
|
|
|
|
|
|
|
GVAR(expanded) = false;
|
|
|
|
|
2015-05-21 16:42:44 +00:00
|
|
|
GVAR(startHoverTime) = ACE_diagTime;
|
|
|
|
GVAR(expandedTime) = ACE_diagTime;
|
2015-01-18 18:38:27 +00:00
|
|
|
GVAR(iconCtrls) = [];
|
|
|
|
GVAR(iconCount) = 0;
|
|
|
|
|
2015-05-02 17:37:58 +00:00
|
|
|
GVAR(collectedActionPoints) = [];
|
2015-04-20 04:16:51 +00:00
|
|
|
GVAR(foundActions) = [];
|
|
|
|
GVAR(lastTimeSearchedActions) = -1000;
|
|
|
|
|
2015-05-18 18:37:05 +00:00
|
|
|
|
|
|
|
// Init CAManBase menus
|
|
|
|
["CAManBase"] call FUNC(compileMenu);
|
|
|
|
["CAManBase"] call FUNC(compileMenuSelfAction);
|
|
|
|
|
2015-01-29 07:38:46 +00:00
|
|
|
ADDON = true;
|