ACE3/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf
jonpas 742626ff1a
General - Relative script_component.hpp includes (#9378)
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-09-12 20:58:10 +02:00

31 lines
681 B
Plaintext

#include "..\script_component.hpp"
/*
* 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:
* None
*
* Example:
* [minimap,0,0.5,0.5] call ace_microdagr_fnc_mapDoubleTapEH
*
* Public: No
*/
params ["_theMap", "_mouseButton", "_xPos", "_yPos"];
//Only handle LMB
if (_mouseButton != 0) exitWith {};
private _worldPos = _theMap ctrlMapScreenToWorld [_xPos, _yPos];
_worldPos pushBack (getTerrainHeightASL _worldPos);
GVAR(newWaypointPosition) = _worldPos;
[APP_MODE_MARK] call FUNC(saveCurrentAndSetNewMode);