Skip to content

Commit

Permalink
Buttons: Compat for 10.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Mar 19, 2024
1 parent be7d4d8 commit 8dcea7c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Buttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ local L = sm.L
local ldbi = LibStub("LibDBIcon-1.0")

local moving, ButtonFadeOut
-- XXX temp 10.2.6
local TrackingFrame = MinimapCluster.TrackingFrame or MinimapCluster.Tracking

local animFrames = {}
local blizzButtons = {
Expand All @@ -32,12 +34,12 @@ local buttonNicknames = {
[ExpansionLandingPageMinimapButton] = "GarrisonLandingPageMinimapButton",
[Minimap.ZoomIn] = "MinimapZoomIn",
[Minimap.ZoomOut] = "MinimapZoomOut",
[MinimapCluster.Tracking] = "MiniMapTracking",
[TrackingFrame] = "MiniMapTracking",
[MinimapCluster.InstanceDifficulty] = "MiniMapInstanceDifficulty",
[MinimapCluster.IndicatorFrame.MailFrame] = "MiniMapMailFrame",
[MinimapCluster.IndicatorFrame.CraftingOrderFrame] = "CraftingOrder",
[GameTimeFrame] = "GameTimeFrame", -- Just here to change parent to Minimap in :NewFrame
[MinimapCluster.Tracking.Button] = "none", -- Prevent error when being passed to :NewFrame
[TrackingFrame.Button] = "none", -- Prevent error when being passed to :NewFrame
}

local options = {
Expand Down Expand Up @@ -294,14 +296,14 @@ function mod:OnEnable()
background:SetPoint("CENTER", MiniMapMailIcon, "CENTER")

-- Tracking Button
overlay = MinimapCluster.Tracking:CreateTexture(nil, "OVERLAY")
overlay = TrackingFrame:CreateTexture(nil, "OVERLAY")
overlay:SetSize(53,53)
overlay:SetTexture(136430) -- 136430 = Interface\\Minimap\\MiniMap-TrackingBorder
overlay:SetPoint("CENTER", MinimapCluster.Tracking.Button, "CENTER", 10, -10)
background = MinimapCluster.Tracking:CreateTexture(nil, "BACKGROUND")
overlay:SetPoint("CENTER", TrackingFrame.Button, "CENTER", 10, -10)
background = TrackingFrame:CreateTexture(nil, "BACKGROUND")
background:SetSize(25,25)
background:SetTexture(136467) -- 136467 = Interface\\Minimap\\UI-Minimap-Background
background:SetPoint("CENTER", MinimapCluster.Tracking.Button, "CENTER")
background:SetPoint("CENTER", TrackingFrame.Button, "CENTER")

-- Crafting Order Button
overlay = MinimapCluster.IndicatorFrame.CraftingOrderFrame:CreateTexture(nil, "OVERLAY")
Expand Down Expand Up @@ -507,7 +509,7 @@ do
if MiniMapTrackingButton then
self:MakeMovable(MiniMapTrackingButton, f)
else
self:MakeMovable(MinimapCluster.Tracking.Button, f)
self:MakeMovable(TrackingFrame.Button, f)
end
else
self:MakeMovable(f)
Expand Down Expand Up @@ -675,7 +677,7 @@ end

do
local buttonTable = {
Minimap, MinimapCluster.Tracking, MinimapCluster.Tracking.Button, TimeManagerClockButton, GameTimeFrame,
Minimap, TimeManagerClockButton, GameTimeFrame, TrackingFrame, TrackingFrame.Button,
Minimap.ZoomIn, Minimap.ZoomOut, MinimapCluster.InstanceDifficulty, AddonCompartmentFrame,
MinimapCluster.IndicatorFrame.MailFrame, MinimapCluster.IndicatorFrame.CraftingOrderFrame, ExpansionLandingPageMinimapButton
}
Expand Down

0 comments on commit 8dcea7c

Please sign in to comment.