From 88eb74348536a67cc7023cd8fc6ea5d5ad9ad23a Mon Sep 17 00:00:00 2001 From: diwako Date: Thu, 6 Dec 2018 20:41:23 +0100 Subject: [PATCH] Medical - Show tourniquets in Medical and Patient information (#6681) * Show tourniquets in Medical and Patient information * Ace styling * Move tourniquet update function to medical --- AUTHORS.txt | 1 + addons/medical/XEH_PREP.hpp | 1 + .../fnc_displayPatientInformation.sqf | 3 ++ .../functions/fnc_updateTourniquets.sqf | 26 ++++++++++++++++++ addons/medical/ui/RscTitles.hpp | 16 +++++++++++ addons/medical/ui/tourniquet_arm_left.paa | Bin 0 -> 24344 bytes addons/medical/ui/tourniquet_arm_right.paa | Bin 0 -> 24404 bytes addons/medical/ui/tourniquet_leg_left.paa | Bin 0 -> 24811 bytes addons/medical/ui/tourniquet_leg_right.paa | Bin 0 -> 24664 bytes .../functions/fnc_updateUIInfo.sqf | 1 + addons/medical_menu/ui/menu.hpp | 16 +++++++++++ 11 files changed, 64 insertions(+) create mode 100644 addons/medical/functions/fnc_updateTourniquets.sqf create mode 100644 addons/medical/ui/tourniquet_arm_left.paa create mode 100644 addons/medical/ui/tourniquet_arm_right.paa create mode 100644 addons/medical/ui/tourniquet_leg_left.paa create mode 100644 addons/medical/ui/tourniquet_leg_right.paa diff --git a/AUTHORS.txt b/AUTHORS.txt index 05db46c820c..2cb4488680b 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 e6fa31112d6..8f5a39e1073 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 3058dd82bfd..d506c09c509 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 00000000000..3065ea4f07d --- /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 3f9113a9d2b..00182d24dd8 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 0000000000000000000000000000000000000000..800b1c5fb8c6df9d40fc755324108e6b19831536 GIT binary patch literal 24344 zcmeI4e@t6d6vxl&5Bdr#Wd@8H(;isohC|(!Y{`-`TX7)jGL1Y2u4BkD44aM1q6T7- zf<*mie@NV-#)0t%(?6D&$Qm_fL5$m?$$};|N)2o=mc^i`WOfzE^_-Tc{;@1NT*NTO)J(!K$il ze%g+ZyBz>8IRW}>00tTWj_m{(Yy_Ag{|j}4WhMu%1DyZc1jr_bVsYXy4B*aR9Sy~! zp`M9N0ES^4%)2eDX*Uk*cOKE&%q$)Dc^u22rq^53Yx9=$CyQ2p5lmTf1{3kIu;!ez zI8H@f^(&^;STd;DV{72%&zpKx1i*H5(>oS`^2Dukj?SMQN)4>r>-YQ3!#)}IIBxnO z8mg>+PjyTMla32c%k>{dD~cz64JMrd-Pry!O)N{)rej*vrA<}3hVC4KA6oJvN z0(xY-VL(Hfy;)zfJ0H#(LCrkh69D<{Uw&(TBl<}34JS+Vl|_e)^`$2^x8BmITJNzr zoX;C2pLJe5-4lveOx4a=_ct0vYr0A+I^(5tPY2DTwEH~h0m#jT%03FYx4Qsfhq?2E zu*ck79B5#%Xq6L7tt18(saF2y6CVIrN(boz&26Diz>fj9g7W{BQs07XZt;PuFkQM2 zoI8~%@t+{Qjn^yOldraGeFc5VaJw^RchF}*apaZRj;XL_Uj^Gnq6asq0Y@x%3ApyE zeJ|Wq^Wqt$Li@TSk*0M2SvTmO*G^8&{`A=3SQ5ddIb8*3sc3r2sc1fK16y02{-t}> z*Yxq?o1n=k8f56EENGveuUXrjMiCHgE=&t=HR3Wo{4u?k%62Us#ESiOQ98 z+z}sB5#hO&pa0>skbd%HEYr$Nk)$p05FRoSKzfn!Amc&CgNz4`0FtF1NIhT{SV$Hg zga>AUg=FDDcwiP-NERN12WEkVWZ@zEc*w~-lYnQ}rJr5cIhQOXOFpwNpPV}uk}s9N zveD>|$1Xl|reliot--MS+(W&W`bY`)OLk<^Iayo&2?n7z|yj{PF@d zw2F;Dtro`GJlr&v(&##1f(8jM?FNo!DBP2mAgF@iOVVDyIP~6 z6?Eltgf3fRcA2)DKoMM*6;J7(iNOCAzXHA$sF_h;urjcI{!8^dOdhxbuWohF|F$&h lpJ8zE+8=lKdiiY|M(sadl+%K=98W8CL+Y9Cw#6(8e*i6#m6HGf literal 0 HcmV?d00001 diff --git a/addons/medical/ui/tourniquet_arm_right.paa b/addons/medical/ui/tourniquet_arm_right.paa new file mode 100644 index 0000000000000000000000000000000000000000..5692d258a93960379057c8d19dd39d94de28e140 GIT binary patch literal 24404 zcmeI4U1%It6vxlZeulWo8XFBwL(ax6;zw%0q>66Sjim{z789CDx3Epqlq$u>1WSF8 zO*bE+KD4&frczB>u~vPsP+~iv#JG(QRuBx-l+aOItVV-E7A+)8KCb8NZb9mU5mHjy z^M}Koo1NS{_dmaTX6G(54pmcARllaDp~?;bi9`ZY^>EcXt}7DPYpR~A=DJ3~_4U=& zPX}qcgW^LMz_(cdRtVt7jR51DsGUZDhd0xQ|E@03eJ;oY%~|UGJYs#e?BhPRCJUf~@^Q=+;jp6X6g5{Oy_aV1M z>J1=xi}smY3#r>B#{u$33}fk#I;wtceLyKXDn0A;g+EGG;J%-8pzz{GM`?7&CY_mkhBiCtN(RF~IijDzQe+HBn{8m-%d+!JX}6tip)+E3&4 z``k2mo6X33ZMfNbV(QP{S{2b83iL$ISAG5-^`O(8I}}pMl6HL8SKXw0Rzy)R`0}2a zSKG8~b-5t?4nTR2**Bz;2dSBtIzWq1e0o+c0b%M5Br|aYyz;!^W71JKVSm1hW)(0pVIv?T8-{L=TFm)yHP^P3S!{5?> z|3I$OcE7phZF8&DA8m&_dh(5m#BWDca^ILzyG~>SWUU=PRWur#R7WNO>car8c%)nJ zo;}+>vAeUOiAT{N@M@liRyJ=|R^1+tts*$*T$=d0wanaN4Mt*F;2AM$F2}B@nbx1S zxjG`X5+EhZ(>?wTaa7$IN)7T33-PGyFWeudH445&XUi{tddn&8`1b<((#!m zF||P#*6U)}jnVEi0cNFxzn29w!%csk;xBSn|A4e1b@4-ZNIM|&LGpp*L&=Ad4<#S6 z14tqHK=J{zz(NY)L3m&mSV$o}2oKBx3n_$$h37%zUjWR#@&5Gk(|Y!rg%slV!u!qM zvXEji{B>p1FGzIC`FzttqOtwlC*Q4J*=+Sq@M>1p$eN_N%9{9SSv%E@aGZ`ZEu>;G zjyKc&qWN{J^?#pHy@Qsct+&ntRM9V!x7zq+ylDrJ3YqUWU;Y=qg>QBMDP(@j{ALzd zNFh8356l7!DTD{%fmvW7h43IeFbgcC5FUgFW`Tti!h`U@EU=J5cn}_#1r|~W55fbp zz(NY)L3m&mSV$o}2oKBx3n_#L;elCTA%*ZDJTMC^q!1p22WEkV6vBh>z$~zkLU<4! zm<1M62oJ&ov%o?M;X!y{7Fb9jJO~fW0t+eT!$XkY0pO*b(?Tld^KY5m=iQC$pLPJL z5PxNw-t6osZ*=iv8b(7^^z^xVr`dPml@@E+F8~d-b@H^a@RM@j|2luXycDQqPU6C4TfO|n9beGhFHe)u r+8h6&d^fmxSu`iJh{12AHH?b?JiG0bQOQp`g!1^^;i+cou8#gMV9mY~ literal 0 HcmV?d00001 diff --git a/addons/medical/ui/tourniquet_leg_left.paa b/addons/medical/ui/tourniquet_leg_left.paa new file mode 100644 index 0000000000000000000000000000000000000000..5f0ff6b20fd73ac41c03087f3915b4f040dfff05 GIT binary patch literal 24811 zcmeI4e{56N701tg{_WV>fq(%J$TxeCPMct2Xqs?kYs;PmlD+{SbGGm9kbK)eL z)IXX(&_t&5mA-lJMo-W0o%^}xUMEM_q&95|?bxuXIb;NYY&I)q+TqYPYAY1AH-)w~ zP+Op>{X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f3GG#RG-HFzJ-OQt>dq$`WGA-YGaX1 z}9Hm#Quk#;57^xN!vgm#So;o%^>KJ)R#H$`8k@7y*vg z!txFC!n{xfBzht96J1M^Xuf{&tv9LfND|Hc$NfhvkR+OUU>=ACl0-8P%mcANl4$0E zc_0=@63sj?55xjVqL~Ngfmk3(H1ohb5DO%UW*(RaVu2*l%med4ERZCccnH!S0QkSq zSxG!HCX5O5P>cYN2hIna4>=!lKD@j6kT!k7Jq72>us-+a;n>db;4&(^(yMXzy4QOK zMvfQDuAXda`oAx`TEFW6?XQ(-#WJ%dtUF}h?k;Z}PmU)=K%#j*=lPsiAW1ayKpXU8 zB#ao0q9h(TEIdqRarnexGE+@os_Q2pr>%Re*GtQ|P;dt?V`c-mSjLl^{uC(Ydi@i- z{eS&hA>7=*4_C)_{kW4>%Y<3ej=R5Fwu1G)wnkl080s-yR>5ZaQZqw8K9z37jEeEJ Q(RUqN@z=Wk$n2o_4;#%);{X5v literal 0 HcmV?d00001 diff --git a/addons/medical/ui/tourniquet_leg_right.paa b/addons/medical/ui/tourniquet_leg_right.paa new file mode 100644 index 0000000000000000000000000000000000000000..902b42632b35ad92f2cb2a98818db922903976ba GIT binary patch literal 24664 zcmeI4du-EH6vxl~Jy^@Attf(yWw%?0kT`s@e;8{kI2b|%>5o-X#@J9a5r)ZF5W20~ zg2q2^NC0053aG?LFqriZUYjH!qQqzdPG>em1s@QIJO+RJ?hS`szA!sQgM(Ytbri$I&O?_S%#NN8%)uqCm8W}Jrmg!{ZdFB;Iw zkHS;ia*KlEE!VL9dH&!QF&sOa-SNn%bs}Bw{9RIec3JJhtVw^=T+;K`Se9qsqn8d= zf2fI#9>Wlst%oiy>~$C30y~a8VUCjSs2q*0!f)@KnLkx@&lF4Ay}Rdj&u}*<4*2Tl zmMuzG{8W(~jpNOH*i+S6dhT=YxLAR=z1SGo_C@uF@wtOC&7dQ*)v|J0^7hD0-K%@C zCDmOAp7I0^T?l_viicuaV7(}v90eGbrQ+j;J@ckds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mV?d00001 diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 3c54cd71f00..f1341bf6937 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 16c79e7c6a0..0743dc93d53 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 {