2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2015-03-10 20:12:35 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Display triage card for a unit
|
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-22 14:25:10 +00:00
|
|
|
* 0: Show <BOOL>
|
2015-03-10 20:12:35 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-22 14:25:10 +00:00
|
|
|
* None
|
2015-03-10 20:12:35 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [true] call ace_medical_fnc_dropDownTriageCard
|
|
|
|
*
|
2015-03-10 20:12:35 +00:00
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_show"];
|
2015-03-10 20:12:35 +00:00
|
|
|
|
2016-06-13 12:27:43 +00:00
|
|
|
disableSerialization;
|
|
|
|
private _display = uiNamespace getVariable QGVAR(triageCard);
|
2015-11-30 16:22:16 +00:00
|
|
|
if (isNil "_display") exitWith {};
|
2015-03-10 20:12:35 +00:00
|
|
|
|
2016-06-13 12:27:43 +00:00
|
|
|
private _pos = [0,0,0,0];
|
2015-03-10 20:12:35 +00:00
|
|
|
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)];
|
2016-06-13 12:27:43 +00:00
|
|
|
private _ctrl = (_display displayCtrl _idc);
|
2015-04-06 16:22:43 +00:00
|
|
|
_ctrl ctrlSetPosition _pos;
|
|
|
|
_ctrl ctrlCommit 0;
|
2015-03-10 20:12:35 +00:00
|
|
|
};
|