Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical - Show tourniquets in Medical and Patient information #6681

Merged
merged 3 commits into from
Dec 6, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 7 additions & 0 deletions addons/medical/functions/fnc_displayPatientInformation.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ if (_show) then {
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
} foreach _selectionBloodLoss;

private _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
diwako marked this conversation as resolved.
Show resolved Hide resolved
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];
};

private _lbCtrl = (_display displayCtrl 200);
lbClear _lbCtrl;
{
Expand Down
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/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ PREP(updateInformationLists);
PREP(setTriageStatus);
PREP(collectActions);
PREP(module);
PREP(updateTourniquets);
26 changes: 26 additions & 0 deletions addons/medical_menu/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 tourniquet on the body image on the menu
diwako marked this conversation as resolved.
Show resolved Hide resolved
*
* Arguments:
* 0: display <DISPLAY>
diwako marked this conversation as resolved.
Show resolved Hide resolved
* 1: tourniquets <ARRAY>
diwako marked this conversation as resolved.
Show resolved Hide resolved
*
* Return Value:
* None
*
* Example:
* [some_display, [0,0,0,0,0,0]] call ace_medical_menu_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];
};
diwako marked this conversation as resolved.
Show resolved Hide resolved
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 FUNC(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 {
diwako marked this conversation as resolved.
Show resolved Hide resolved
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