Merge pull request #2065 from worldwidesorrow/master

Add bordered status icon options
This commit is contained in:
worldwidesorrow
2020-02-12 04:59:53 -06:00
committed by GitHub
19 changed files with 263 additions and 147 deletions

View File

@@ -126,7 +126,6 @@ class RscTitles
};
};
};
class playerStatusGUI {
idd = 6900;
movingEnable = 0;
@@ -357,43 +356,8 @@ class RscTitles
};
};
};
class DZ_BlackScreen {
idd = -1;
movingEnable = 0;
enableSimulation = 1;
enableDisplay = 1;
onLoad = "uiNamespace setVariable ['DZ_BlackScreen', _this select 0];";
duration = 99999999999999999;
fadein = 0;
fadeout = 0;
class controls {
class Background: RscText {
idc = -1;
x = safezoneX;
y = safezoneY;
w = safezoneW;
h = safezoneH;
text = "";
colorText[] = {0,0,0,0};
colorBackground[] = {0,0,0,1};
};
class Text: RscText {
idc = 1;
x = 0.3 * safezoneW + safezoneX;
y = 0.859137 * safezoneH + safezoneY;
w = 0.400445 * safezoneW;
h = 0.139148 * safezoneH;
text = "";
style = 0x02 + 0x10 + 0x200;
lineSpacing = 1;
sizeEx = 0.034;
};
};
};
class playerStatusGUI_epoch {
idd = 690000;
idd = 6905;
movingEnable = 0;
duration = 100000;
name = "statusBorder";
@@ -407,86 +371,14 @@ class RscTitles
w = 0.5;
h = 0.1;
};
class RscPicture_1901: RscPictureGUI
{
idc = 1901;
//text = "\z\addons\dayz_code\gui\status\status_bg.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.86 * safezoneH + safezoneY;//2
w = 0.075;
h = 0.10;
};
class RscPicture_1307 : RscPictureGUI {
idc = 1307;
text = "\z\addons\dayz_code\gui\status\status_combat_inside_ca.paa";
text = "\z\addons\dayz_code\gui\status_epoch\status_combat_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.65 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1201: RscPictureGUI
{
idc = 1201;
//text = "\z\addons\dayz_code\gui\status\status_food_border_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.86 * safezoneH + safezoneY;//2
w = 0.075;
h = 0.10;
};
class RscPicture_1900: RscPictureGUI
{
idc = 1900;
//text = "\z\addons\dayz_code\gui\status\status_bg.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.79 * safezoneH + safezoneY; //3
w = 0.075;
h = 0.10;
};
class RscPicture_1200: RscPictureGUI
{
idc = 1200;
//text = "\z\addons\dayz_code\gui\status\status_blood_border_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.79 * safezoneH + safezoneY; //3
w = 0.075;
h = 0.10;
};
class RscPicture_1902: RscPictureGUI
{
idc = 1902;
//text = "\z\addons\dayz_code\gui\status\status_bg.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.93 * safezoneH + safezoneY; //1
w = 0.075;
h = 0.10;
};
class RscPicture_1202: RscPictureGUI
{
idc = 1202;
//text = "\z\addons\dayz_code\gui\status\status_thirst_border_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.93 * safezoneH + safezoneY; //1
w = 0.075;
h = 0.10;
};
class RscPicture_1908: RscPictureGUI
{
idc = 1908;
//text = "\z\addons\dayz_code\gui\status\status_bg.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.72 * safezoneH + safezoneY; //3
w = 0.075;
h = 0.10;
};
class RscPicture_1208: RscPictureGUI
{
idc = 1208;
//text = "\z\addons\dayz_code\gui\status_epoch\status_temp_outside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.72 * safezoneH + safezoneY; //3
w = 0.075;
h = 0.10;
};
class RscPicture_1203: RscPictureGUI
{
idc = 1203;
@@ -516,24 +408,6 @@ class RscTitles
h = 0.10;
colorText[] = {1,1,1,1};
};
class RscPicture_1205: RscPictureGUI
{
idc = 1205;
//text = "\z\addons\dayz_code\gui\status\status_bg.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.30 * safezoneH + safezoneY;
w = 0.075;
h = 0.10;
};
class RscPicture_1206: RscPictureGUI
{
idc = 1206;
//text = "\z\addons\dayz_code\gui\status\status_bg.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.37 * safezoneH + safezoneY;
w = 0.075;
h = 0.10;
};
};
class Controls {
class RscPicture_1301: RscPictureGUI
@@ -585,7 +459,7 @@ class RscTitles
class RscPicture_1304: RscPictureGUI
{
idc = 1304;
text = "\z\addons\dayz_code\gui\status\status_ear_ca.paa";
text = "\z\addons\dayz_code\gui\status_epoch\status_ear_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.30 * safezoneH + safezoneY;
w = 0.075;
@@ -594,7 +468,7 @@ class RscTitles
class RscPicture_1305: RscPictureGUI
{
idc = 1305;
text = "\z\addons\dayz_code\gui\status\status_eye_ca.paa";
text = "\z\addons\dayz_code\gui\status_epoch\status_eye_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.37 * safezoneH + safezoneY;
w = 0.075;
@@ -620,6 +494,223 @@ class RscTitles
};
};
};
class playerStatusGUI_legacy
{
idd = 6906;
movingEnable = 0;
duration = 100000;
name = "statusBorder";
onLoad = "uiNamespace setVariable ['DAYZ_GUI_display', _this select 0];";
class ControlsBackground {
class RscStructuredText_1199: RscStructuredText
{
idc = 1199;
x = 0.250001;
y = 0.350001;
w = 0.5;
h = 0.1;
};
class RscPicture_1201: RscPictureGUI
{
idc = 1201;
text = "\z\addons\dayz_code\gui\status_epoch\status_food_border_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.93 * safezoneH + safezoneY; //1
w = 0.06;
h = 0.08;
};
class RscPicture_1200: RscPictureGUI
{
idc = 1200;
text = "\z\addons\dayz_code\gui\status_epoch\status_blood_border_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.86 * safezoneH + safezoneY;//2
w = 0.06;
h = 0.08;
};
class RscPicture_1202: RscPictureGUI
{
idc = 1202;
text = "\z\addons\dayz_code\gui\status_epoch\status_thirst_border_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.79 * safezoneH + safezoneY; //3
w = 0.06;
h = 0.08;
};
class RscPicture_1208: RscPictureGUI
{
idc = 1208;
text = "\z\addons\dayz_code\gui\status_epoch\status_temp_outside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.72 * safezoneH + safezoneY; //3
w = 0.06;
h = 0.08;
};
class RscPicture_1207 : RscPictureGUI {
idc = 1207;
text = "\z\addons\dayz_code\gui\status_epoch\status_combat_border_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.65 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1203: RscPictureGUI
{
idc = 1203;
text = "\z\addons\dayz_code\gui\status_epoch\status_fracture_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.58 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
colorText[] = {1,1,1,1};
};
class RscPicture_1904: RscPictureGUI
{
idc = 1904;
//text = "\z\addons\dayz_code\gui\status\status_bg.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.51 * safezoneH + safezoneY;
w = 0.075;
h = 0.10;
};
class RscPicture_1204: RscPictureGUI
{
idc = 1204;
text = "\z\addons\dayz_code\gui\status\status_sound_muted.paa"; // previously status_connection_ca which is not used
x = 0.955313 * safezoneW + safezoneX;
y = 0.51 * safezoneH + safezoneY;
w = 0.075;
h = 0.10;
colorText[] = {1,1,1,1};
};
};
class Controls{
class RscPicture_1301: RscPictureGUI
{
idc = 1301;
//text = "\z\addons\dayz_code\gui\status_epoch\status_food_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.93 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1300: RscPictureGUI
{
idc = 1300;
//text = "\z\addons\dayz_code\gui\status_epoch\status_blood_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.86 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1302: RscPictureGUI
{
idc = 1302;
//text = "\z\addons\dayz_code\gui\status_epoch\status_thirst_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.79 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1306: RscPictureGUI
{
idc = 1306;
//text = "\z\addons\dayz_code\gui\status_epoch\status_temp_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.72 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1303: RscPictureGUI
{
idc = 1303;
text = "\z\addons\dayz_code\gui\status_epoch\status_bleeding_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.86 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
colorText[] = {1,1,1,0.5};
};
class RscPicture_1304: RscPictureGUI
{
idc = 1304;
text = "\z\addons\dayz_code\gui\status_epoch\status_ear_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.30 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1305: RscPictureGUI
{
idc = 1305;
text = "\z\addons\dayz_code\gui\status_epoch\status_eye_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.37 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
class RscPicture_1308: RscPictureGUI
{
idc = 1308;
//text = "\z\addons\dayz_code\gui\status\val_5_ca.paa";
x = 0.929813 * safezoneW + safezoneX;
y = 0.30 * safezoneH + safezoneY;
w = 0.075;
h = 0.10;
};
class RscPicture_1309: RscPictureGUI
{
idc = 1309;
//text = "\z\addons\dayz_code\gui\status\val_5_ca.paa";
x = 0.929813 * safezoneW + safezoneX;
y = 0.37 * safezoneH + safezoneY;
w = 0.075;
h = 0.10;
};
class RscPicture_1307 : RscPictureGUI {
idc = 1307;
text = "\z\addons\dayz_code\gui\status_epoch\status_combat_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.65 * safezoneH + safezoneY;
w = 0.06;
h = 0.08;
};
};
};
class DZ_BlackScreen {
idd = -1;
movingEnable = 0;
enableSimulation = 1;
enableDisplay = 1;
onLoad = "uiNamespace setVariable ['DZ_BlackScreen', _this select 0];";
duration = 99999999999999999;
fadein = 0;
fadeout = 0;
class controls {
class Background: RscText {
idc = -1;
x = safezoneX;
y = safezoneY;
w = safezoneW;
h = safezoneH;
text = "";
colorText[] = {0,0,0,0};
colorBackground[] = {0,0,0,1};
};
class Text: RscText {
idc = 1;
x = 0.3 * safezoneW + safezoneX;
y = 0.859137 * safezoneH + safezoneY;
w = 0.400445 * safezoneW;
h = 0.139148 * safezoneH;
text = "";
style = 0x02 + 0x10 + 0x200;
lineSpacing = 1;
sizeEx = 0.034;
};
};
};
class RSC_DZ_Messages {
idd = -1;
movingEnable = 0;

View File

@@ -75,8 +75,8 @@ _blood = "\z\addons\dayz_code\gui\status_epoch\status_blood_inside_6_ca.paa";
_thirst = "\z\addons\dayz_code\gui\status_epoch\status_thirst_inside_4_ca.paa";
_food = "\z\addons\dayz_code\gui\status_epoch\status_food_inside_4_ca.paa";
_temp = "\z\addons\dayz_code\gui\status_epoch\status_temp_4_ca.paa";
_visualtext = "\z\addons\dayz_code\gui\status\status_eye_ca.paa";
_audibletext = "\z\addons\dayz_code\gui\status\status_ear_ca.paa";
_visualtext = "\z\addons\dayz_code\gui\status_epoch\status_eye_ca.paa";
_audibletext = "\z\addons\dayz_code\gui\status_epoch\status_ear_ca.paa";
_ctrlBlood ctrlSetText _blood;
_ctrlThirst ctrlSetText _thirst;

View File

@@ -1,4 +1,4 @@
private ["_flash","_display","_ctrlBlood","_ctrlBleed","_bloodVal","_humanityName","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl","_color","_string","_humanity","_size","_friendlies","_id","_rID","_rfriendlies","_rfriendlyTo","_distance","_targetControl"];
private ["_ctrlCombatBorder","_ctrlBloodOuter","_ctrlFoodBorder","_ctrlThirstBorder","_ctrlTempBorder","_flash","_display","_ctrlBlood","_ctrlBleed","_bloodVal","_humanityName","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl","_color","_string","_humanity","_size","_friendlies","_id","_rID","_rfriendlies","_rfriendlyTo","_distance","_targetControl"];
_flash = {
if (ctrlShown _this) then {
@@ -18,6 +18,20 @@ _combatVal = if (player getVariable["combattimeout",0] >= diag_tickTime) then {0
_display = uiNamespace getVariable 'DAYZ_GUI_display';
if (isNil "_display") exitWith {}; // not ready
if (toLower DZE_UI == "whiteborders") then {
_ctrlBloodOuter = _display displayCtrl 1200;
_ctrlFoodBorder = _display displayCtrl 1201;
_ctrlThirstBorder = _display displayCtrl 1202;
_ctrlTempBorder = _display displayCtrl 1208;
_ctrlCombatBorder = _display displayCtrl 1207;
// Set border colors to white so they show up better against a green background.
_ctrlBloodOuter ctrlSetTextColor [1,1,1,1];
_ctrlFoodBorder ctrlSetTextColor [1,1,1,1];
_ctrlThirstBorder ctrlSetTextColor [1,1,1,1];
_ctrlTempBorder ctrlSetTextColor [1,1,1,1];
_ctrlCombatBorder ctrlSetTextColor [1,1,1,1];
};
_ctrlBlood = _display displayCtrl 1300;
_ctrlBleed = _display displayCtrl 1303;
_bloodVal = r_player_blood / r_player_bloodTotal;
@@ -101,13 +115,13 @@ _ctrlTemp ctrlSetText _temp;
// Visual:
_visualtext = "";
_visual = (round((dayz_disVisual / 100) * 4)) min 5;
if (_visual > 0) then {_visualtext = "\z\addons\dayz_code\gui\status\val_" + str(_visual) + "_ca.paa"};
if (_visual > 0) then {_visualtext = "\z\addons\dayz_code\gui\status_epoch\val_" + str(_visual) + "_ca.paa"};
_ctrlEye ctrlSetText _visualtext;
// Audible
_audibletext = "";
_audible = (round((dayz_disAudial / 50) * 4)) min 5;
if (_audible > 0) then {_audibletext = "\z\addons\dayz_code\gui\status\val_" + str(_audible) + "_ca.paa"};
if (_audible > 0) then {_audibletext = "\z\addons\dayz_code\gui\status_epoch\val_" + str(_audible) + "_ca.paa"};
_ctrlEar ctrlSetText _audibletext;
// Fracture/Broken Legs

View File

@@ -1,7 +1,13 @@
disableSerialization;
if (profileNamespace getVariable ["statusUI",1] == 1) then {
3 cutRsc [if (toLower DZE_UI == "vanilla") then {"playerStatusGUI"} else {"playerStatusGUI_epoch"},"PLAIN",0];
private "_style";
_style = call {
if (toLower DZE_UI == "vanilla") exitWith {"playerStatusGUI"};
if (toLower DZE_UI in ["whiteborders","greenborders"]) exitWith {"playerStatusGUI_legacy"};
"playerStatusGUI_epoch"; // default
};
3 cutRsc [_style,"PLAIN",0];
call player_updateGui;
call ui_initDisplay;
hintSilent "";

View File

@@ -29,7 +29,7 @@ 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" UI status icons style. Dark accommodates color blind people.
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.

View File

@@ -36,10 +36,10 @@ 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 = switch (toLower DZE_UI) do {
case "dark": {compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGuiDark.sqf";};
case "epoch": {compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGuiEpoch.sqf";};
case "vanilla": {compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.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_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

View File

@@ -4,13 +4,18 @@ sched_gui_init = { [false] };
sched_gui = {
HIDE_FSM_VARS
private [ "_array", "_initDone" ];
private [ "_array", "_initDone", "_style"];
_initDone = _this select 0;
if ((!_initDone and !isNil 'Dayz_loginCompleted') and {(Dayz_loginCompleted)}) then {
if (profileNamespace getVariable ["statusUI",1] == 1) then {
3 cutRsc [if (toLower DZE_UI == "vanilla") then {"playerStatusGUI"} else {"playerStatusGUI_epoch"},"PLAIN",3]; // show the whole HUD
_style = call {
if (toLower DZE_UI == "vanilla") exitWith {"playerStatusGUI";};
if (toLower DZE_UI in ["whiteborders","greenborders"]) exitWith {"playerStatusGUI_legacy";};
"playerStatusGUI_epoch"; // default
};
3 cutRsc [_style,"PLAIN",3]; // show the whole HUD
} else {
[] spawn {uiSleep 2; systemChat (localize "STR_UI_STATUS_ICONS_TOOLTIP");};
//This can be removed after friendlies system is removed from player_updateGUI