From 18f61ca2ddc0a1a5637107302b62db52e864a73f Mon Sep 17 00:00:00 2001 From: BlackHawkPL Date: Sun, 11 Feb 2018 03:18:29 +0100 Subject: [PATCH] made icons smaller, using backup unit description --- xeh_postinit.sqf | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/xeh_postinit.sqf b/xeh_postinit.sqf index 759a319..855a18d 100644 --- a/xeh_postinit.sqf +++ b/xeh_postinit.sqf @@ -27,9 +27,9 @@ private _newIndex = player createDiarySubject ["GearIndex","Loadouts"]; // Creating briefing text _textToDisplay = _textToDisplay + format ["", rank _unit]; _textToDisplay = _textToDisplay + - format [" %1 %2 - %3kg
", + format [" %1 - %2 - %3kg
", name _unit, - ((roleDescription _unit) splitString "@") select 0, + if (((roleDescription _unit) find "@") != -1) then {((roleDescription _unit) splitString "@") select 0} else {getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName")}, round ((loadAbs _unit) *0.1 * 0.45359237 * 10) / 10, toLower rank _unit, if (_unit == player) then {"#5555FF"} else {"#FFFFFF"} @@ -41,11 +41,11 @@ private _newIndex = player createDiarySubject ["GearIndex","Loadouts"]; if (_name == "") then { _name = getText(configFile >> "CfgVehicles" >> _this >> "displayName"); }; - _pic = [_this, [50, 50]] call _getPicture; + _pic = [_this, [40, 40]] call _getPicture; if (_pic == "") then { - _pic = [_this, [50, 50], "CfgVehicles"] call _getPicture; + _pic = [_this, [40, 40], "CfgVehicles"] call _getPicture; }; - _pic + format ["* ", _name] + _pic + format ["* ", _name] } else { "" @@ -64,10 +64,10 @@ private _newIndex = player createDiarySubject ["GearIndex","Loadouts"]; params ["_weaponName", "_weaponItems"]; private _str = ""; if (_weaponName != "") then { - _str = _str + ([_weaponName, [100, 50]] call _getPicture); + _str = _str + ([_weaponName, [80, 40]] call _getPicture); { if (_x != "") then { - _str = _str + ([_x, [50, 50]] call _getPicture); + _str = _str + ([_x, [40, 40]] call _getPicture); }; } forEach _weaponItems; }; @@ -142,7 +142,7 @@ private _newIndex = player createDiarySubject ["GearIndex","Loadouts"]; private _allItems = items _unit; { - if ((toLower _x) find "acre" != -1) then { + if ((toLower _x) find "acre_" != -1) then { _radios pushBack _x; }; } forEach _allItems; @@ -195,15 +195,23 @@ UO_showOrbat = { if (side _x == side player && !isNull leader _x && {isPlayer leader _x}) then { _text = _text + format ["%1", groupID _x] + "
"; { + private _radios = ""; + { + if ((toLower _x) find "acre_" != -1) then { + _radios = _radios + ([_x, [28,28]] call _getPicture); + }; + } forEach items _x; + _text = _text + - format ["%7 %1 %2 %4 %5
", + format ["%7 %1 | %2 | %8 %4 %5
", name _x, - ((roleDescription _x) splitString "@") select 0, + if (((roleDescription _x) find "@") != -1) then {((roleDescription _x) splitString "@") select 0} else {getText (configFile >> "CfgVehicles" >> typeOf _x >> "displayName")}, rank _x, - [primaryWeapon _x, [64,32]] call _getPicture, - [secondaryWeapon _x, [64,32]] call _getPicture, + [primaryWeapon _x, [56,28]] call _getPicture, + [secondaryWeapon _x, [56,28]] call _getPicture, if (_x == player) then {"#5555FF"} else {"#FFFFFF"}, - if (_forEachIndex == 0) then {""} else {" "} + if (_forEachIndex == 0) then {""} else {" "}, + _radios ]; } forEach [leader _x] + (units _x - [leader _x]); _text = _text + "
"