ACE3/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf
PabstMirror 95d59a1b3a Headers
2015-03-11 02:06:07 -05:00

31 lines
660 B
Plaintext

/*
* Author: PabstMirror
* Handles the double tapping either of the 2 mini-maps
*
* Arguments:
* 0: The Map <CONTROL>
* 1: MouseButton <NUMBER>
* 2: MousePosX <NUMBER>
* 3: MousePosY <NUMBER>
*
* Return Value:
* Nothing
*
* Example:
* [minimap,0,0.5,0.5] call ace_microdagr_fnc_mapOnDrawEH
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_4(_theMap,_mouseButton,_xPos,_yPos);
//Only handle LMB
if (_mouseButton != 0) exitWith {};
_worldPos = _theMap ctrlMapScreenToWorld [_xPos, _yPos];
_worldPos set [2, (getTerrainHeightASL _worldPos)];
GVAR(newWaypointPosition) = _worldPos;
[APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode);