diff --git a/addons/sys_gui/fnc_volumeKeyDown.sqf b/addons/sys_gui/fnc_volumeKeyDown.sqf index 57498d706..f4838a8aa 100644 --- a/addons/sys_gui/fnc_volumeKeyDown.sqf +++ b/addons/sys_gui/fnc_volumeKeyDown.sqf @@ -15,7 +15,20 @@ * Public: No */ -if (!alive acre_player || dialog || ACRE_IS_SPECTATOR || GVAR(volumeOpen)) exitWith {false}; +if (!alive acre_player || ACRE_IS_SPECTATOR || GVAR(volumeOpen)) exitWith {false}; + +// Abort on open Dialogs that aren't an ACE Progressbar +private _aceProgressBar = displayNull; +if ( + (dialog && !EGVAR(sys_core,aceLoaded)) || + {_aceProgressBar = (uiNamespace getVariable ["ace_common_dlgProgress", displayNull]); _aceProgressBar isEqualTo displayNull} +) exitWith {false}; + +// Add MouseScroll EH to open ACE Progressbar, for volume control +if (dialog && {!(_aceProgressBar getVariable [QGVAR(mouseScrollEHAdded), false])}) then { + _aceProgressBar displayAddEventHandler ["MouseZChanged", LINKFUNC(onMouseZChanged)]; + _aceProgressBar setVariable [QGVAR(mouseScrollEHAdded), true]; +}; inGameUISetEventHandler ["PrevAction", "true"]; inGameUISetEventHandler ["NextAction", "true"];