mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Release autotrack when trying to drag map
This commit is contained in:
parent
600c7aed97
commit
a88908d795
@ -12,6 +12,7 @@ PREP(deviceAddWaypoint);
|
||||
PREP(deviceDeleteWaypoint);
|
||||
PREP(deviceGetWaypoints);
|
||||
PREP(dialogClosedEH);
|
||||
PREP(mapButtonDownEH);
|
||||
PREP(mapDoubleTapEH);
|
||||
PREP(mapOnDrawEH);
|
||||
PREP(modeMapButtons);
|
||||
|
30
addons/microdagr/functions/fnc_mapButtonDownEH.sqf
Normal file
30
addons/microdagr/functions/fnc_mapButtonDownEH.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Handles right clicking on the map ('dragging' the map)
|
||||
* Release autotrack if enabled.
|
||||
*
|
||||
* 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_mapButtonDownEH
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_4(_theMap,_mouseButton,_xPos,_yPos);
|
||||
|
||||
//Only handle RMB
|
||||
if (_mouseButton != 1) exitWith {};
|
||||
|
||||
if (GVAR(mapAutoTrackPosition)) then {
|
||||
GVAR(mapAutoTrackPosition) = false;
|
||||
[] call FUNC(showApplicationPage);
|
||||
};
|
@ -12,7 +12,7 @@
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [minimap,0,0.5,0.5] call ace_microdagr_fnc_mapOnDrawEH
|
||||
* [minimap,0,0.5,0.5] call ace_microdagr_fnc_mapDoubleTapEH
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
@ -53,6 +53,7 @@ class controlsBackground {
|
||||
h = H_PART(19);
|
||||
onDraw = QUOTE(_this call FUNC(mapOnDrawEH));
|
||||
onMouseButtonDblClick = QUOTE(_this call FUNC(mapDoubleTapEH));
|
||||
onMouseButtonDown = QUOTE(_this call FUNC(mapButtonDownEH));
|
||||
|
||||
scaleMin = 0.005;
|
||||
scaleMax = 10; //Lets the mini display zoom out far enough
|
||||
@ -113,6 +114,7 @@ class controlsBackground {
|
||||
h = H_PART(19);
|
||||
onDraw = QUOTE(_this call FUNC(mapOnDrawEH));
|
||||
onMouseButtonDblClick = QUOTE(_this call FUNC(mapDoubleTapEH));
|
||||
onMouseButtonDown = QUOTE(_this call FUNC(mapButtonDownEH));
|
||||
|
||||
// ptsPerSquareSea = 5;
|
||||
// ptsPerSquareTxt = 20;
|
||||
|
Loading…
Reference in New Issue
Block a user