Replace and depreacate EFUNC(common,addScrollWheelEventHandler) with MouseZChanged Display EH

This commit is contained in:
jonpas 2016-03-02 17:33:46 +01:00
parent 597be8ce3b
commit 4918dbacb0
22 changed files with 79 additions and 14 deletions

View File

@ -15,6 +15,8 @@
params ["_statement"]; params ["_statement"];
ACE_DEPRECATED("ace_common_fnc_addScrollWheelEventHandler", "3.8.0", "'MouseZChanged' Display EventHandler");
if (_statement isEqualType "") then { if (_statement isEqualType "") then {
_statement = compile _statement; _statement = compile _statement;
}; };

View File

@ -55,3 +55,9 @@ class Extended_AnimChanged_EventHandlers {
}; };
}; };
}; };
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];

View File

@ -8,8 +8,6 @@ if (isServer) then {
if (!hasInterface) exitWith {}; if (!hasInterface) exitWith {};
[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
if (isNil "ACE_maxWeightDrag") then { if (isNil "ACE_maxWeightDrag") then {
ACE_maxWeightDrag = 800; ACE_maxWeightDrag = 800;
}; };

View File

@ -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)); 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));
};
};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];

View File

@ -81,5 +81,3 @@ if (isServer) then {
_this call FUNC(interactEH); _this call FUNC(interactEH);
}] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler);
[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(common,addScrollWheelEventHandler);

View File

@ -24,3 +24,9 @@ class Extended_Respawn_EventHandlers {
}; };
}; };
}; };
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];

View File

@ -32,8 +32,6 @@ if (!hasInterface) exitWith {};
GVAR(isOpeningDoor) = false; GVAR(isOpeningDoor) = false;
[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
["tapShoulder", { ["tapShoulder", {
params ["_unit", "_shoulderNum"]; params ["_unit", "_shoulderNum"];

View File

@ -32,3 +32,9 @@ class Extended_Killed_EventHandlers {
}; };
}; };
}; };
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];

View File

@ -11,8 +11,6 @@ GVAR(sandBag) = objNull;
GVAR(deployPFH) = -1; GVAR(deployPFH) = -1;
GVAR(deployDirection) = 0; GVAR(deployDirection) = 0;
[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
// Cancel deploy sandbag if interact menu opened // Cancel deploy sandbag if interact menu opened
["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);

View File

@ -24,3 +24,9 @@ class Extended_Killed_EventHandlers {
}; };
}; };
}; };
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];

View File

@ -16,8 +16,6 @@ GVAR(currentAngle) = 0;
// Cancel adjustment if interact menu opens // Cancel adjustment if interact menu opens
["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
// Cancel adjusting on player change. // Cancel adjusting on player change.
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);

View File

@ -24,3 +24,9 @@ class Extended_Killed_EventHandlers {
}; };
}; };
}; };
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];

View File

@ -12,8 +12,6 @@ GVAR(trench) = objNull;
GVAR(digPFH) = -1; GVAR(digPFH) = -1;
GVAR(digDirection) = 0; GVAR(digDirection) = 0;
[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
// Cancel dig sandbag if interact menu opened // Cancel dig sandbag if interact menu opened
["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);

View File

@ -32,3 +32,9 @@ class Extended_Killed_EventHandlers {
}; };
}; };
}; };
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

View File

@ -0,0 +1,5 @@
#include "script_component.hpp"
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];

View File

@ -9,8 +9,6 @@ GVAR(height) = 0;
// Cancel adjustment if interact menu opens // Cancel adjustment if interact menu opens
["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
// Cancel adjusting on player change. // Cancel adjusting on player change.
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);