Medical - Show tourniquets in Medical and Patient information (#6681)

* Show tourniquets in Medical and Patient information

* Ace styling

* Move tourniquet update function to medical
This commit is contained in:
diwako 2018-12-06 20:41:23 +01:00 committed by PabstMirror
parent c9ee0995c3
commit 88eb743485
11 changed files with 64 additions and 0 deletions

View File

@ -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>

View File

@ -111,6 +111,7 @@ PREP(moduleAssignMedicalVehicle);
PREP(moduleAssignMedicalFacility);
PREP(copyDeadBody);
PREP(unconsciousPFH);
PREP(updateTourniquets);
// Networked litter
PREP(createLitter);

View File

@ -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;
{

View File

@ -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];
};

View File

@ -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;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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);

View File

@ -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 {