#828 - Private Variables for Interact Menu

This commit is contained in:
PabstMirror 2015-04-29 01:26:13 -05:00
parent a80e11d025
commit d7d43ce3b1
15 changed files with 18 additions and 15 deletions

View File

@ -8,7 +8,7 @@ GVAR(ParsedTextCached) = [];
//Setup text/shadow color matrix
[] call FUNC(setupTextColors);
["SettingChanged", {
PARAMS_2(_name,_value);
PARAMS_1(_name);
if ((_name == QGVAR(colorTextMax)) || {_name == QGVAR(colorTextMin)} || {_name == QGVAR(colorShadowMax)} || {_name == QGVAR(colorShadowMin)}) then {
[] call FUNC(setupTextColors);
};

View File

@ -26,8 +26,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction", "_i"];
EXPLODE_1_PVT(_this,_actionsCfg);
_actions = [];

View File

@ -14,7 +14,7 @@
EXPLODE_1_PVT(_this,_target);
private ["_objectType","_actionsVarName"];
private ["_objectType","_actionsVarName", "_canCollapse", "_children", "_enableInside", "_entry", "_entryCfg", "_i", "_insertChildren", "_modifierFunction", "_runOnHover"];
_objectType = _target;
if (typeName _target == "OBJECT") then {
_objectType = typeOf _target;
@ -26,7 +26,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled",
private ["_actions", "_displayName", "_icon", "_statement", "_condition", "_showDisabled",
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg);
_actions = [];

View File

@ -28,6 +28,7 @@
EXPLODE_5_PVT(_this,_actionName,_displayName,_icon,_statement,_condition);
// IGNORE_PRIVATE_WARNING(_target);
private ["_insertChildren","_customParams","_position","_distance","_params", "_modifierFunction"];
_insertChildren = if (count _this > 5) then {

View File

@ -19,7 +19,7 @@
EXPLODE_2_PVT(_this,_actionTreeList,_parentPath);
private ["_parentNode", "_foundParentNode", "_fnc_findFolder"];
private ["_parentNode", "_foundParentNode", "_fnc_findFolder", "_actionTree"];
// Hack to make this work on the root node too
if (count _parentPath == 0) exitWith {

View File

@ -19,7 +19,7 @@
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath);
private ["_res","_varName","_actionTrees"];
private ["_res","_varName","_actionTrees", "_actionIndex", "_parentLevel", "_parentNode"];
_res = _fullPath call FUNC(splitPath);
EXPLODE_2_PVT(_res,_parentPath,_actionName);

View File

@ -14,7 +14,7 @@
BEGIN_COUNTER(fnc_render);
private ["_cursorPos1", "_cursorPos2", "_cursorVec", "_p1", "_p2", "_p", "_v", "_cp", "_forEachIndex", "_renderTargets", "_x", "_cursorScreenPos", "_closestDistance", "_closestSelection", "_pos", "_sPos", "_disSq", "_closest", "_cTime", "_delta", "_foundTarget", "_misMatch", "_hoverPath", "_i"];
private ["_cursorPos1", "_cursorPos2", "_p1", "_p2", "_forEachIndex", "_x", "_cursorScreenPos", "_closestDistance", "_closestSelection", "_sPos", "_disSq", "_closest", "_cTime", "_delta", "_foundTarget", "_misMatch", "_hoverPath", "_i", "_actionData", "_player", "_target"];
_foundTarget = false;
_cursorPos1 = positionCameraToWorld [0, 0, 0];
_cursorPos2 = positionCameraToWorld [0, 0, 2];

View File

@ -14,7 +14,7 @@
GVAR(currentOptions) = [];
private ["_player","_numInteractObjects","_numInteractions","_actionsVarName","_classActions","_objectActions","_target","_player","_action","_actionData","_active","_cameraPos","_cameraDir"];
private ["_player","_numInteractObjects","_numInteractions","_actionsVarName","_classActions","_target","_player","_action","_cameraPos","_cameraDir", "_lambda", "_nearestObjects", "_pos"];
_player = ACE_player;
_fnc_renderNearbyActions = {

View File

@ -16,7 +16,7 @@
BEGIN_COUNTER(fnc_renderBaseMenu)
private ["_distance","_pos","_weaponDir","_ref","_cameraPos","_sPos","_activeActionTree"];
private ["_distance","_pos","_weaponDir","_ref","_sPos","_activeActionTree", "_line"];
EXPLODE_2_PVT(_this,_object,_baseActionNode);
EXPLODE_1_PVT(_baseActionNode,_actionData);

View File

@ -17,7 +17,7 @@
*/
#include "script_component.hpp"
#define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa)
private ["_ctrl", "_pos"];
private ["_ctrl", "_pos", "_displayNum"];
PARAMS_6(_text,_icon,_sPos,_textColor,_shadowColor,_iconColor);
//systemChat format ["Icon %1 - %2,%3", _text, _sPos select 0, _sPos select 1];

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
private ["_menuInSelectedPath", "_path", "_menuDepth", "_currentRenderDepth", "_x", "_offset", "_newPos", "_forEachIndex"];
private ["_menuInSelectedPath", "_path", "_menuDepth", "_x", "_offset", "_newPos", "_forEachIndex", "_player", "_pos", "_shadowColor", "_target", "_textColor"];
EXPLODE_4_PVT(_this,_parentPath,_action,_sPos,_angles);
EXPLODE_3_PVT(_action,_actionData,_activeChildren,_actionObject);

View File

@ -15,12 +15,13 @@
EXPLODE_2_PVT(_this,_sPos,_icon);
private ["_displayNum", "_ctrl", "_pos"];
if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
_displayNum = [[46, 12] select visibleMap,91919] select (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]);
GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]);
};
private ["_ctrl", "_pos"];
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
GVAR(iconCount) = GVAR(iconCount) + 1;

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
private ["_mixColor", "_rowT", "_rowS", "_menuDepth", "_pathCount", "_menuInSelectedPath", "_color", "_path"];
private ["_mixColor", "_rowT", "_rowS", "_menuDepth", "_pathCount"];
//Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text
_mixColor = {

View File

@ -13,7 +13,7 @@
*/
#include "script_component.hpp"
private ["_parentPath","_actionName"];
private ["_parentPath","_actionName", "_i"];
_parentPath = [];
for [{_i = 0},{_i < (count _this) - 1},{_i = _i + 1}] do {
_parentPath pushBack (_this select _i);

View File

@ -1,6 +1,8 @@
#define COMPONENT interact_menu
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
#ifdef DEBUG_ENABLED_INTERACT_MENU
#define DEBUG_MODE_FULL
#endif