2015-08-08 06:26:15 +00:00
|
|
|
/*
|
2015-08-10 06:45:43 +00:00
|
|
|
* Author: Dslyecxi, MikeMatrix
|
2015-08-08 06:26:15 +00:00
|
|
|
* Receives and draws map gestures from nearby players.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Map Handle <CONTROL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [findDisplay 12 displayCtrl 51] call ace_map_gesutres_fnc_drawMapGestures
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if (!GVAR(enabled)) exitWith {};
|
|
|
|
if (!visibleMap) exitWith {};
|
|
|
|
|
|
|
|
params ["_mapHandle"];
|
|
|
|
|
2015-08-10 13:24:57 +00:00
|
|
|
_proximityPlayers = [ACE_player, GVAR(maxRange)] call FUNC(getProximityPlayers);
|
2015-08-08 06:26:15 +00:00
|
|
|
{
|
|
|
|
_nameSane = [name _x] call FUNC(sanitizeName);
|
|
|
|
_drawPosVariableName = format [QGVAR(%1_DrawPos), _nameSane];
|
|
|
|
if (!isNil _drawPosVariableName) then {
|
2015-08-15 10:12:41 +00:00
|
|
|
if (isNil {missionNamespace getVariable _drawPosVariableName}) then {missionNamespace setVariable [_drawPosVariableName, [1, 1, 1]];};
|
|
|
|
_pos = missionNamespace getVariable _drawPosVariableName;
|
2015-08-08 06:26:15 +00:00
|
|
|
if (alive _x &&
|
|
|
|
{_x getVariable QGVAR(Transmit)}) then {
|
|
|
|
_group = group _x;
|
|
|
|
_grpName = groupID _group;
|
|
|
|
|
2015-08-10 13:24:57 +00:00
|
|
|
_color = if (_grpName in GVAR(GroupColorConfigurationsGroups)) then {
|
2015-08-08 06:26:15 +00:00
|
|
|
_grpNameIndex = GVAR(GroupColorConfigurationsGroups) find _grpName;
|
2015-08-10 13:24:57 +00:00
|
|
|
(GVAR(GroupColorConfigurations) select (GVAR(GroupColorConfigurationsGroupIndex) select _grpNameIndex)) select (_x != leader _group)
|
2015-08-08 06:26:15 +00:00
|
|
|
} else {
|
2015-08-10 13:24:57 +00:00
|
|
|
if (_x == leader _group) then {GVAR(defaultLeadColor)} else {GVAR(defaultColor)};
|
2015-08-08 06:26:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_mapHandle drawIcon ["\a3\ui_f\data\gui\cfg\Hints\icon_text\group_1_ca.paa", _color, _pos, 55, 55, 0, "", 1, 0.030, "PuristaBold", "left"];
|
|
|
|
_mapHandle drawIcon ["#(argb,8,8,3)color(0,0,0,0)", [.2,.2,.2,.3], _pos, 20, 20, 0, name _x, 0, 0.030, "PuristaBold", "left"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
nil
|
2015-08-10 13:24:57 +00:00
|
|
|
} count _proximityPlayers;
|