Skip to content

Commit

Permalink
Medical - Show tourniquets in Medical and Patient information (#6681)
Browse files Browse the repository at this point in the history
* Show tourniquets in Medical and Patient information

* Ace styling

* Move tourniquet update function to medical
  • Loading branch information
diwako authored and PabstMirror committed Dec 6, 2018
1 parent c9ee099 commit 88eb743
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Coren <coren4@gmail.com>
Crusty
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
Dimaslg <dimaslg@telecable.es>
diwako
dixon13 <dixonbegay@gmail.com>
Drill <drill87@gmail.com>
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
Expand Down
1 change: 1 addition & 0 deletions addons/medical/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ PREP(moduleAssignMedicalVehicle);
PREP(moduleAssignMedicalFacility);
PREP(copyDeadBody);
PREP(unconsciousPFH);
PREP(updateTourniquets);

// Networked litter
PREP(createLitter);
Expand Down
3 changes: 3 additions & 0 deletions addons/medical/functions/fnc_displayPatientInformation.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
{
Expand Down
26 changes: 26 additions & 0 deletions addons/medical/functions/fnc_updateTourniquets.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include "script_component.hpp"
/*
* Author: diwako
* Update tourniquets on the body image on the menu.
*
* Arguments:
* 0: Display <DISPLAY>
* 1: Tourniquets <ARRAY>
*
* 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];
};
16 changes: 16 additions & 0 deletions addons/medical/ui/RscTitles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file added addons/medical/ui/tourniquet_arm_left.paa
Binary file not shown.
Binary file added addons/medical/ui/tourniquet_arm_right.paa
Binary file not shown.
Binary file added addons/medical/ui/tourniquet_leg_left.paa
Binary file not shown.
Binary file added addons/medical/ui/tourniquet_leg_right.paa
Binary file not shown.
1 change: 1 addition & 0 deletions addons/medical_menu/functions/fnc_updateUIInfo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 16 additions & 0 deletions addons/medical_menu/ui/menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 88eb743

Please sign in to comment.