mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Add better sound muted status UI icon and background
Icon contributed by Tugodoomer and AlexAFlorov. See https://github.com/DayZMod/DayZ/issues/625 for details
This commit is contained in:
@@ -56,7 +56,7 @@ if (isNil "keyboard_keys") then {
|
||||
_handled = true;
|
||||
};
|
||||
_muteSound = {
|
||||
call player_muteSound;
|
||||
call player_toggleSoundMute;
|
||||
_handled = true;
|
||||
};
|
||||
_rifle = {
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
private ["_control","_display"];
|
||||
private ["_background","_icon","_display"];
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable "DAYZ_GUI_display";
|
||||
|
||||
if (!isNil "_display") then {
|
||||
_control = _display displayCtrl 1204;
|
||||
_background = _display displayCtrl 1904;
|
||||
_icon = _display displayCtrl 1204;
|
||||
|
||||
if (dayz_soundMuted) then {
|
||||
dayz_soundMuted = false;
|
||||
1 fadeSound 1;
|
||||
_control ctrlShow false;
|
||||
_background ctrlShow false;
|
||||
_icon ctrlShow false;
|
||||
} else {
|
||||
dayz_soundMuted = true;
|
||||
1 fadeSound 0.25;
|
||||
_control ctrlShow true;
|
||||
_background ctrlShow true;
|
||||
_icon ctrlShow true;
|
||||
};
|
||||
};
|
||||
@@ -45,10 +45,12 @@ _ctrlTemp = _display displayCtrl 1306;
|
||||
_ctrlEar = _display displayCtrl 1304;
|
||||
_ctrlEye = _display displayCtrl 1305;
|
||||
_ctrlFracture = _display displayCtrl 1203;
|
||||
_ctrlMuteBackground = _display displayCtrl 1904;
|
||||
_ctrlMuteIcon = _display displayCtrl 1204;
|
||||
|
||||
if (!dayz_soundMuted) then {
|
||||
_control = _display displayCtrl 1204; //muted speaker icon
|
||||
_control ctrlShow false;
|
||||
_ctrlMuteBackground ctrlShow false;
|
||||
_ctrlMuteIcon ctrlShow false;
|
||||
};
|
||||
|
||||
//Food/Water/Blood
|
||||
|
||||
@@ -45,10 +45,12 @@ _ctrlEye = _display displayCtrl 1305;
|
||||
//_ctrlHumanity = _display displayCtrl 1207;
|
||||
_ctrlCombat = _display displayCtrl 1307;
|
||||
_ctrlFracture = _display displayCtrl 1203;
|
||||
_ctrlMuteBackground = _display displayCtrl 1904;
|
||||
_ctrlMuteIcon = _display displayCtrl 1204;
|
||||
|
||||
if (!dayz_soundMuted) then {
|
||||
_control = _display displayCtrl 1204; //muted speaker icon
|
||||
_control ctrlShow false;
|
||||
_ctrlMuteBackground ctrlShow false;
|
||||
_ctrlMuteIcon ctrlShow false;
|
||||
};
|
||||
|
||||
//Food/Water/Blood
|
||||
|
||||
@@ -36,10 +36,12 @@ _ctrlEye = _display displayCtrl 1305;
|
||||
//_ctrlHumanity = _display displayCtrl 1207;
|
||||
_ctrlCombat = _display displayCtrl 1307;
|
||||
_ctrlFracture = _display displayCtrl 1203;
|
||||
_ctrlMuteBackground = _display displayCtrl 1904;
|
||||
_ctrlMuteIcon = _display displayCtrl 1204;
|
||||
|
||||
if (!dayz_soundMuted) then {
|
||||
_control = _display displayCtrl 1204; //muted speaker icon
|
||||
_control ctrlShow false;
|
||||
_ctrlMuteBackground ctrlShow false;
|
||||
_ctrlMuteIcon ctrlShow false;
|
||||
};
|
||||
|
||||
//Food/Water/Blood
|
||||
|
||||
@@ -7,7 +7,7 @@ _position = _this select 1;
|
||||
_unit = _this select 2;
|
||||
|
||||
if (_unit == player) then {
|
||||
if (dayz_soundMuted) then {call player_muteSound;}; // Automatically disable sound mute on vehicle exit
|
||||
if (dayz_soundMuted) then {call player_toggleSoundMute;}; // Automatically disable sound mute on vehicle exit
|
||||
_buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
|
||||
if (_buildables > 0) then {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user