From 4af57d23573e67b8619741097b6c2e2dcac301cc Mon Sep 17 00:00:00 2001 From: AirwavesMan Date: Sun, 17 Jan 2021 10:26:08 +0100 Subject: [PATCH] Add blood type support for all differnt GUI versions --- .../Configs/RscDisplay/RscPlayerUI.hpp | 18 ++++++++++++++++ SQF/dayz_code/compile/player_updateGui.sqf | 21 ++++++++++++------- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp b/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp index 9cf1e9b80..b0a2ec14f 100644 --- a/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp @@ -501,6 +501,15 @@ class RscTitles w = 0.075; h = 0.10; }; + class RscPicture_1310: RscPictureGUI + { + idc = 1310; + // blood type + x = 0.955313 * safezoneW + safezoneX; + y = 0.79 * safezoneH + safezoneY; + w = 0.075; + h = 0.10; + }; }; }; class playerStatusGUI_legacy { @@ -685,6 +694,15 @@ class RscTitles w = 0.075; h = 0.10; }; + class RscPicture_1310: RscPictureGUI + { + idc = 1310; + // blood type + x = 0.951613 * safezoneW + safezoneX; + y = 0.79 * safezoneH + safezoneY; + w = 0.075; + h = 0.10; + }; }; }; class DZ_BlackScreen { diff --git a/SQF/dayz_code/compile/player_updateGui.sqf b/SQF/dayz_code/compile/player_updateGui.sqf index 9474b099e..6a29284d5 100644 --- a/SQF/dayz_code/compile/player_updateGui.sqf +++ b/SQF/dayz_code/compile/player_updateGui.sqf @@ -157,14 +157,6 @@ if (DZE_UI == 1) then { // Vanilla }; _ctrlTempBorder ctrlSetText _tempText; - - local _bloodTestdone = player getVariable ["blood_testdone", false]; - if (_bloodTestdone) then { - local _bloodType = player getVariable ["blood_type", "O"]; - local _rhFactor = if (player getVariable ["rh_factor", false]) then { "pos" } else { "neg" }; - _ctrlBloodType = _display displayCtrl 1310; - _ctrlBloodType ctrlSetText ("\z\addons\dayz_code\gui\status\status_blood_type_"+_bloodType+"_"+_rhFactor+"_ca.paa"); - }; }; local _path = if (DZE_UI == 1) then {"\z\addons\dayz_code\gui\status\"} else {"\z\addons\dayz_code\gui\status_epoch\"}; @@ -214,6 +206,19 @@ if (DZE_UI in [1,3]) then { _ctrlEar ctrlSetText _audibletext; }; +if !(dayz_classicBloodBagSystem) then { + local _bloodTestdone = player getVariable ["blood_testdone", false]; + if (_bloodTestdone) then { + local _bloodType = player getVariable ["blood_type", "O"]; + local _rhFactor = if (player getVariable ["rh_factor", false]) then { "pos" } else { "neg" }; + _ctrlBloodType = _display displayCtrl 1310; + if (DZE_UI == 3) then { + _ctrlBloodType ctrlSetTextColor [1,1,1,1]; + }; + _ctrlBloodType ctrlSetText ("\z\addons\dayz_code\gui\status\status_blood_type_"+_bloodType+"_"+_rhFactor+"_ca.paa"); + }; +}; + // Fracture/Broken Legs if !(canStand player) then { _ctrlFracture ctrlShow true;