Skip to content

Commit

Permalink
GUI - Add Airway & Pharmacy medical menu visuals (#406)
Browse files Browse the repository at this point in the history
**When merged this pull request will:**
- Add Airway and Pharmacy item visuals to medical menu

![image](https://github.com/KAT-Advanced-Medical/KAM/assets/15182031/ce93a820-b8d3-498e-8945-5f401bf76371)

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
BlueTheKing authored Aug 30, 2023
1 parent 75682d9 commit 8374a11
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 6 deletions.
Binary file added addons/gui/data/body_image/head_guedeltube.paa
Binary file not shown.
Binary file added addons/gui/data/body_image/head_kinglt.paa
Binary file not shown.
Binary file added addons/gui/data/body_image/leftarm_iv.paa
Binary file not shown.
Binary file added addons/gui/data/body_image/leftleg_iv.paa
Binary file not shown.
Binary file added addons/gui/data/body_image/rightarm_iv.paa
Binary file not shown.
Binary file added addons/gui/data/body_image/rightleg_iv.paa
Binary file not shown.
Binary file added addons/gui/data/body_image/torso_io.paa
Binary file not shown.
45 changes: 45 additions & 0 deletions addons/gui/functions/fnc_updateBodyImage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,25 @@ private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0];
[IDC_BODY_LEGRIGHT, IDC_BODY_LEGRIGHT_T, IDC_BODY_LEGRIGHT_B, -1]
];

// Airway
private _ctrlGuedelTube = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_GUEDELTUBE;
private _ctrlKingLT = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_KINGLT;

private _airwayItem = _target getVariable [QEGVAR(airway,airway_item), ""];

if !(_airwayItem isEqualTo "") then {
if (_airwayItem isEqualTo "Larynxtubus") then {
_ctrlGuedelTube ctrlShow false;
_ctrlKingLT ctrlShow true;
} else {
_ctrlGuedelTube ctrlShow true;
_ctrlKingLT ctrlShow false;
};
} else {
_ctrlGuedelTube ctrlShow false;
_ctrlKingLT ctrlShow false;
};

// Breathing
private _ctrlPulseOximeterRight = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTARM_PULSEOX;
private _ctrlPulseOximeterLeft = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFARM_PULSEOX;
Expand Down Expand Up @@ -153,4 +172,30 @@ if (_target getVariable [QEGVAR(circulation,AED_X_VitalsMonitor_Connected), fals
} else {
_ctrlAEDVitalsMonitorRight ctrlShow false;
_ctrlAEDVitalsMonitorLeft ctrlShow false;
};

// Pharmacy
private _ctrlIVLeftArm = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTARM_IV;
private _ctrlIVRightArm = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTARM_IV;
private _ctrlIVLeftLeg = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTLEG_IV;
private _ctrlIVRightLeg = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTLEG_IV;
private _ctrlIO = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_IO;

private _IVArray = _target getVariable [QEGVAR(pharma,IV), [0,0,0,0,0,0]];

{
switch (_IVArray select (_forEachIndex + 2)) do {
case 0: {
_x ctrlShow false;
};
default {
_x ctrlShow true;
};
};
} forEach [_ctrlIVLeftArm, _ctrlIVRightArm, _ctrlIVLeftLeg, _ctrlIVRightLeg];

if ((_IVArray select 1) isEqualTo 1) then {
_ctrlIO ctrlShow true;
} else {
_ctrlIO ctrlShow false;
};
30 changes: 30 additions & 0 deletions addons/gui/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars {
colorText[] = {1, 0.95, 0, 1};
show = 0;
};
class Head_GuedelTube: Torso_ChestSeal {
idc = IDC_BODY_HEAD_GUEDELTUBE;
text = QPATHTOF(data\body_image\head_guedeltube.paa);
colorText[] = {0.1, 1, 1, 1};
};
class Head_KingLT: Head_GuedelTube {
idc = IDC_BODY_HEAD_KINGLT;
text = QPATHTOF(data\body_image\head_kinglt.paa);
};
class RightArm_PulseOximeter: Background {
idc = IDC_BODY_RIGHTARM_PULSEOX;
text = QPATHTOF(data\body_image\rightarm_pulseoximeter.paa);
Expand All @@ -61,11 +70,32 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars {
idc = IDC_BODY_LEFTARM_AED_VITALS;
text = QPATHTOF(data\body_image\leftarm_aed_vitals_monitor.paa);
};
class Torso_IO: Torso_ChestSeal {
idc = IDC_BODY_TORSO_IO;
text = QPATHTOF(data\body_image\torso_io.paa);
colorText[] = {0.3, 0.6, 0.3, 1};
};
class Torso_Pneumothorax: Torso_ChestSeal {
idc = IDC_BODY_TORSO_PNEUMOTHORAX;
text = QPATHTOF(data\body_image\torso_pneumothorax.paa);
colorText[] = {1, 1, 1, 1};
};
class RightArm_IV: Torso_IO {
idc = IDC_BODY_RIGHTARM_IV;
text = QPATHTOF(data\body_image\rightarm_iv.paa);
};
class LeftArm_IV: RightArm_IV {
idc = IDC_BODY_LEFTARM_IV;
text = QPATHTOF(data\body_image\leftarm_iv.paa);
};
class RightLeg_IV: RightArm_IV {
idc = IDC_BODY_RIGHTLEG_IV;
text = QPATHTOF(data\body_image\rightleg_iv.paa);
};
class LeftLeg_IV: RightArm_IV {
idc = IDC_BODY_LEFTLEG_IV;
text = QPATHTOF(data\body_image\leftleg_iv.paa);
};
};
};

Expand Down
21 changes: 15 additions & 6 deletions addons/gui/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,22 @@
#define IDC_TRIAGE_SELECT 7100


#define IDC_BODY_TORSO_I 70100
#define IDC_BODY_TORSO_I 70100

#define IDC_BODY_TORSO_AED_PADS 70120
#define IDC_BODY_TORSO_CHESTSEAL 70121
#define IDC_BODY_TORSO_PNEUMOTHORAX 70122
#define IDC_BODY_HEAD_GUEDELTUBE 70110
#define IDC_BODY_HEAD_KINGLT 70111

#define IDC_BODY_TORSO_AED_PADS 70120
#define IDC_BODY_TORSO_CHESTSEAL 70121
#define IDC_BODY_TORSO_PNEUMOTHORAX 70122
#define IDC_BODY_TORSO_IO 70123

#define IDC_BODY_RIGHTARM_AED_VITALS 70130
#define IDC_BODY_LEFTARM_AED_VITALS 70131
#define IDC_BODY_RIGHTARM_PULSEOX 70132
#define IDC_BODY_LEFTARM_PULSEOX 70133
#define IDC_BODY_RIGHTARM_PULSEOX 70132
#define IDC_BODY_LEFTARM_PULSEOX 70133
#define IDC_BODY_RIGHTARM_IV 70134
#define IDC_BODY_LEFTARM_IV 70135

#define IDC_BODY_RIGHTLEG_IV 70141
#define IDC_BODY_LEFTLEG_IV 70142

0 comments on commit 8374a11

Please sign in to comment.