diff --git a/AUTHORS.txt b/AUTHORS.txt index 05db46c820..2cb4488680 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -60,6 +60,7 @@ Coren Crusty Dharma Bellamkonda Dimaslg +diwako dixon13 Drill Dudakov aka [OMCB]Kaban diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp index e6fa31112d..8f5a39e107 100644 --- a/addons/medical/XEH_PREP.hpp +++ b/addons/medical/XEH_PREP.hpp @@ -111,6 +111,7 @@ PREP(moduleAssignMedicalVehicle); PREP(moduleAssignMedicalFacility); PREP(copyDeadBody); PREP(unconsciousPFH); +PREP(updateTourniquets); // Networked litter PREP(createLitter); diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 3058dd82bf..d506c09c50 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -145,6 +145,9 @@ if (_show) then { (_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0]; } foreach _selectionBloodLoss; + // update tourniquet information + [_display, _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]] call FUNC(updateTourniquets); + private _lbCtrl = (_display displayCtrl 200); lbClear _lbCtrl; { diff --git a/addons/medical/functions/fnc_updateTourniquets.sqf b/addons/medical/functions/fnc_updateTourniquets.sqf new file mode 100644 index 0000000000..3065ea4f07 --- /dev/null +++ b/addons/medical/functions/fnc_updateTourniquets.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: diwako + * Update tourniquets on the body image on the menu. + * + * Arguments: + * 0: Display + * 1: Tourniquets + * + * Return Value: + * None + * + * Example: + * [some_display, [0,0,0,0,0,0]] call ace_medical_fnc_updateTourniquets + * + * Public: No + */ + +params ["_display", "_tourniquets"]; + +// Handle tourniquets +private _availableSelections = [0, 0, 56, 57, 58, 59]; +for "_i" from 2 to 5 do { + private _tourn = _tourniquets select _i; + (_display displayCtrl (_availableSelections select _i)) ctrlSetTextColor [0, 0, 0.8, _tourn]; +}; diff --git a/addons/medical/ui/RscTitles.hpp b/addons/medical/ui/RscTitles.hpp index 3f9113a9d2..00182d24dd 100644 --- a/addons/medical/ui/RscTitles.hpp +++ b/addons/medical/ui/RscTitles.hpp @@ -48,6 +48,22 @@ class Rsctitles { idc = 55; text = QPATHTOF(ui\body_leg_right.paa); }; + class bodyImgTournAL: bodyImgHead { + idc = 56; + text = QPATHTOF(ui\tourniquet_arm_left.paa); + }; + class bodyImgTournAR: bodyImgHead { + idc = 57; + text = QPATHTOF(ui\tourniquet_arm_right.paa); + }; + class bodyImgTournLL: bodyImgHead { + idc = 58; + text = QPATHTOF(ui\tourniquet_leg_left.paa); + }; + class bodyImgTournLR: bodyImgHead { + idc = 59; + text = QPATHTOF(ui\tourniquet_leg_right.paa); + }; class InjuryListLabel { idc = 199; type = CT_STATIC; diff --git a/addons/medical/ui/tourniquet_arm_left.paa b/addons/medical/ui/tourniquet_arm_left.paa new file mode 100644 index 0000000000..800b1c5fb8 Binary files /dev/null and b/addons/medical/ui/tourniquet_arm_left.paa differ diff --git a/addons/medical/ui/tourniquet_arm_right.paa b/addons/medical/ui/tourniquet_arm_right.paa new file mode 100644 index 0000000000..5692d258a9 Binary files /dev/null and b/addons/medical/ui/tourniquet_arm_right.paa differ diff --git a/addons/medical/ui/tourniquet_leg_left.paa b/addons/medical/ui/tourniquet_leg_left.paa new file mode 100644 index 0000000000..5f0ff6b20f Binary files /dev/null and b/addons/medical/ui/tourniquet_leg_left.paa differ diff --git a/addons/medical/ui/tourniquet_leg_right.paa b/addons/medical/ui/tourniquet_leg_right.paa new file mode 100644 index 0000000000..902b42632b Binary files /dev/null and b/addons/medical/ui/tourniquet_leg_right.paa differ diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 3c54cd71f0..f1341bf693 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -143,6 +143,7 @@ if ((EGVAR(medical,level) >= 2) && {([_target] call EFUNC(medical,hasMedicalEnab [_selectionBloodLoss, _damaged, _display] call FUNC(updateBodyImage); [_display, _genericMessages, _allInjuryTexts] call FUNC(updateInformationLists); +[_display, _target getVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0]]] call EFUNC(medical,updateTourniquets); [_display, _target getVariable [QEGVAR(medical,logFile_activity_view), []]] call FUNC(updateActivityLog); [_display, _target getVariable [QEGVAR(medical,logFile_quick_view), []]] call FUNC(updateQuickViewLog); diff --git a/addons/medical_menu/ui/menu.hpp b/addons/medical_menu/ui/menu.hpp index 16c79e7c6a..0743dc93d5 100644 --- a/addons/medical_menu/ui/menu.hpp +++ b/addons/medical_menu/ui/menu.hpp @@ -309,6 +309,22 @@ class GVAR(medicalMenu) { idc = 55; text = QPATHTOEF(medical,ui\body_leg_right.paa); }; + class bodyImgTournAL: bodyImgHead { + idc = 56; + text = QPATHTOEF(medical,ui\tourniquet_arm_left.paa); + }; + class bodyImgTournAR: bodyImgHead { + idc = 57; + text = QPATHTOEF(medical,ui\tourniquet_arm_right.paa); + }; + class bodyImgTournLL: bodyImgHead { + idc = 58; + text = QPATHTOEF(medical,ui\tourniquet_leg_left.paa); + }; + class bodyImgTournLR: bodyImgHead { + idc = 59; + text = QPATHTOEF(medical,ui\tourniquet_leg_right.paa); + }; class selectHead: ACE_gui_buttonBase {