diff --git a/SQF/dayz_code/Configs/rscTitles.hpp b/SQF/dayz_code/Configs/rscTitles.hpp
index c12790489..ef13aed12 100644
--- a/SQF/dayz_code/Configs/rscTitles.hpp
+++ b/SQF/dayz_code/Configs/rscTitles.hpp
@@ -45,7 +45,7 @@ class RscDisplayConfigure {
onKeyDown = FILTER_CHEATS;
};
class RscDisplayGameOptions {
- onLoad = "{_idc = _x select 0; _var = _x select 1; _default = _x select 2; lbClear ((_this select 0) displayCtrl _idc); {(_this select 0) displayCtrl _idc lbAdd localize _x} forEach ['STR_DISABLED','STR_ENABLED']; (_this select 0) displayCtrl _idc lbSetCurSel (profileNamespace getVariable [_var,_default]); uiNamespace setVariable [_var,(profileNamespace getVariable [_var,_default])]} forEach [[103,'statusUI',1],[140,'streamerMode',0]];";
+ onLoad = "{_idc = _x select 0; _var = _x select 1; _default = _x select 2; lbClear ((_this select 0) displayCtrl _idc); {(_this select 0) displayCtrl _idc lbAdd localize _x} forEach ([['STR_DISABLED','STR_ENABLED'],['STR_DISABLED','STR_UI_STATUS_VANILLA','STR_UI_STATUS_EPOCH','STR_UI_STATUS_DARK','STR_UI_STATUS_WB','STR_UI_STATUS_GB']] select (_forEachIndex == 0));(_this select 0) displayCtrl _idc lbSetCurSel (profileNamespace getVariable [_var,_default]); uiNamespace setVariable [_var,(profileNamespace getVariable [_var,_default])];} forEach [[103,'statusUI',1],[140,'streamerMode',0]];";
onUnload = "call ui_changeDisplay;";
onKeyDown = FILTER_CHEATS;
class controls {
diff --git a/SQF/dayz_code/compile/keyboard.sqf b/SQF/dayz_code/compile/keyboard.sqf
index 2a770d2e2..b098af20f 100644
--- a/SQF/dayz_code/compile/keyboard.sqf
+++ b/SQF/dayz_code/compile/keyboard.sqf
@@ -69,13 +69,10 @@ if (isNil "keyboard_keys") then {
_handled = true;
};
_statusUI = {
- if (profileNamespace getVariable ["statusUI",1] == 1) then {
- profileNamespace setVariable ["statusUI",0];
- [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_DISABLED"],1] call dayz_rollingMessages;
- } else {
- profileNamespace setVariable ["statusUI",1];
- [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_ENABLED"],1] call dayz_rollingMessages;
- };
+ DZE_UI = DZE_UI + 1;
+ if (DZE_UI == 6) then {DZE_UI = 0; [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_DISABLED"],1] call dayz_rollingMessages;};
+ if (DZE_UI == 1) then {[format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_ENABLED"],1] call dayz_rollingMessages;};
+ profileNamespace setVariable ["statusUI",DZE_UI];
saveProfileNamespace;
call ui_changeDisplay;
_handled = true;
@@ -344,4 +341,4 @@ if (!isNil "_code") then {
call _code;
};
-_handled
\ No newline at end of file
+_handled
diff --git a/SQF/dayz_code/compile/player_updateGui.sqf b/SQF/dayz_code/compile/player_updateGui.sqf
index aa62f391e..365a473f6 100644
--- a/SQF/dayz_code/compile/player_updateGui.sqf
+++ b/SQF/dayz_code/compile/player_updateGui.sqf
@@ -1,4 +1,8 @@
private ["_combatVal","_ctrlCombatBorder","_ctrlCombat","_uiNumber","_bloodText","_blood","_bloodType","_rhFactor","_thirstLvl","_foodLvl","_tempImg","_tempText","_visual","_audible","_id","_rID","_color","_string","_humanity","_size","_friendlies","_rfriendlies","_rfriendlyTo","_distance","_targetControl","_flash","_foodVal","_thirstVal","_tempVal","_display","_ctrlBloodOuter","_ctrlFoodBorder","_ctrlThirstBorder","_ctrlTempBorder","_ctrlBlood","_ctrlBloodType","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_ctrlTemp","_ctrlEar","_ctrlEye","_ctrlFracture","_ctrlMuteBackground","_ctrlMuteIcon","_thirst","_food","_temp","_bloodLvl","_tempLvl","_bloodTestdone","_humanityTarget"];
+disableSerialization;
+
+_display = uiNamespace getVariable 'DAYZ_GUI_display';
+if (isNil "_display") exitWith {}; // not ready
_flash = {
if (ctrlShown _this) then {
@@ -8,45 +12,56 @@ _flash = {
};
};
-disableSerialization;
-
_foodVal = 1 - (dayz_hunger / SleepFood);
_thirstVal = 1 - (dayz_thirst / SleepWater);
_tempVal = 1 - ((dayz_temperatur - dayz_temperaturmin)/(dayz_temperaturmax - dayz_temperaturmin)); // Normalise to [0,1]
-
-_display = uiNamespace getVariable 'DAYZ_GUI_display';
-if (isNil "_display") exitWith {}; // not ready
-
-_ctrlBloodOuter = _display displayCtrl 1200;
-_ctrlFoodBorder = _display displayCtrl 1201;
-_ctrlThirstBorder = _display displayCtrl 1202;
-_ctrlTempBorder = _display displayCtrl 1208;
-//Border white
-_ctrlBloodOuter ctrlSetTextColor [1,1,1,1];
-_ctrlFoodBorder ctrlSetTextColor [1,1,1,1];
-_ctrlThirstBorder ctrlSetTextColor [1,1,1,1];
-_ctrlTempBorder ctrlSetTextColor [1,1,1,1];
-
-if (DZE_VanillaUICombatIcon) then {
- _combatVal = if (player getVariable["combattimeout",0] >= diag_tickTime) then {0} else {1};
- _ctrlCombatBorder = _display displayCtrl 1909;
- _ctrlCombat = _display displayCtrl 1308;
- _ctrlCombatBG = _display displayCtrl 1209;
- _ctrlCombatBorder ctrlSetTextColor [1,1,1,1];
- _ctrlCombat ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 1];
- _ctrlCombatBorder ctrlSetText ("\z\addons\dayz_code\gui\status\status_combat_border_new_CA.paa");
- _ctrlCombat ctrlSetText ("\z\addons\dayz_code\gui\status\status_combat_inside_new_ca.paa");
- _ctrlCombatBG ctrlSetText ("\z\addons\dayz_code\gui\status\status_bg.paa");
-};
-_ctrlBlood = _display displayCtrl 1300;
-_ctrlBloodType = _display displayCtrl 1307;
-_ctrlBleed = _display displayCtrl 1303;
_bloodVal = r_player_blood / r_player_bloodTotal;
+_combatVal = if (player getVariable["combattimeout",0] >= diag_tickTime) then {0} else {1};
+
+if (DZE_UI in [1,3,4]) then { // White borders
+ _ctrlBloodOuter = _display displayCtrl 1200;
+ _ctrlFoodBorder = _display displayCtrl 1201;
+ _ctrlThirstBorder = _display displayCtrl 1202;
+ _ctrlTempBorder = _display displayCtrl 1208;
+ _ctrlBloodOuter ctrlSetTextColor [1,1,1,1];
+ _ctrlFoodBorder ctrlSetTextColor [1,1,1,1];
+ _ctrlThirstBorder ctrlSetTextColor [1,1,1,1];
+ _ctrlTempBorder ctrlSetTextColor [1,1,1,1];
+ if (DZE_UI in [3,4]) then {
+ _ctrlCombatBorder = _display displayCtrl 1207;
+ _ctrlCombatBorder ctrlSetTextColor [1,1,1,1];
+ };
+};
+
+if (DZE_UI == 1) then { // Vanilla
+ if (DZE_VanillaUICombatIcon) then {
+ _ctrlCombatBorder = _display displayCtrl 1207;
+ _ctrlCombat = _display displayCtrl 1307;
+ _ctrlCombatBG = _display displayCtrl 1209;
+ _ctrlCombatBorder ctrlSetTextColor [1,1,1,1];
+ _ctrlCombat ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 1];
+ _ctrlCombatBorder ctrlSetText ("\z\addons\dayz_code\gui\status\status_combat_border_new_CA.paa");
+ _ctrlCombat ctrlSetText ("\z\addons\dayz_code\gui\status\status_combat_inside_new_ca.paa");
+ _ctrlCombatBG ctrlSetText ("\z\addons\dayz_code\gui\status\status_bg.paa");
+ };
+} else {
+ _ctrlCombat = _display displayCtrl 1307;
+ _ctrlCombat ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 0.5];
+};
+
+if (DZE_UI in [1,3]) then {
+ _ctrlEar = _display displayCtrl 1304;
+ _ctrlEye = _display displayCtrl 1305;
+} else {
+ _ctrlEar = _display displayCtrl 1308;
+ _ctrlEye = _display displayCtrl 1309;
+};
+
+_ctrlBlood = _display displayCtrl 1300;
+_ctrlBleed = _display displayCtrl 1303;
_ctrlFood = _display displayCtrl 1301;
_ctrlThirst = _display displayCtrl 1302;
_ctrlTemp = _display displayCtrl 1306;
-_ctrlEar = _display displayCtrl 1304;
-_ctrlEye = _display displayCtrl 1305;
_ctrlFracture = _display displayCtrl 1203;
_ctrlMuteBackground = _display displayCtrl 1904;
_ctrlMuteIcon = _display displayCtrl 1204;
@@ -60,19 +75,29 @@ if (dayz_soundMuted) then {
};
//Food/Water/Blood
-/*
-NEW SYSTEM SHOULD BE: (EXAMPLE)
-if (_bloodVal > 0.5) then { GREEN TO YELLOW } else { YELLOW TO RED};
-Same with Food and Thirst
-*/
-_ctrlTemp ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_tempVal))), (Dayz_GUI_G * _tempVal), _tempVal, 1]; // Color ranges from iceblue (cold) to red (hot) // << Already Done :)
-
-
-// OLD SYSTEM
-_ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 1];
-_ctrlFood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_foodVal))),(Dayz_GUI_G * _foodVal),(Dayz_GUI_B * _foodVal), 1];
-_ctrlThirst ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_thirstVal))),(Dayz_GUI_G * _thirstVal),(Dayz_GUI_B * _thirstVal), 1];
+if (DZE_UI == 3) then { // Dark
+ _ctrlBlood ctrlSetTextColor [(1 - _bloodVal),(1 - _bloodVal),(1 - _bloodVal), 0.5];
+ _ctrlFood ctrlSetTextColor [ _foodVal,_foodVal,_foodVal, 0.5];
+ _ctrlThirst ctrlSetTextColor [ _thirstVal, _thirstVal, _thirstVal, 0.5];
+ _ctrlTemp ctrlSetTextColor [(1 - _tempVal),(1 - _tempVal), (1 - _tempVal), 0.5];
+ _ctrlCombat ctrlSetTextColor [ _combatVal, _combatVal, _combatVal, 0.5];
+} else {
+ _ctrlTemp ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_tempVal))), (Dayz_GUI_G * _tempVal), _tempVal, 1]; // Color ranges from iceblue (cold) to red (hot) // << Already Done :)
+ _ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 1];
+ _ctrlFood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_foodVal))),(Dayz_GUI_G * _foodVal),(Dayz_GUI_B * _foodVal), 1];
+ _ctrlThirst ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_thirstVal))),(Dayz_GUI_G * _thirstVal),(Dayz_GUI_B * _thirstVal), 1];
+};
+_blood = "";
+_thirst = "";
+_food = "";
+_temp = "";
+_visualtext = "";
+_audibletext = "";
+_bloodLvl = 6 min (0 max (round((r_player_blood / 2) / 1000 + 0.49)));
+_thirstLvl = round(_thirstVal / 0.25);
+_foodLvl = round(_foodVal / 0.25);
+_tempLvl = round(dayz_temperatur);
/* //Debugging Stuff would be usefull
diag_log format["DEBUG: bloodlvl: %1 r_player_blood: %2 bloodval: %3",_bloodLvl, r_player_blood, _bloodVal];
@@ -81,115 +106,113 @@ diag_log format["DEBUG: foodlvl: %1 dayz_hunger: %2 foodval: %3",_foodLvl, dayz_
diag_log format["DEBUG: templvl: %1 dayz_temperatur: %2 tempval: %3",_tempLvl, dayz_temperatur, _tempVal];
*/
-_blood = "";
-_thirst = "";
-_food = "";
-_temp = "";
-_tempImg = 0;
-_bloodLvl = 6 min (0 max (round((r_player_blood / 2) / 1000 + 0.49)));
-_thirstLvl = round(_thirstVal / 0.25);
-_foodLvl = round(_foodVal / 0.25);
-_tempLvl = round(dayz_temperatur);
+if (DZE_UI == 1) then { // Vanilla
+ // Blood Regen & BloodLoss:
+ _uiNumber = call {
+ if (r_player_bloodpersec <= -50) exitWith {-3};
+ if ((r_player_bloodpersec <= -25) && (r_player_bloodpersec > -50)) exitWith {-2};
+ if ((r_player_bloodpersec < 0) && (r_player_bloodpersec > -25)) exitWith {-1};
+ if ((r_player_bloodpersec > 5) && (r_player_bloodpersec < 25)) exitWith {1};
+ if ((r_player_bloodpersec >= 25) && (r_player_bloodpersec < 50)) exitWith {2};
+ if (r_player_bloodpersec >= 50) exitWith {3};
+ 0;
+ };
-// Blood Regen & BloodLoss:
-switch true do {
- case (r_player_bloodpersec <= -50): { _uiNumber = -3 }; // -3
- case ((r_player_bloodpersec <= -25) and (r_player_bloodpersec > -50)): { _uiNumber = -2 }; // -2
- case ((r_player_bloodpersec < 0) and (r_player_bloodpersec > -25)): { _uiNumber = -1 }; // -1
- case ((r_player_bloodpersec > 5) and (r_player_bloodpersec < 25)): { _uiNumber = 1 }; // 1
- case ((r_player_bloodpersec >= 25) and (r_player_bloodpersec < 50)): { _uiNumber = 2 }; // 2
- case (r_player_bloodpersec >= 50): { _uiNumber = 3 }; // 3
- default { _uiNumber = 0 };
+ _bloodText = "\z\addons\dayz_code\gui\status\status_blood_border";
+
+ if (r_player_infected) then {
+ _bloodText = call {
+ if (_uiNumber < 0) exitWith {_bloodText + "_down" + str(-_uiNumber) + "_sick_ca.paa"};
+ if (_uiNumber > 0) exitWith {_bloodText + "_up" + str(_uiNumber) + "_sick_ca.paa"};
+ _bloodText + "_sick_ca.paa";
+ };
+ } else {
+ _bloodText = call {
+ if (_uiNumber < 0) exitWith {_bloodText + "_down" + str(-_uiNumber) + "_ca.paa"};
+ if (_uiNumber > 0) exitWith {_bloodText + "_up" + str(_uiNumber) + "_ca.paa"};
+ _bloodText + "_ca.paa";
+ };
+ };
+
+ _ctrlBloodOuter ctrlSetText _bloodText;
+
+ _tempText = "\z\addons\dayz_code\gui\status\status_temp_border";
+
+ _tempText = call {
+ if (r_player_temp_factor <= r_player_temp_min_factor) exitWith {_tempText + "_down3_ca.paa"};
+ if ((r_player_temp_factor <= r_player_temp_min_factor*0.50) && (r_player_temp_factor > r_player_temp_min_factor)) exitWith {_tempText + "_down2_ca.paa"};
+ if ((r_player_temp_factor < r_player_temp_min_factor*0.2) && (r_player_temp_factor > r_player_temp_min_factor*0.50)) exitWith {_tempText + "_down1_ca.paa"};
+ if ((r_player_temp_factor > r_player_temp_max_factor*0.2) && (r_player_temp_factor < r_player_temp_max_factor*0.50)) exitWith {_tempText + "_up1_ca.paa"};
+ if ((r_player_temp_factor >= r_player_temp_max_factor*0.50) && (r_player_temp_factor < r_player_temp_max_factor)) exitWith {_tempText + "_up2_ca.paa"};
+ if (r_player_temp_factor >= r_player_temp_max_factor) exitWith {_tempText + "_up3_ca.paa"};
+ "\z\addons\dayz_code\gui\status\status_temp_outside_ca.paa";
+ };
+
+ _ctrlTempBorder ctrlSetText _tempText;
+
+ _bloodTestdone = player getVariable ["blood_testdone", false];
+ if (_bloodTestdone) then {
+ _bloodType = player getVariable ["blood_type", "O"];
+ _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");
+ };
};
-_bloodText = "\z\addons\dayz_code\gui\status\status_blood_border";
-
-if (r_player_infected) then {
- switch true do {
- case (_uiNumber < 0): { _bloodText = _bloodText + "_down" + str(-_uiNumber) + "_sick_ca.paa" };
- case (_uiNumber > 0): { _bloodText = _bloodText + "_up" + str(_uiNumber) + "_sick_ca.paa" };
- default { _bloodText = _bloodText + "_sick_ca.paa" };
- };
-} else {
- //if (r_player_Sepsis select 0) then {
- // _bloodText = "\z\addons\dayz_code\gui\status\status_blood_border_sick_ca.paa"
- //} else {
- switch true do {
- case (_uiNumber < 0): { _bloodText = _bloodText + "_down" + str(-_uiNumber) + "_ca.paa" };
- case (_uiNumber > 0): { _bloodText = _bloodText + "_up" + str(_uiNumber) + "_ca.paa" };
- default { _bloodText = _bloodText + "_ca.paa" };
- };
- //};
-};
-
-_ctrlBloodOuter ctrlSetText _bloodText;
+_path = if (DZE_UI == 1) then {"\z\addons\dayz_code\gui\status\"} else {"\z\addons\dayz_code\gui\status_epoch\"};
if (_bloodLvl <= 0) then {
- _blood = "\z\addons\dayz_code\gui\status\status_blood_inside_1_ca.paa";
+ _blood = _path + "status_blood_inside_1_ca.paa";
} else {
- _blood = "\z\addons\dayz_code\gui\status\status_blood_inside_" + str(_bloodLvl) + "_ca.paa";
-};
-
-
-_bloodTestdone = player getVariable ["blood_testdone", false];
-if (_bloodTestdone) then {
- _bloodType = player getVariable ["blood_type", "O"];
- _rhFactor = if (player getVariable ["rh_factor", false]) then { "pos" } else { "neg" };
- _ctrlBloodType ctrlSetText ("\z\addons\dayz_code\gui\status\status_blood_type_"+_bloodType+"_"+_rhFactor+"_ca.paa");
+ _blood = _path + "status_blood_inside_" + str(_bloodLvl) + "_ca.paa";
};
+_ctrlBlood ctrlSetText _blood;
if (_thirstLvl < 0) then { _thirstLvl = 0 };
-_thirst = "\z\addons\dayz_code\gui\status\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa";
+_thirst = _path + "status_thirst_inside_" + str(_thirstLvl) + "_ca.paa";
+_ctrlThirst ctrlSetText _thirst;
if (_foodLvl < 0) then { _foodLvl = 0 };
-_food = "\z\addons\dayz_code\gui\status\status_food_inside_" + str(_foodLvl) + "_ca.paa";
-
-switch true do {
- case (_tempLvl >= 36): { _tempImg = 4 };
- case (_tempLvl > 33 and _tempLvl < 36): { _tempImg = 3 };
- case (_tempLvl >= 30 and _tempLvl <= 33): { _tempImg = 2 };
- case (_tempLvl > 28 and _tempLvl < 30): { _tempImg = 1 };
- default { _tempImg = 0 };
-};
-_temp = "\z\addons\dayz_code\gui\status\status_temp_" + str(_tempImg) + "_ca.paa";
-
-_tempText = "\z\addons\dayz_code\gui\status\status_temp_border";
-switch true do {
- case (r_player_temp_factor <= r_player_temp_min_factor): { _tempText = _tempText + "_down3_ca.paa" };
- case ((r_player_temp_factor <= r_player_temp_min_factor*0.50) and (r_player_temp_factor > r_player_temp_min_factor)): { _tempText = _tempText + "_down2_ca.paa" };
- case ((r_player_temp_factor < r_player_temp_min_factor*0.2) and (r_player_temp_factor > r_player_temp_min_factor*0.50)): { _tempText = _tempText + "_down1_ca.paa" };
- case ((r_player_temp_factor > r_player_temp_max_factor*0.2) and (r_player_temp_factor < r_player_temp_max_factor*0.50)): { _tempText = _tempText + "_up1_ca.paa" };
- case ((r_player_temp_factor >= r_player_temp_max_factor*0.50) and (r_player_temp_factor < r_player_temp_max_factor)): { _tempText = _tempText + "_up2_ca.paa" };
- case (r_player_temp_factor >= r_player_temp_max_factor): { _tempText = _tempText + "_up3_ca.paa" };
- default { _tempText = "\z\addons\dayz_code\gui\status\status_temp_outside_ca.paa" };
-};
-_ctrlTempBorder ctrlSetText _tempText;
-
-_ctrlBlood ctrlSetText _blood;
-_ctrlThirst ctrlSetText _thirst;
+_food = _path + "status_food_inside_" + str(_foodLvl) + "_ca.paa";
_ctrlFood ctrlSetText _food;
+
+_tempImg = call {
+ if (_tempLvl >= 36) exitWith {4};
+ if (_tempLvl > 33 && _tempLvl < 36) exitWith {3};
+ if (_tempLvl >= 30 && _tempLvl <= 33) exitWith {2};
+ if (_tempLvl > 28 && _tempLvl < 30) exitWith {1};
+ 0;
+};
+_temp = _path + "status_temp_" + str(_tempImg) + "_ca.paa";
_ctrlTemp ctrlSetText _temp;
-// Visual:
-_visual = (dayz_disVisual / 185) min 1;
-if (_visual < 0.2) then {_visual = 0.2;};
-_ctrlEye ctrlSetTextColor [1, 1, 1, _visual];
+if (DZE_UI in [1,3]) then {
+ _visual = (dayz_disVisual / 185) min 1;
+ if (_visual < 0.2) then {_visual = 0.2;};
+ _ctrlEye ctrlSetTextColor [1, 1, 1, _visual];
-// Audible
-_audible = (dayz_disAudial / 40) min 1;
-if (_audible < 0.2) then {_audible = 0.2;};
-_ctrlEar ctrlSetTextColor [1, 1, 1, _audible];
+ _audible = (dayz_disAudial / 40) min 1;
+ if (_audible < 0.2) then {_audible = 0.2;};
+ _ctrlEar ctrlSetTextColor [1, 1, 1, _audible];
+} else {
+ _visual = (round((dayz_disVisual / 100) * 4)) min 5;
+ if (_visual > 0) then {_visualtext = "\z\addons\dayz_code\gui\status_epoch\val_" + str(_visual) + "_ca.paa"};
+ _ctrlEye ctrlSetText _visualtext;
+
+ _audible = (round((dayz_disAudial / 50) * 4)) min 5;
+ if (_audible > 0) then {_audibletext = "\z\addons\dayz_code\gui\status_epoch\val_" + str(_audible) + "_ca.paa"};
+ _ctrlEar ctrlSetText _audibletext;
+};
// Fracture/Broken Legs
if !(canStand player) then { //&& !(ctrlShown _ctrlFracture) makes icon flash non-stop until leg is fixed
_ctrlFracture ctrlShow true;
-}
-else {
+} else {
_ctrlFracture ctrlShow false;
};
// Flashing
-if (DZE_VanillaUICombatIcon) then {
+if ((DZE_UI == 1 && DZE_VanillaUICombatIcon) || !(DZE_UI == 1)) then {
if (_combatVal == 0) then {
_ctrlCombat call _flash;
} else {
@@ -233,8 +256,7 @@ if (_tempVal > 0.8) then {
if (r_player_injured) then {
_ctrlBleed call _flash;
-}
-else {
+} else {
_ctrlBleed ctrlShow false;
};
diff --git a/SQF/dayz_code/compile/ui_changeDisplay.sqf b/SQF/dayz_code/compile/ui_changeDisplay.sqf
index 72d6be37c..b78102b52 100644
--- a/SQF/dayz_code/compile/ui_changeDisplay.sqf
+++ b/SQF/dayz_code/compile/ui_changeDisplay.sqf
@@ -1,17 +1,19 @@
+private "_ui";
disableSerialization;
-if (profileNamespace getVariable ["statusUI",1] == 1) then {
- private "_style";
- _style = call {
- if (toLower DZE_UI == "vanilla") exitWith {"playerStatusGUI"};
- if (toLower DZE_UI in ["whiteborders","greenborders"]) exitWith {"playerStatusGUI_legacy"};
- "playerStatusGUI_epoch"; // default
+DZE_UI = (profileNamespace getVariable ["statusUI",1]);
+
+if !(DZE_UI == 0) then {
+ _ui = call {
+ if (DZE_UI == 1) exitWith {"playerStatusGUI"};
+ if (DZE_UI == 2) exitWith {"playerStatusGUI_epoch"};
+ "playerStatusGUI_legacy";
};
- 3 cutRsc [_style,"PLAIN",0];
+ 3 cutRsc [_ui,"PLAIN",0];
call player_updateGui;
- call ui_initDisplay;
- hintSilent "";
+ //call ui_initDisplay; // I think this function is old and no longer necessary - JasonTM.
+ //hintSilent ""; // not sure why this is here.
} else {
3 cutRsc ["default","PLAIN",0];
- hintSilent "";
+ //hintSilent ""; // or here.
};
diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf
index 5115c0b5c..f2523b88c 100644
--- a/SQF/dayz_code/configVariables.sqf
+++ b/SQF/dayz_code/configVariables.sqf
@@ -29,7 +29,6 @@ if (!isDedicated) then {
DZE_HumanityTargetDistance = 25; // Distance to show name tags (red for bandit, blue for hero, green for friend)
DZE_HeartBeat = false; // Enable heartbeat sound when looking at bandit (<= -3000 humanity) up close
DZE_RestrictSkins = []; // Clothes that players are not allowed to wear. i.e. ["Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ"] etc.
- DZE_UI = "vanilla"; //"vanilla","epoch","dark","WhiteBorders","GreenBorders" UI status icons style. Dark accommodates color blind people.
DZE_VanillaUICombatIcon = true; //Display or hide combat UI icon if using DZE_UI = "vanilla"; otherwise it has no affect.
timezoneswitch = 0; // Changes murderMenu times with this offset in hours.
diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf
index 6a1508e8e..0770d4512 100644
--- a/SQF/dayz_code/init/compiles.sqf
+++ b/SQF/dayz_code/init/compiles.sqf
@@ -36,11 +36,7 @@ if (!isDedicated) then {
building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnZombies.sqf";
player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; //Runs when player fires. Alerts nearby Zeds depending on calibre and audial rating
player_packTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf";
- player_updateGui = call {
- if (toLower DZE_UI == "vanilla") exitWith {compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";};
- if (toLower DZE_UI == "dark") exitWith {compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGuiDark.sqf";};
- compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGuiEpoch.sqf"; // default Epoch.
- };
+ player_updateGui = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";
player_crossbowBolt = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_crossbowBolt.sqf";
player_music = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_music.sqf"; //Used to generate ambient music
player_death = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf";
@@ -239,7 +235,8 @@ if (!isDedicated) then {
_myExp = _myExp * 0.7;
_myExp
};
-
+
+ /* This function doesn't appear to be necessary. Leaving it commented out for now - JasonTM.
ui_initDisplay = {
private ["_ctrlBleed","_ctrlFracture","_display","_control"];
disableSerialization;
@@ -254,7 +251,7 @@ if (!isDedicated) then {
_ctrlFracture = _display displayCtrl 1203;
_ctrlFracture ctrlShow false;
};
- /* // These controls don't exist yet
+ // These controls don't exist yet
_ctrlDogFoodBorder = _display displayCtrl 1501;
_ctrlDogFoodBorder ctrlShow false;
_ctrlDogFood = _display displayCtrl 1701;
@@ -264,8 +261,9 @@ if (!isDedicated) then {
_ctrlDogWaterBorder ctrlShow false;
_ctrlDogWater = _display displayCtrl 1702;
_ctrlDogWater ctrlShow false
- */
+
};
+ */
dayz_angleCheck = {
private ["_degree","_tPos","_zPos","_inAngle","_agent","_target","_eyeDir"];
diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf
index 88d7175f2..893c431fa 100644
--- a/SQF/dayz_code/init/variables.sqf
+++ b/SQF/dayz_code/init/variables.sqf
@@ -483,6 +483,7 @@ if (!isDedicated) then {
dayz_animalDistance = 600; // Used to calculate the distance from players that animals should spawn and be deleted.
// Epoch Additions
+ DZE_UI = profileNamespace getVariable ["statusUI",1];
dayz_combination = "";
keypadCancel = false; //Brute force fix
keyPadReset = {uiSleep 2; keypadCancel = false;};
diff --git a/SQF/dayz_code/medical/publicEH/medBandaged.sqf b/SQF/dayz_code/medical/publicEH/medBandaged.sqf
index 00ae066dc..b7aa1ac74 100644
--- a/SQF/dayz_code/medical/publicEH/medBandaged.sqf
+++ b/SQF/dayz_code/medical/publicEH/medBandaged.sqf
@@ -1,6 +1,5 @@
// animHealed.sqf
private["_msg","_isSepsis","_unit","_medic","_display","_control"];
-disableserialization;
_unit = _this select 0;
_medic = _this select 1;
@@ -23,11 +22,6 @@ if (r_player_blood == r_player_bloodTotal) then {
dayz_sourceBleeding = objNull;
call fnc_usec_resetWoundPoints;
-//Ensure Control is visible
-_display = uiNamespace getVariable 'DAYZ_GUI_display';
-_control = _display displayCtrl 1303;
-_control ctrlShow false;
-
if (_medic != player) then {
_msg = if (_isSepsis) then {"str_actions_medical_sepsisbandage_received"} else {"str_actions_medical_bandage_received"};
format [localize _msg,(name _medic)] call dayz_rollingMessages;
diff --git a/SQF/dayz_code/medical/publicEH/medMorphine.sqf b/SQF/dayz_code/medical/publicEH/medMorphine.sqf
index 408d7ec67..0d7e46791 100644
--- a/SQF/dayz_code/medical/publicEH/medMorphine.sqf
+++ b/SQF/dayz_code/medical/publicEH/medMorphine.sqf
@@ -1,5 +1,4 @@
private ["_msg","_unit","_medic","_item"];
-disableserialization;
_unit = _this select 0;
_medic = _this select 1;
@@ -12,11 +11,6 @@ _unit setHit["hands",0];
_unit setVariable ["hit_legs",0,true];
_unit setVariable ["hit_hands",0,true];
-//Ensure Control is visible
-_display = uiNamespace getVariable 'DAYZ_GUI_display';
-_control = _display displayCtrl 1203;
-_control ctrlShow false;
-
if (_medic != player) then {
_msg = if (_item == "equip_woodensplint") then {"STR_ITEM_NAME_WOODENSPLINT"} else {"STR_EQUIP_NAME_15"};
format [localize "str_actions_medical_general_received",(name _medic), localize _msg] call dayz_rollingMessages;
diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml
index 3a723bd8e..28bc8f502 100644
--- a/SQF/dayz_code/stringtable.xml
+++ b/SQF/dayz_code/stringtable.xml
@@ -23670,6 +23670,21 @@
Maskovací oblečení vytvořeno speciálně pro použítí v lesních oblestech. Lze rozbalit a obléknout.
Une tenue de camouflage spécialement étudiée pour se fondre dans la végétation. Peut être porté.
Schwere Tarnkleidung, die dichtes Unterholz simuliert. Kann ausgepackt und getragen werden.
-
+
+
+ Vanilla
+
+
+ Epoch
+
+
+ Dark
+
+
+ White Borders
+
+
+ Green Borders
+
diff --git a/SQF/dayz_code/system/scheduler/sched_gui.sqf b/SQF/dayz_code/system/scheduler/sched_gui.sqf
index 3cce756a6..075eb50bd 100644
--- a/SQF/dayz_code/system/scheduler/sched_gui.sqf
+++ b/SQF/dayz_code/system/scheduler/sched_gui.sqf
@@ -4,23 +4,23 @@ sched_gui_init = { [false] };
sched_gui = {
HIDE_FSM_VARS
- private [ "_array", "_initDone", "_style"];
+ private [ "_array", "_initDone", "_ui"];
_initDone = _this select 0;
if ((!_initDone and !isNil 'Dayz_loginCompleted') and {(Dayz_loginCompleted)}) then {
- if (profileNamespace getVariable ["statusUI",1] == 1) then {
- _style = call {
- if (toLower DZE_UI == "vanilla") exitWith {"playerStatusGUI";};
- if (toLower DZE_UI in ["whiteborders","greenborders"]) exitWith {"playerStatusGUI_legacy";};
- "playerStatusGUI_epoch"; // default
+ if !(DZE_UI == 0) then {
+ _ui = call {
+ if (DZE_UI == 1) exitWith {"playerStatusGUI"};
+ if (DZE_UI == 2) exitWith {"playerStatusGUI_epoch"};
+ "playerStatusGUI_legacy";
};
- 3 cutRsc [_style,"PLAIN",3]; // show the whole HUD
+ 3 cutRsc [_ui,"PLAIN",0];
} else {
[] spawn {uiSleep 2; systemChat (localize "STR_UI_STATUS_ICONS_TOOLTIP");};
//This can be removed after friendlies system is removed from player_updateGUI
uiNamespace setVariable ["DAYZ_GUI_display",displayNull];
- };
+ };
_initDone = true;
};
//else {