remove obsolete camera eh from agm

This commit is contained in:
commy2 2015-03-21 22:13:36 +01:00
parent 1b8a9290cd
commit 1bf13cea34
4 changed files with 0 additions and 86 deletions

View File

@ -53,17 +53,6 @@ class RscTitles {
};
};
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
idd = -1;
class controls {
class CameraView: RscMapControl {
onDraw = "if (cameraView != uiNamespace getVariable 'ACE_EventHandler_CameraMode') then {uiNamespace setVariable ['ACE_EventHandler_CameraMode', cameraView]; {[uiNamespace getVariable 'ACE_EventHandler_CameraMode'] call _x; nil} count ((missionNamespace getVariable 'ACE_EventHandler_CameraMode') select 2);};";
idc = -1;
w = 0;
h = 0;
};
};
};
class ACE_EventHandlerHelper2: ACE_Rsc_Display_Base {
class controls {
class MapMarkerCreated: RscMapControl {

View File

@ -6,7 +6,6 @@ ADDON = false;
// ACE Common Function
PREP(addActionEventHandler);
PREP(addActionMenuEventHandler);
PREP(addCameraEventHandler);
PREP(addCanInteractWithCondition);
PREP(addLineToDebugDraw);
PREP(addMapMarkerCreatedEventHandler);
@ -147,7 +146,6 @@ PREP(readSettingFromModule);
PREP(receiveRequest);
PREP(removeActionEventHandler);
PREP(removeActionMenuEventHandler);
PREP(removeCameraEventHandler);
PREP(removeCanInteractWithCondition);
PREP(removeMapMarkerCreatedEventHandler);
PREP(removeScrollWheelEventHandler);

View File

@ -1,39 +0,0 @@
/*
* Author: commy2
*
* Add a camera view event handler. The event script is called when the camera view changes.
* The argument of the called function is stored in the _this variable and has as first element the new camera mode. Possible arguments are ["INTERNAL"], ["EXTERNAL"], ["GUNNER"] and ["GROUP"].
*
* Argument:
* 0: Code to execute (Code or String)
*
* Return value:
* ID of the event script (used to remove it later).
*/
#include "script_component.hpp"
private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"];
_statement = _this select 0;
if (typeName _statement == "STRING") then {
_statement = compile _statement;
};
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]];
_id = (_actionsVar select 0) + 1;
_actionIDs = _actionsVar select 1;
_actions = _actionsVar select 2;
if (_id == 0) then {
uiNamespace setVariable ["ACE_EventHandler_CameraMode", cameraView];
(QGVAR(EventHandlerHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(EventHandlerHelper), "PLAIN"];
};
_actionIDs pushBack _id;
_actions pushBack _statement;
missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_id, _actionIDs, _actions]];
_id

View File

@ -1,34 +0,0 @@
/*
* Author: commy2
*
* Remove a camera view event handler.
*
* Argument:
* 0: ID of the event handler (Number)
*
* Return value:
* None.
*/
#include "script_component.hpp"
private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"];
_id = _this select 0;
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]];
_currentId = _actionsVar select 0;
_actionIDs = _actionsVar select 1;
_actions = _actionsVar select 2;
_id = _actionIDs find _id;
if (_id == -1) exitWith {};
_actionIDs set [_id, -1];
_actionIDs = _actionIDs - [-1];
_actions set [_id, []];//{}
_actions = _actions - [[]];//[{}]
missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_currentId, _actionIDs, _actions]];