mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed opacity of icons; removed debug traces
This commit is contained in:
parent
310710b6e2
commit
3d8854f84a
@ -161,8 +161,6 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
|
|||||||
GVAR(menuDepthPath) = +GVAR(lastPath);
|
GVAR(menuDepthPath) = +GVAR(lastPath);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
//diag_log format ["GVAR(menuDepthPath): %1", GVAR(menuDepthPath)];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!_foundTarget && GVAR(actionSelected)) then {
|
if(!_foundTarget && GVAR(actionSelected)) then {
|
||||||
|
@ -64,7 +64,7 @@ _menuInSelectedPath = true;
|
|||||||
// ARGB Color (First Hex Pair is transparancy)
|
// ARGB Color (First Hex Pair is transparancy)
|
||||||
_color = "#FFFFFFFF";
|
_color = "#FFFFFFFF";
|
||||||
if(_menuDepth > 0 && !_menuInSelectedPath) then {
|
if(_menuDepth > 0 && !_menuInSelectedPath) then {
|
||||||
_color = format ["#%1FFFFFF", [255 min (255 * (((GVAR(renderDepth)/_menuDepth)) max 0.25))] call EFUNC(common,toHex)];
|
_color = format ["#%1FFFFFF", [255 * (((GVAR(renderDepth)/_menuDepth)) max 0.25)] call EFUNC(common,toHex)];
|
||||||
};
|
};
|
||||||
[_actionData select 0, _color, _pos, 1, 1, 0, _actionData select 1, 0.5, 0.025, "TahomaB"] call FUNC(renderIcon);
|
[_actionData select 0, _color, _pos, 1, 1, 0, _actionData select 1, 0.5, 0.025, "TahomaB"] call FUNC(renderIcon);
|
||||||
|
|
||||||
@ -72,15 +72,9 @@ if(_menuDepth > 0 && !_menuInSelectedPath) then {
|
|||||||
GVAR(currentOptions) pushBack [_this, _pos, _path];
|
GVAR(currentOptions) pushBack [_this, _pos, _path];
|
||||||
|
|
||||||
_currentRenderDepth = GVAR(renderDepth);
|
_currentRenderDepth = GVAR(renderDepth);
|
||||||
GVAR(renderDepth) = GVAR(renderDepth) + 1;
|
|
||||||
|
|
||||||
//systemChat format ["Menu %1, _menuInSelectedPath: %2", _actionData select 8, _menuInSelectedPath];
|
|
||||||
|
|
||||||
// Exit without rendering children if it isn't
|
// Exit without rendering children if it isn't
|
||||||
if !(_menuInSelectedPath) exitWith {
|
if !(_menuInSelectedPath) exitWith {};
|
||||||
//diag_log text format ["Exiting on _path: %1",_path];
|
|
||||||
//diag_log text format ["GVAR(menuDepthPath): %1",GVAR(menuDepthPath)];
|
|
||||||
};
|
|
||||||
|
|
||||||
// Collect all active children actions
|
// Collect all active children actions
|
||||||
private "_activeChildren";
|
private "_activeChildren";
|
||||||
@ -99,10 +93,6 @@ _activeChildren = [];
|
|||||||
{
|
{
|
||||||
_actionItem = _x;
|
_actionItem = _x;
|
||||||
|
|
||||||
/*diag_log text format ["_path: %1",_path];
|
|
||||||
diag_log text format ["(_actionItem select 8): %1",(_actionItem select 8)];
|
|
||||||
diag_log text format ["(_actionData select 8): %1",(_actionData select 8)];*/
|
|
||||||
|
|
||||||
// Check if the action is children of the selected menu
|
// Check if the action is children of the selected menu
|
||||||
if ((count (_actionItem select 8)) == (count _path)) then {
|
if ((count (_actionItem select 8)) == (count _path)) then {
|
||||||
// Compare parent path to see if it's a suitable child
|
// Compare parent path to see if it's a suitable child
|
||||||
@ -133,8 +123,6 @@ if (_angleSpan >= 305) then {
|
|||||||
|
|
||||||
_angle = _centerAngle - _angleSpan / 2;
|
_angle = _centerAngle - _angleSpan / 2;
|
||||||
|
|
||||||
//systemChat format ["Menu %1, _numA: %2, _aSpan: %3", _actionData select 8, count _activeChildren, _angleSpan];
|
|
||||||
|
|
||||||
{
|
{
|
||||||
_target = _object;
|
_target = _object;
|
||||||
_player = ACE_player;
|
_player = ACE_player;
|
||||||
@ -144,7 +132,10 @@ _angle = _centerAngle - _angleSpan / 2;
|
|||||||
_newPos = _pos vectorAdd (_offset vectorMultiply _mod);
|
_newPos = _pos vectorAdd (_offset vectorMultiply _mod);
|
||||||
|
|
||||||
// drawLine3D [_pos, _newPos, [1,0,0,0.5]];
|
// drawLine3D [_pos, _newPos, [1,0,0,0.5]];
|
||||||
|
|
||||||
|
GVAR(renderDepth) = _currentRenderDepth + 1;
|
||||||
[_object, _x, _forEachIndex, [_angle, 140], _newPos] call FUNC(renderMenu);
|
[_object, _x, _forEachIndex, [_angle, 140], _newPos] call FUNC(renderMenu);
|
||||||
|
GVAR(renderDepth) = _currentRenderDepth;
|
||||||
|
|
||||||
if (_angleSpan == 360) then {
|
if (_angleSpan == 360) then {
|
||||||
_angle = _angle + _angleSpan / (count _activeChildren);
|
_angle = _angle + _angleSpan / (count _activeChildren);
|
||||||
@ -152,5 +143,3 @@ _angle = _centerAngle - _angleSpan / 2;
|
|||||||
_angle = _angle + _angleSpan / (((count _activeChildren)-1) max 1);
|
_angle = _angle + _angleSpan / (((count _activeChildren)-1) max 1);
|
||||||
};
|
};
|
||||||
} forEach _activeChildren;
|
} forEach _activeChildren;
|
||||||
|
|
||||||
GVAR(renderDepth) = GVAR(renderDepth) - 1;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user