mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
reduce size of the menu
This commit is contained in:
parent
0dfeb22ec8
commit
41145e5731
@ -19,9 +19,10 @@ if(count _sPos > 0) then {
|
||||
if(_icon == "") then {
|
||||
_icon = DEFAULT_ICON;
|
||||
};
|
||||
_text = format ["<img image='%1' color='%2'/><t color ='%3'>%4</t>", _icon, _color, _color, _text];
|
||||
_text = format ["<img image='%1' color='%2'/><t color ='%3' size='0.75'>%4</t>", _icon, _color, _color, _text];
|
||||
_ctrl ctrlSetStructuredText (parseText _text);
|
||||
_ctrl ctrlSetPosition [(_sPos select 0)-(0.011*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.4*SafeZoneW, 0.025*SafeZoneW];
|
||||
|
||||
// _ctrl ctrlSetBackgroundColor [1,0,0,1];
|
||||
_ctrl ctrlCommit 0;
|
||||
};
|
||||
|
@ -55,7 +55,7 @@ if(_cursorScreenPos distance _pos <= _distance) then {
|
||||
systemChat format ["Menu %1, _numActions: %2", _actionData select 0, _numActions];
|
||||
|
||||
private "_angleSpan";
|
||||
_angleSpan = _maxAngleSpan min (35 * (_numActions - 1));
|
||||
_angleSpan = _maxAngleSpan min (55 * (_numActions - 1));
|
||||
|
||||
private "_angle";
|
||||
_angle = _centerAngle - _angleSpan / 2;
|
||||
@ -68,15 +68,20 @@ if(_cursorScreenPos distance _pos <= _distance) then {
|
||||
if(_active) then {
|
||||
//systemChat format ["_angle: %1", _angle];
|
||||
_offset = [GVAR(vecLineMap), _angle] call FUNC(rotateVectLine);
|
||||
_mod = 0.4 max (0.15 * (_cursorScreenPos distance _pos)); //0.5;//0.1*_distance;
|
||||
_mod = 0.15 max (0.15 * (_cursorScreenPos distance _pos)); //0.5;//0.1*_distance;
|
||||
_newPos = [
|
||||
(_pos select 0) + ((_offset select 0)*_mod),
|
||||
(_pos select 1) + ((_offset select 1)*_mod),
|
||||
(_pos select 2) + ((_offset select 2)*_mod)
|
||||
];
|
||||
// drawLine3D [_pos, _newPos, [1,0,0,0.5]];
|
||||
[_object, _x, _forEachIndex, [_angle, 180], _newPos, _path] call FUNC(renderMenu);
|
||||
_angle = _angle + _angleSpan / ((_numActions-1) max 1);
|
||||
[_object, _x, _forEachIndex, [_angle, 170], _newPos, _path] call FUNC(renderMenu);
|
||||
|
||||
if (_angle == 360) then {
|
||||
_angle = _angle + _angleSpan / _numActions;
|
||||
} else {
|
||||
_angle = _angle + _angleSpan / ((_numActions-1) max 1);
|
||||
};
|
||||
};
|
||||
} forEach (_actionData select 6);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user