diff --git a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf index aef88543be..2a9b26e71c 100644 --- a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf +++ b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf @@ -15,6 +15,8 @@ params ["_statement"]; +ACE_DEPRECATED("ace_common_fnc_addScrollWheelEventHandler", "3.8.0", "'MouseZChanged' Display EventHandler"); + if (_statement isEqualType "") then { _statement = compile _statement; }; diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index 313406a3f1..226efc5ef7 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -55,3 +55,9 @@ class Extended_AnimChanged_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/dragging/XEH_missionDisplayLoad.sqf b/addons/dragging/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/dragging/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/dragging/XEH_postInit.sqf b/addons/dragging/XEH_postInit.sqf index 5a54f8c8a2..9e20d8ee60 100644 --- a/addons/dragging/XEH_postInit.sqf +++ b/addons/dragging/XEH_postInit.sqf @@ -8,8 +8,6 @@ if (isServer) then { if (!hasInterface) exitWith {}; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - if (isNil "ACE_maxWeightDrag") then { ACE_maxWeightDrag = 800; }; diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index 0a40c12726..ced23c6b56 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -32,3 +32,9 @@ class Extended_Put_EventHandlers { GVAR(takeHandler) = QUOTE([ARR_3(_this select 1, _this select 0, _this select 2)] call FUNC(onInventoryChanged)); }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/explosives/XEH_missionDisplayLoad.sqf b/addons/explosives/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/explosives/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index e8f12ca6e3..57cbecba75 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -81,5 +81,3 @@ if (isServer) then { _this call FUNC(interactEH); }] call EFUNC(common,addEventHandler); - -[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(common,addScrollWheelEventHandler); diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp index 93be6e902b..f4febe40e9 100644 --- a/addons/interaction/CfgEventHandlers.hpp +++ b/addons/interaction/CfgEventHandlers.hpp @@ -24,3 +24,9 @@ class Extended_Respawn_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/interaction/XEH_missionDisplayLoad.sqf b/addons/interaction/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/interaction/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index c57fd09191..66e0cb1341 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -32,8 +32,6 @@ if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - ["tapShoulder", { params ["_unit", "_shoulderNum"]; diff --git a/addons/sandbag/CfgEventHandlers.hpp b/addons/sandbag/CfgEventHandlers.hpp index 54701ffb3e..32d4ac80f4 100644 --- a/addons/sandbag/CfgEventHandlers.hpp +++ b/addons/sandbag/CfgEventHandlers.hpp @@ -32,3 +32,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/sandbag/XEH_missionDisplayLoad.sqf b/addons/sandbag/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/sandbag/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/sandbag/XEH_postInit.sqf b/addons/sandbag/XEH_postInit.sqf index c3f99c2a9b..d6e4c0aadc 100644 --- a/addons/sandbag/XEH_postInit.sqf +++ b/addons/sandbag/XEH_postInit.sqf @@ -11,8 +11,6 @@ GVAR(sandBag) = objNull; GVAR(deployPFH) = -1; GVAR(deployDirection) = 0; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel deploy sandbag if interact menu opened ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); diff --git a/addons/tacticalladder/CfgEventHandlers.hpp b/addons/tacticalladder/CfgEventHandlers.hpp index ed44329687..cb09874dab 100644 --- a/addons/tacticalladder/CfgEventHandlers.hpp +++ b/addons/tacticalladder/CfgEventHandlers.hpp @@ -24,3 +24,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/tacticalladder/XEH_missionDisplayLoad.sqf b/addons/tacticalladder/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/tacticalladder/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/tacticalladder/XEH_postInit.sqf b/addons/tacticalladder/XEH_postInit.sqf index 8ebf776987..465f514d14 100644 --- a/addons/tacticalladder/XEH_postInit.sqf +++ b/addons/tacticalladder/XEH_postInit.sqf @@ -16,8 +16,6 @@ GVAR(currentAngle) = 0; // Cancel adjustment if interact menu opens ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel adjusting on player change. ["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); diff --git a/addons/trenches/CfgEventHandlers.hpp b/addons/trenches/CfgEventHandlers.hpp index 6db97e9c9d..5b2eb3a053 100644 --- a/addons/trenches/CfgEventHandlers.hpp +++ b/addons/trenches/CfgEventHandlers.hpp @@ -24,3 +24,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/trenches/XEH_missionDisplayLoad.sqf b/addons/trenches/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/trenches/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/trenches/XEH_postInit.sqf b/addons/trenches/XEH_postInit.sqf index d0e8775f05..ba84123009 100644 --- a/addons/trenches/XEH_postInit.sqf +++ b/addons/trenches/XEH_postInit.sqf @@ -12,8 +12,6 @@ GVAR(trench) = objNull; GVAR(digPFH) = -1; GVAR(digDirection) = 0; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel dig sandbag if interact menu opened ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp index 6e31dde2cb..eaec430c1e 100644 --- a/addons/tripod/CfgEventHandlers.hpp +++ b/addons/tripod/CfgEventHandlers.hpp @@ -32,3 +32,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/tripod/XEH_missionDisplayLoad.sqf b/addons/tripod/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/tripod/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/tripod/XEH_postInit.sqf b/addons/tripod/XEH_postInit.sqf index 6f2dc9b7e0..79aa7a69f2 100644 --- a/addons/tripod/XEH_postInit.sqf +++ b/addons/tripod/XEH_postInit.sqf @@ -9,8 +9,6 @@ GVAR(height) = 0; // Cancel adjustment if interact menu opens ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel adjusting on player change. ["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);