From 600c7aed97db0ec9b492332e336bae0e3596b48f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 25 Mar 2015 08:57:44 -0500 Subject: [PATCH 1/2] Restore Interaction Icon --- addons/microdagr/CfgVehicles.hpp | 7 +++---- addons/microdagr/UI/icon_microDAGR.paa | Bin 0 -> 22016 bytes 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 addons/microdagr/UI/icon_microDAGR.paa diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp index 1d4b118133..f7c22bc30e 100644 --- a/addons/microdagr/CfgVehicles.hpp +++ b/addons/microdagr/CfgVehicles.hpp @@ -10,7 +10,7 @@ class CfgVehicles { statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay)); showDisabled = 0; priority = 0.2; - icon = QUOTE(PATHTOF(data\icon_microDAGR.paa)); + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); exceptions[] = {"notOnMap"}; }; class GVAR(configure) { @@ -20,7 +20,7 @@ class CfgVehicles { statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay)); showDisabled = 0; priority = 0.1; - icon = QUOTE(PATHTOF(data\icon_microDAGR.paa)); + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); exceptions[] = {"notOnMap"}; }; class GVAR(close) { @@ -29,7 +29,7 @@ class CfgVehicles { statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay)); showDisabled = 0; priority = 0.3; - icon = QUOTE(PATHTOF(data\icon_microDAGR.paa)); + icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); exceptions[] = {"notOnMap"}; }; }; @@ -73,5 +73,4 @@ class CfgVehicles { MACRO_ADDITEM(ACE_microDAGR,10); }; }; - }; diff --git a/addons/microdagr/UI/icon_microDAGR.paa b/addons/microdagr/UI/icon_microDAGR.paa new file mode 100644 index 0000000000000000000000000000000000000000..04307ec5814b66452919a4187a22c80c397c8782 GIT binary patch literal 22016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_C{Lt&JQ7hVLZG zkGgo{nBq4$x?X;Z7uts;jl^dYhcjB>e3kuiUh}xvT@X*f>yT+o+i`u}g z^4JF`^*UFfz*r*W2D86#;;S{0Dcezv>+0Ku&mXPz8ZNr|O7-@rjm&QVzH#ai!%s&e zeQo6DgiAMm4zRmSY>OekEvJ)r>{+Ol$83(=v$#?FOJ3AL1Pk6#vu@){UXq*Yi4Sbk z$Zg~%w-Xk~PplX{gD}k>2~U3cF%eJm3Btere5-WDLA)qE<@a?i&u#jXTiovGP5!JOW13a&Jla>~zv^EUZK`lL(KN9) z<-c*9Ztu>`(c0g9zVa7&F>1Z#4*U*$_NM$bugfLR$+Kd&XBi(k+&FUSPqg-Dg-OF= zGQRc60%vowZ^Fz=Yxm%I02gEyr1pC0?anmgW~#(liQwNNtyw0-&`+iuQh&(gfx%yDP6=Oky- zRPQ!aG{1$fe7{;Vlak$$(Sw;BPOd-$`{A=F1NRo!pwf>2n9Vo0UFPQxO%{jJ(x5pv zwK1ix*ttp*&wSMu{HWdAxgs9kC;Q?Ra>**(`=iw%UHaR_CN9Xwi_+7f)@4aQit*7W zHIE0YCkZhq-u5ifK0Vg#H}1lr$eLWC=7`2mo|3oWCJYeb`K+q0=AK}6mS|SWfBQ`J z(it@~T{^RnH|j}eS}lA`SMCpq#2}y@VMSE_( Vy6HryEziQaJG`)H0Zo4p{trt{SNZ?| literal 0 HcmV?d00001 From a88908d7954fe1e282162e8f6b51765e608f0505 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 25 Mar 2015 09:00:49 -0500 Subject: [PATCH 2/2] Release autotrack when trying to drag map --- addons/microdagr/XEH_preInit.sqf | 1 + .../functions/fnc_mapButtonDownEH.sqf | 30 +++++++++++++++++++ .../functions/fnc_mapDoubleTapEH.sqf | 2 +- addons/microdagr/gui_controls.hpp | 2 ++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 addons/microdagr/functions/fnc_mapButtonDownEH.sqf diff --git a/addons/microdagr/XEH_preInit.sqf b/addons/microdagr/XEH_preInit.sqf index a0ea1a538e..4e6ed561c3 100644 --- a/addons/microdagr/XEH_preInit.sqf +++ b/addons/microdagr/XEH_preInit.sqf @@ -12,6 +12,7 @@ PREP(deviceAddWaypoint); PREP(deviceDeleteWaypoint); PREP(deviceGetWaypoints); PREP(dialogClosedEH); +PREP(mapButtonDownEH); PREP(mapDoubleTapEH); PREP(mapOnDrawEH); PREP(modeMapButtons); diff --git a/addons/microdagr/functions/fnc_mapButtonDownEH.sqf b/addons/microdagr/functions/fnc_mapButtonDownEH.sqf new file mode 100644 index 0000000000..e7d2618160 --- /dev/null +++ b/addons/microdagr/functions/fnc_mapButtonDownEH.sqf @@ -0,0 +1,30 @@ +/* + * Author: PabstMirror + * Handles right clicking on the map ('dragging' the map) + * Release autotrack if enabled. + * + * Arguments: + * 0: The Map + * 1: MouseButton + * 2: MousePosX + * 3: MousePosY + * + * 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); +}; diff --git a/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf b/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf index 1fd4c4c4d2..f36d5f2548 100644 --- a/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf +++ b/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf @@ -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 */ diff --git a/addons/microdagr/gui_controls.hpp b/addons/microdagr/gui_controls.hpp index 99bf049977..9d73393e08 100644 --- a/addons/microdagr/gui_controls.hpp +++ b/addons/microdagr/gui_controls.hpp @@ -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;