Add lower volume / earplugs hotkey and status UI icon

This commit is contained in:
ebaydayz
2016-04-30 21:19:06 -04:00
parent ba751dad4a
commit ab7254a121
11 changed files with 42 additions and 10 deletions

View File

@@ -55,6 +55,10 @@ if (isNil "keyboard_keys") then {
};
_handled = true;
};
_muteSound = {
call player_muteSound;
_handled = true;
};
_rifle = {
2 call dz_fn_switchWeapon;
_handled = true;
@@ -326,6 +330,7 @@ if (isNil "keyboard_keys") then {
[actionKeys "Diary", _journal] call _addArray;
[actionKeys "NetworkStats", _journal] call _addArray;
//[actionKeys "Turbo", _turbo] call _addArray;
[[DIK_F1], _muteSound] call _addArray;
[[DIK_F4, DIK_TAB, DIK_DELETE], _forcesave] call _addArray;
//[[DIK_F4, DIK_RMENU, DIK_LMENU,DIK_LSHIFT,DIK_RSHIFT,DIK_ESCAPE], _forcesave2] call _addArray;
[actionKeys "LeanLeft", _build_left ] call _addArray;
@@ -337,7 +342,7 @@ if (isNil "keyboard_keys") then {
[actionKeys "ForceCommandingMode", {DZE_5 = true;_handled = true;}] call _addArray;
[[ DIK_F9, DIK_F10, DIK_F11,
DIK_F8,DIK_F7,DIK_F6,DIK_F5,DIK_F4,
DIK_F3,DIK_F2,DIK_F1,DIK_9,
DIK_F3,DIK_F2,DIK_9,
DIK_8,DIK_7,DIK_6,DIK_5,DIK_4], _block] call _addArray;
if (serverCommandAvailable "#kick") then {
[[DIK_F12], gcam_onoff] call _addArray; // GCAM: F12 to start (for admins only)

View File

@@ -0,0 +1,18 @@
private ["_control","_display"];
disableSerialization;
_display = uiNamespace getVariable "DAYZ_GUI_display";
if (!isNil "_display") then {
_control = _display displayCtrl 1204;
if (dayz_soundMuted) then {
dayz_soundMuted = false;
1 fadeSound 1;
_control ctrlShow false;
} else {
dayz_soundMuted = true;
1 fadeSound 0.25;
_control ctrlShow true;
};
};

View File

@@ -45,9 +45,10 @@ _ctrlEar = _display displayCtrl 1304;
_ctrlEye = _display displayCtrl 1305;
_ctrlFracture = _display displayCtrl 1203;
_control = _display displayCtrl 1204; //status_connection_ca.paa ???
_control ctrlShow false;
if (!dayz_soundMuted) then {
_control = _display displayCtrl 1204; //muted speaker icon
_control ctrlShow false;
};
//Food/Water/Blood
/*

View File

@@ -46,8 +46,10 @@ _ctrlEye = _display displayCtrl 1305;
_ctrlCombat = _display displayCtrl 1307;
_ctrlFracture = _display displayCtrl 1203;
_control = _display displayCtrl 1204; //status_connection_ca.paa ???
_control ctrlShow false;
if (!dayz_soundMuted) then {
_control = _display displayCtrl 1204; //muted speaker icon
_control ctrlShow false;
};
//Food/Water/Blood
_ctrlBlood ctrlSetTextColor [(1 - _bloodVal),(1 - _bloodVal),(1 - _bloodVal), 0.5];

View File

@@ -37,8 +37,10 @@ _ctrlEye = _display displayCtrl 1305;
_ctrlCombat = _display displayCtrl 1307;
_ctrlFracture = _display displayCtrl 1203;
_control = _display displayCtrl 1204; //status_connection_ca.paa ???
_control ctrlShow false;
if (!dayz_soundMuted) then {
_control = _display displayCtrl 1204; //muted speaker icon
_control ctrlShow false;
};
//Food/Water/Blood
_ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 0.5];

View File

@@ -7,6 +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
_buildables = count ((getposATL _vehicle) nearObjects ["DZ_buildables", 3]);
if (_buildables > 0) then {