ACE3/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf
Joko bddf74cbb4
Map Gestures - Add Briefingscreen support, Different Camera Range, Improve Responsiveness, and Toggles for Curators and Spectators Maps (#7782)
* Add Variable Range for Camera Users (Zeus, Spectator) + Settings

Add Setting to Disable Zeus and/or Spectator Map Draws
Add Ability to use Map Gestures on Briefing screen
Add Setting for Briefing Screen mode (All, Only Group, Only Side, Proximity, Disabled)

* disable DISABLE_COMPILE_CACHE

* minor cleanup and add some translations

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-08-18 12:44:16 -05:00

34 lines
1021 B
Plaintext

#include "script_component.hpp"
/*
* Author: joko // Jonas
* Binds Draw EventHandlers to Spectator map.
*
* Arguments:
* 0: Map Handle from a spectator gui <CONTROL>
*
* Return Value:
* None
*
* Example:
* _mapCtrl call ace_map_gestures_fnc_initDisplaySpectator
*
* Public: No
*/
params ["_mapCtrl"];
TRACE_1("initDisplaySpectator",_mapCtrl);
_mapCtrl ctrlAddEventHandler ["Draw", {
if (!GVAR(allowSpectator)) exitWith {};
private _targets = [[positionCameraToWorld [0, 0, 0], GVAR(maxRangeCamera)]];
private _aceSpectatorFocus = missionNamespace getVariable [QEGVAR(spectator,camFocus), objNull];
if (!isNull _aceSpectatorFocus) then {
_targets pushback [_aceSpectatorFocus, GVAR(maxRange)];
};
private _vanillaSpectatorFocus = uiNamespace getVariable ["RscEGSpectator_focus", objNull];
if (!isNull _vanillaSpectatorFocus) then {
_targets pushback [_vanillaSpectatorFocus, GVAR(maxRange)];
};
[_this select 0, _targets] call FUNC(drawMapGestures);
}];