ACE3/addons/common/functions/fnc_removeScrollWheelEventHandler.sqf

33 lines
672 B
Plaintext
Raw Normal View History

/*
* Author: commy2
* Remove a scroll wheel event handler.
*
2015-09-19 17:26:45 +00:00
* Arguments:
* 0: ID of the event handler <NUMBER>
*
* Return Value:
* None
*
2015-09-19 17:26:45 +00:00
* Public: Yes
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
2015-09-19 17:26:45 +00:00
params ["_id"];
2015-09-19 17:26:45 +00:00
private "_actionsVar";
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]];
2015-09-19 17:26:45 +00:00
_actionsVar params ["_currentId", "_actionIDs", "_actions"];
_id = _actionIDs find _id;
if (_id == -1) exitWith {};
_actionIDs set [_id, -1];
_actionIDs = _actionIDs - [-1];
_actions set [_id, []];//{}
_actions = _actions - [[]];//[{}]
missionNamespace setVariable ["ACE_EventHandler_ScrollWheel", [_currentId, _actionIDs, _actions]];