mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e2ac18a05d
* advanced_ballistics * advanced_fatigue * advanced_throwing * ai * aircraft * arsenal * atragmx * attach * backpacks * ballistics * captives * cargo * chemlights * common * concertina_wire * cookoff * dagr * disarming * disposable * dogtags * dragging * explosives * fastroping * fcs * finger * frag * gestures * gforces * goggles * grenades * gunbag * hearing * hitreactions * huntir * interact_menu * interaction * inventory * kestrel4500 * laser * laserpointer * logistics_uavbattery * logistics_wirecutter * magazinerepack * map * map_gestures * maptools * markers * medical * medical_ai * medical_blood * medical_menu * microdagr * minedetector * missileguidance * missionmodules * mk6mortar * modules * movement * nametags * nightvision * nlaw * optics * optionsmenu * overheating * overpressure * parachute * pylons * quickmount * rangecard * rearm * recoil * refuel * reload * reloadlaunchers * repair * respawn * safemode * sandbag * scopes * slideshow * spectator * spottingscope * switchunits * tacticalladder * tagging * trenches * tripod * ui * vector * vehiclelock * vehicles * viewdistance * weaponselect * weather * winddeflection * yardage450 * zeus * arsenal defines.hpp * optionals * DEBUG_MODE_FULL 1 * DEBUG_MODE_FULL 2 * Manual fixes * Add SQF Validator check for #include after block comment * explosives fnc_openTimerUI * fix uniqueItems
68 lines
2.5 KiB
Plaintext
68 lines
2.5 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Handles the draw event from all 3 maps (compass + 2 minimaps)
|
|
*
|
|
* Arguments:
|
|
* 0: The Map <CONTROL>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [compassMap] call ace_microdagr_fnc_mapOnDrawEH
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_theMap"];
|
|
|
|
private _mapSize = (ctrlPosition _theMap) select 3;
|
|
|
|
private _waypoints = [] call FUNC(deviceGetWaypoints);
|
|
|
|
if (GVAR(currentApplicationPage) == 1) then {
|
|
_theMap ctrlMapAnimAdd [0, DUMMY_ZOOM, DUMMY_POS];
|
|
ctrlMapAnimCommit _theMap;
|
|
private _size = 412 * _mapSize;
|
|
_theMap drawIcon [QUOTE(PATHTO_R(images\compass_starInverted.paa)), [1,1,1,1], DUMMY_POS, _size, _size, (-1 * (([ACE_player] call CBA_fnc_headDir) select 0)), '', 0 ];
|
|
_theMap drawIcon [QUOTE(PATHTO_R(images\compass_needle.paa)), [0.533,0.769,0.76,1], DUMMY_POS, _size, _size, 0, '', 0 ];
|
|
|
|
if (GVAR(currentWaypoint) != -1) then {
|
|
private _targetPos = [];
|
|
if (GVAR(currentWaypoint) == -2) then {
|
|
if ((count GVAR(rangeFinderPositionASL)) == 3) then {
|
|
_targetPos = GVAR(rangeFinderPositionASL);
|
|
};
|
|
} else {
|
|
if (GVAR(currentWaypoint) < (count _waypoints)) then {
|
|
_targetPos = (_waypoints select GVAR(currentWaypoint)) select 1;
|
|
};
|
|
};
|
|
if ((count _targetPos) == 3) then {
|
|
private _relBearing = (ACE_player getDir _targetPos) - (([ACE_player] call CBA_fnc_headDir) select 0);
|
|
_theMap drawIcon [QUOTE(PATHTO_R(images\compass_needle.paa)), [1,0.564,0.564,1], DUMMY_POS, _size, _size, _relBearing, '', 0 ];
|
|
};
|
|
};
|
|
|
|
} else { //Map Mode:
|
|
//Call all added minimap draw event handlers:
|
|
{_this call _x;} forEach GVAR(miniMapDrawHandlers);
|
|
|
|
if (GVAR(mapAutoTrackPosition)) then {
|
|
_theMap ctrlMapAnimAdd [0, (GVAR(mapZoom)/_mapSize), (getPosASL ACE_player)];
|
|
ctrlMapAnimCommit _theMap;
|
|
};
|
|
private _size = 48 * _mapSize;
|
|
_theMap drawIcon [QUOTE(PATHTO_R(images\icon_self.paa)), [0.533,0.769,0.76,0.75], (getPosASL ACE_player), _size, _size, (([ACE_player] call CBA_fnc_headDir) select 0), '', 0 ];
|
|
|
|
if (GVAR(settingShowAllWaypointsOnMap)) then {
|
|
_size = 32 * _mapSize;
|
|
{
|
|
_x params ["_wpName", "_wpPos"];
|
|
private _alpha = if (_forEachIndex == GVAR(currentWaypoint)) then {1} else {0.5};
|
|
_theMap drawIcon [QUOTE(PATHTO_R(images\icon_mapWaypoints.paa)), [1,1,1,_alpha], _wpPos, _size, _size, 0, '', 0 ];
|
|
} forEach _waypoints;
|
|
};
|
|
};
|