Quantcast

Small changes

Steven Mey [11-29-19 - 15:04]
Small changes
Filename
Bindings.xml
D2Minimap.lua
diff --git a/Bindings.xml b/Bindings.xml
index 6a288bb..f6b9de6 100644
--- a/Bindings.xml
+++ b/Bindings.xml
@@ -1,10 +1,6 @@
 <Bindings>
     <Binding name="Toggle D2Minimap" header="D2Minimap" default="ALT-M" category="Interface Panel">
-        if (Minimap:IsShown()) then
-            Minimap:Hide()
-        else
-            Minimap:Show()
-        end
+        ToggleMinimap()
     </Binding>
     <Binding name="Increase D2Minimap alpha" category="Interface Panel">
         if (Minimap:GetAlpha() &lt; 1) then
diff --git a/D2Minimap.lua b/D2Minimap.lua
index ce08ce4..f00d2e9 100644
--- a/D2Minimap.lua
+++ b/D2Minimap.lua
@@ -4,6 +4,7 @@ D2MinimapSettings = {
     ["Frames"] = {
         ["Minimap"] = {
             ["Shown"] = true,
+            ["PlayerArrow"] = false,
             ["MaskSquare"] = false,
             ["Alpha"] = .1,
         },
@@ -67,7 +68,12 @@ local function D2Minimap_init(self, event, addon, ...)
         Minimap:SetScript("OnMouseDown", nil)

         -- Remove Player-Arrow
-        Minimap:SetPlayerTexture("")
+        if D2MinimapSettings["Frames"]["Minimap"]["PlayerArrow"] then
+            Minimap:SetPlayerTexture("Interface\\MINIMAP\\MinimapArrow")
+            -- Minimap:SetPlayerTexture("Interface\\Minimap\\Vehicle-SilvershardMines-Arrow")
+        else
+            Minimap:SetPlayerTexture("")
+        end

         -- Square the Map
         if D2MinimapSettings["Frames"]["Minimap"]["MaskSquare"] then
@@ -107,17 +113,12 @@ local function D2Minimap_init(self, event, addon, ...)
         MiniMapTracking:SetParent(UIParent)
         MiniMapTracking:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 0, 0);
         MiniMapTracking:SetAlpha(D2MinimapSettings["Frames"]["MiniMapTracking"]["Alpha"])
-        MiniMapTracking:SetMovable(true)
-        MiniMapTracking:RegisterForDrag("RightButton")
-        MiniMapTracking:SetScript("OnDragStart", MiniMapTracking.StartMoving)
-        MiniMapTracking:SetScript("OnDragStop", MiniMapTracking.StopMovingOrSizing)

         -- MiniMapMailFrame
         MiniMapMailFrame:SetParent(UIParent)
         MiniMapMailFrame:ClearAllPoints()
-        MiniMapMailFrame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -50, 50);
+        MiniMapMailFrame:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -50, 50);
         MiniMapMailFrame:SetAlpha(D2MinimapSettings["Frames"]["MiniMapMailFrame"]["Alpha"])
-        MiniMapMailFrame:SetFrameStrata("BACKGROUND")
         MiniMapMailFrame:SetMovable(true)
         MiniMapMailFrame:EnableMouse(true)
         MiniMapMailFrame:RegisterForDrag("LeftButton")
@@ -127,9 +128,8 @@ local function D2Minimap_init(self, event, addon, ...)
         -- GarrisonLandingPageMinimapButton
         GarrisonLandingPageMinimapButton:SetParent(UIParent)
         GarrisonLandingPageMinimapButton:ClearAllPoints()
-        GarrisonLandingPageMinimapButton:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", 0, 0);
+        GarrisonLandingPageMinimapButton:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", 0, 0);
         GarrisonLandingPageMinimapButton:SetAlpha(D2MinimapSettings["Frames"]["GarrisonLandingPageMinimapButton"]["Alpha"])
-        GarrisonLandingPageMinimapButton:SetFrameStrata("BACKGROUND")
         GarrisonLandingPageMinimapButton:SetMovable(true)
         GarrisonLandingPageMinimapButton:EnableMouse(true)
         GarrisonLandingPageMinimapButton:RegisterForDrag("LeftButton")
@@ -139,7 +139,7 @@ local function D2Minimap_init(self, event, addon, ...)
         MinimapBorder:Hide()
         MinimapZoomIn:Hide()
         MinimapZoomOut:Hide()
-        -- MinimapCluster:Hide()
+        MinimapCluster:Hide()
         if not D2MinimapSettings["Frames"]["Minimap"]["Shown"] then
             Minimap:Hide()
         end