mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Stylistic changes
This commit is contained in:
parent
aa4a5539d4
commit
fc02bb4e06
@ -25,7 +25,7 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
|
||||
GVAR(iconCtrls) pushBack ((findDisplay _displayNum) ctrlCreate ["RscStructuredText", 54021+GVAR(iconCount)]);
|
||||
};
|
||||
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
|
||||
GVAR(iconCount) = GVAR(iconCount) + 1;
|
||||
|
||||
if(_icon == "") then {
|
||||
_icon = DEFAULT_ICON;
|
||||
};
|
||||
@ -38,12 +38,12 @@ _text = if (GVAR(UseListMenu)) then {
|
||||
|
||||
//_ctrl ctrlSetStructuredText parseText _text;
|
||||
[_ctrl, GVAR(iconCount), _text] call FUNC(ctrlSetParsedTextCached);
|
||||
GVAR(iconCount) = GVAR(iconCount) + 1;
|
||||
|
||||
_pos = [];
|
||||
if (GVAR(UseListMenu)) then {
|
||||
_pos = [(_sPos select 0)-(0.0095*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.20*SafeZoneW, 0.035*SafeZoneW];
|
||||
_pos = if (GVAR(UseListMenu)) then {
|
||||
[(_sPos select 0)-(0.0095*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.20*SafeZoneW, 0.035*SafeZoneW]
|
||||
} else {
|
||||
_pos = [(_sPos select 0)-(0.0750*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.15*SafeZoneW, 0.100*SafeZoneW];
|
||||
[(_sPos select 0)-(0.0750*SafeZoneW), (_sPos select 1)-(0.0095*SafeZoneW), 0.15*SafeZoneW, 0.100*SafeZoneW]
|
||||
};
|
||||
|
||||
if (GVAR(cursorKeepCentered) && {uiNamespace getVariable [QGVAR(cursorMenuOpened),false]}) then {
|
||||
|
@ -87,24 +87,17 @@ if (_numChildren == 1) then {
|
||||
};
|
||||
|
||||
// Scale menu based on the amount of children
|
||||
_scaleX = if (GVAR(UseListMenu)) then {
|
||||
_textSize = switch (GVAR(textSize)) do {
|
||||
case (0): {0.75};
|
||||
case (1): {0.875};
|
||||
case (2): {1};
|
||||
case (3): {1.2};
|
||||
case (4): {1.4};
|
||||
};
|
||||
0.17 * _textSize * 1.1
|
||||
_scaleX = 1;
|
||||
_scaleY = 1;
|
||||
|
||||
if (GVAR(UseListMenu)) then {
|
||||
_textSize = [0.75, 0.875, 1, 1.2, 1.4] select GVAR(textSize);
|
||||
_scaleX = _textSize * 0.17 * 1.1;
|
||||
_scaleY = 0.17 * 0.30 * 4/3;
|
||||
} else {
|
||||
_textSize = if (GVAR(textSize) > 2) then {1.3} else {1};
|
||||
_textSize * 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5)
|
||||
};
|
||||
_scaleY = if (GVAR(UseListMenu)) then {
|
||||
0.17 * 0.30 * 4/3
|
||||
} else {
|
||||
_textSize = if (GVAR(textSize) > 2) then {1.3} else {1};
|
||||
_textSize * 0.17 * 4/3 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5)
|
||||
_scaleX = _textSize * 0.17 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5);
|
||||
_scaleY = _textSize * 0.17 * 4/3 * (((0.8 * (0.46 / sin (0.5 * _angleInterval))) min 1.1) max 0.5);
|
||||
};
|
||||
|
||||
// Animate menu scale
|
||||
@ -123,10 +116,10 @@ _angle = _centerAngle - _angleSpan / 2;
|
||||
private ["_offset","_newPos"];
|
||||
_newPos = if (GVAR(UseListMenu)) then {
|
||||
[(_sPos select 0) + _scaleX,
|
||||
(_sPos select 1) + _scaleY * (_foreachindex - _numChildren/2 + 0.5)];
|
||||
(_sPos select 1) + _scaleY * (_foreachindex - _numChildren/2 + 0.5)];
|
||||
} else {
|
||||
[(_sPos select 0) - _scaleX * (cos _angle),
|
||||
(_sPos select 1) + _scaleY * (sin _angle)];
|
||||
(_sPos select 1) + _scaleY * (sin _angle)];
|
||||
};
|
||||
|
||||
//drawLine3D [_pos, _newPos, [1,0,0,0.8]];
|
||||
|
@ -23,17 +23,17 @@ if(GVAR(iconCount) > (count GVAR(iconCtrls))-1) then {
|
||||
};
|
||||
|
||||
_ctrl = GVAR(iconCtrls) select GVAR(iconCount);
|
||||
GVAR(iconCount) = GVAR(iconCount) + 1;
|
||||
|
||||
_pos = [];
|
||||
if (GVAR(UseListMenu)) then {
|
||||
[_ctrl, GVAR(iconCount), format ["<img image='%1' color='#FF0000' size='1.6'/>", _icon]] call FUNC(ctrlSetParsedTextCached);
|
||||
_pos = [(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW];
|
||||
_pos = if (GVAR(UseListMenu)) then {
|
||||
[_ctrl, GVAR(iconCount), format ["<img image='%1' color='#FF0000' size='1.6'/>", _icon]] call FUNC(ctrlSetParsedTextCached);
|
||||
[(_sPos select 0)-(0.014*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.05*SafeZoneW, 0.035*SafeZoneW]
|
||||
} else {
|
||||
[_ctrl, GVAR(iconCount), format ["<img image='%1' color='#FF0000' size='1.6' align='center'/>", _icon]] call FUNC(ctrlSetParsedTextCached);
|
||||
_pos = [(_sPos select 0)-(0.050*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW];
|
||||
[_ctrl, GVAR(iconCount), format ["<img image='%1' color='#FF0000' size='1.6' align='center'/>", _icon]] call FUNC(ctrlSetParsedTextCached);
|
||||
[(_sPos select 0)-(0.050*SafeZoneW), (_sPos select 1)-(0.014*SafeZoneW), 0.1*SafeZoneW, 0.035*SafeZoneW]
|
||||
};
|
||||
|
||||
GVAR(iconCount) = GVAR(iconCount) + 1;
|
||||
|
||||
if (GVAR(cursorKeepCentered) && {uiNamespace getVariable [QGVAR(cursorMenuOpened),false]}) then {
|
||||
_pos set [0, ((_pos select 0) - (GVAR(cursorPos) select 0) + 0.5)];
|
||||
_pos set [1, ((_pos select 1) - (GVAR(cursorPos) select 1) + 0.5)];
|
||||
|
Loading…
Reference in New Issue
Block a user