mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +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:
21
SQF/dayz_code/compile/player_toggleSoundMute.sqf
Normal file
21
SQF/dayz_code/compile/player_toggleSoundMute.sqf
Normal file
@@ -0,0 +1,21 @@
|
||||
private ["_background","_icon","_display"];
|
||||
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable "DAYZ_GUI_display";
|
||||
|
||||
if (!isNil "_display") then {
|
||||
_background = _display displayCtrl 1904;
|
||||
_icon = _display displayCtrl 1204;
|
||||
|
||||
if (dayz_soundMuted) then {
|
||||
dayz_soundMuted = false;
|
||||
1 fadeSound 1;
|
||||
_background ctrlShow false;
|
||||
_icon ctrlShow false;
|
||||
} else {
|
||||
dayz_soundMuted = true;
|
||||
1 fadeSound 0.25;
|
||||
_background ctrlShow true;
|
||||
_icon ctrlShow true;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user