ACE3/addons/medical/functions/fnc_updateIcons.sqf
2015-01-18 22:16:35 +01:00

27 lines
801 B
Plaintext

/**
* fn_updateIcons.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
private ["_display","_startIDC","_idc","_options","_name","_amount"];
disableSerialization;
_display = uiNamespace getVariable QGVAR(medicalMenu);
_startIDC = 111;
_options = ["triage" , "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"];
for "_idc" from _startIDC to 118 step 1 do {
_amount = [ACE_player, GVAR(INTERACTION_TARGET), _options select (_idc - 111)] call FUNC(getTreatmentOptions);
if ((count _amount) > 0 || _idc == 111 || _idc == 118) then {
(_display displayCtrl _idc) ctrlSettextColor [1,1,1,1];
} else {
(_display displayCtrl _idc) ctrlSettextColor [0.4,0.4,0.4,1];
};
};