ACE3/addons/map_gestures/functions/fnc_initDisplaySpectator.sqf
Joko 00fa94e636
Map Gestures - Rewrite and Add Zeus, and Spectator support (#7653)
* Initial Rewrite

* improve getProximityPlayers

* add Zeus Implementation

* fix missing simicolon

* add Spectator Support

* improve local responsiveness

* add Vanilla Spectator Support

* Fix Both Spectators are now working correctly

* exit mouse moving event early when disabled

* Move Diary Event registration to XEH DisplayLoaded

Port Settings to SQF
Add Setting for only showing Friendly Units pointing

* Fix Merge Issue in Stringtable

Redo Settings

* fix a copy past script error

* Update addons/map_gestures/functions/fnc_getProximityPlayers.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Lazy evals and defines

* Small changes

* Simplify initDisplayDiary and fix loading saves

* Cache getProximityPlayers

Improve Vanilla Spectator Support and how Followed unit Nearby data

* Minor header update

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-06-19 10:35:57 -05:00

33 lines
917 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", {
private _targets = [positionCameraToWorld [0, 0, 0]];
private _aceSpectatorFocus = missionNamespace getVariable [QEGVAR(spectator,camFocus), objNull];
if (!isNull _aceSpectatorFocus) then {
_targets pushback _aceSpectatorFocus;
};
private _vanillaSpectatorFocus = uiNamespace getVariable ["RscEGSpectator_focus", objNull];
if (!isNull _vanillaSpectatorFocus) then {
_targets pushback _vanillaSpectatorFocus;
};
[_this select 0, _targets] call FUNC(drawMapGestures);
}];