Various tweaks on interact_menu styling to improve usability

This commit is contained in:
Nicolás Badano 2015-03-24 00:15:22 -03:00
parent 70ffefde10
commit 17d0c0ae38
3 changed files with 8 additions and 9 deletions

View File

@ -35,8 +35,8 @@ GVAR(iconCount) = GVAR(iconCount) + 1;
if(_icon == "") then {
_icon = DEFAULT_ICON;
};
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color ='%3' size='0.75' align='center'>%4</t>", _icon, _color, _color, _text];
_text = format ["<img image='%1' color='%2' align='center'/><br/><t color='%3' size='0.80' align='center'>%4</t>", _icon, _color, _color, _text];
_ctrl ctrlSetStructuredText (parseText _text);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.2*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.4*SafeZoneW, 0.035*SafeZoneW];
_ctrl ctrlSetPosition [(_sPos select 0)-(0.08*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.16*SafeZoneW, 0.05*SafeZoneW];
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];
_ctrl ctrlCommit 0;

View File

@ -85,15 +85,14 @@ if (_angleSpan < 360) then {
_angleInterval = _angleSpan / (_numChildren - 1);
};
} else {
_angleSpan / (_numChildren);
_angleInterval = _angleSpan / (_numChildren);
};
if (_numChildren == 1) then {
_angleInterval = 60;
_angleInterval = 55;
};
// Scale menu based on the amount of children
GVAR(menuScale) = 0.15;
_scale = GVAR(menuScale) * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.4) max 0.5);
_scale = 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5);
// Animate menu scale
if (_menuInSelectedPath && (_menuDepth == count _path)) then {
_scale = _scale * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * 8) min 1));
@ -112,7 +111,7 @@ _angle = _centerAngle - _angleSpan / 2;
//drawLine3D [_pos, _newPos, [1,0,0,0.8]];
//END_COUNTER(children);
[_path, _x, _newPos, [_angle, 140]] call FUNC(renderMenu);
[_path, _x, _newPos, [_angle, 150]] call FUNC(renderMenu);
_angle = _angle + _angleInterval;
} forEach _activeChildren;

View File

@ -24,7 +24,7 @@ private "_ctrl";
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
GVAR(iconCount) = GVAR(iconCount) + 1;
_ctrl ctrlSetStructuredText (parseText format ["<img image='%1' color='#FF0000' size='1.5' align='center'/>", _icon]);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.2*SafeZoneW), (_sPos select 1)-(0.012*SafeZoneW), 0.4*SafeZoneW, 0.035*SafeZoneW];
_ctrl ctrlSetStructuredText (parseText format ["<img image='%1' color='#FF0000' size='1.6' align='center'/>", _icon]);
_ctrl ctrlSetPosition [(_sPos select 0)-(0.05*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW];
//_ctrl ctrlSetBackgroundColor [1, 0, 0, 0.1];
_ctrl ctrlCommit 0;