ACE3/addons/medical_menu/functions/fnc_updateIcons.sqf

36 lines
902 B
Plaintext
Raw Normal View History

/*
* Author: Glowbal
* Update the category icons
2015-08-02 14:56:27 +00:00
*
* Arguments:
2015-08-07 03:37:41 +00:00
* None
*
* Return Value:
2015-08-07 03:37:41 +00:00
* None
*
* Example:
* [] call ace_medical_menu_fnc_updateIcons
*
* Public: No
2015-08-02 14:56:27 +00:00
*/
#include "script_component.hpp"
2015-08-07 03:37:41 +00:00
#define START_IDC 111
#define END_IDC 118
private ["_display", "_idc", "_options", "_amount"];
2015-08-07 03:37:41 +00:00
2015-08-02 14:56:27 +00:00
disableSerialization;
2015-08-07 03:37:41 +00:00
_display = uiNamespace getVariable QGVAR(medicalMenu);
2015-08-02 14:56:27 +00:00
_options = ["triage" , "examine", "bandage", "medication", "airway", "advanced", "drag", "toggle"];
2015-08-07 03:37:41 +00:00
for "_idc" from START_IDC to END_IDC step 1 do {
_amount = [ACE_player, GVAR(INTERACTION_TARGET), _options select (_idc - START_IDC)] call FUNC(getTreatmentOptions);
if ((count _amount) > 0 || _idc == START_IDC || _idc == END_IDC) then {
(_display displayCtrl _idc) ctrlSettextColor [1, 1, 1, 1];
2015-08-02 14:56:27 +00:00
} else {
2015-08-07 03:37:41 +00:00
(_display displayCtrl _idc) ctrlSettextColor [0.4, 0.4, 0.4, 1];
2015-08-02 14:56:27 +00:00
};
2015-08-07 03:37:41 +00:00
};