2015-03-10 20:12:35 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Display triage card for a unit
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* nil
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-04-30 06:17:26 +00:00
|
|
|
private ["_show", "_ctrl", "_display", "_idc", "_pos"];
|
2015-03-10 20:12:35 +00:00
|
|
|
_show = _this select 0;
|
|
|
|
disableSerialization;
|
|
|
|
|
|
|
|
_display = uiNamespace getvariable QGVAR(triageCard);
|
|
|
|
if (isnil "_display") exitwith {};
|
|
|
|
|
|
|
|
_pos = [0,0,0,0];
|
|
|
|
if (_show) then {
|
2015-04-06 16:22:43 +00:00
|
|
|
_pos = ctrlPosition (_display displayCtrl 2001);
|
2015-03-10 20:12:35 +00:00
|
|
|
};
|
2015-03-21 13:40:26 +00:00
|
|
|
for "_idc" from 2002 to 2006 step 1 do {
|
2015-04-06 16:22:43 +00:00
|
|
|
_pos set [1, (_pos select 1) + (_pos select 3)];
|
|
|
|
_ctrl = (_display displayCtrl _idc);
|
|
|
|
_ctrl ctrlSetPosition _pos;
|
|
|
|
_ctrl ctrlCommit 0;
|
2015-03-10 20:12:35 +00:00
|
|
|
};
|