From a3a91d4f45b22fd487ecbc954ad979be5d03efdd Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:38:09 +0300 Subject: init --- Client/Functions/Client_UIFillListTeamOrders.sqf | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Client/Functions/Client_UIFillListTeamOrders.sqf (limited to 'Client/Functions/Client_UIFillListTeamOrders.sqf') diff --git a/Client/Functions/Client_UIFillListTeamOrders.sqf b/Client/Functions/Client_UIFillListTeamOrders.sqf new file mode 100644 index 0000000..8d3a0f8 --- /dev/null +++ b/Client/Functions/Client_UIFillListTeamOrders.sqf @@ -0,0 +1,42 @@ +Private ['_color','_extra','_i','_isVehicle','_listBox','_listContent','_pic','_unit']; +_listContent = _this select 0; +_listBox = _this select 1; +_i = 0; +_pic = ""; + +lnbClear _listBox; + +{ + _unit = vehicle _x; + _isVehicle = if (_x != _unit) then {true} else {false}; + + _color = []; + _extra = ""; + if (round(((getDammage _unit)*-100)+100) < 75) then { + _color = [0.875, 0.5, 0, 1]; + _extra = "[Injured] "; + if (round(((getDammage _unit)*-100)+100) < 50) then { + _extra = "[Injured] "; + _color = [0.875, 0, 0, 1]; + if !(alive _x) then {_extra = "[Dead]"}; + }; + }; + if (count _color == 0 && _isVehicle) then { + if !(canMove _unit) then { + _extra = "[Immobilized] "; + _color = [0.875, 0.875, 0, 1]; + }; + }; + + lnbAddRow [_listBox,[str(round(((getDammage _unit)*-100)+100)) + "%",_extra+"("+([typeOf _unit, 'displayName'] Call GetConfigInfo)+") "+name _x]]; + _pic = if (_isVehicle) then {[typeOf _unit, 'picture'] Call GetConfigInfo} else {[typeOf _unit, 'portrait'] Call GetConfigInfo}; + lnbSetPicture [_listBox,[_i,1],_pic]; + + if (count _color > 0) then { + lnbSetColor [_listBox,[_i,0],_color]; + lnbSetColor [_listBox,[_i,1],_color]; + }; + _i = _i + 1; +} forEach _listContent; + +if (_i > 0) then {lnbSetCurSelRow [_listBox,0]} else {lnbSetCurSelRow [_listBox,-1]}; \ No newline at end of file -- cgit v1.3.1