Загрузить файлы в «/»
This commit is contained in:
+16
-37
@@ -12,46 +12,25 @@ AA.btn:SetFrameLevel(8)
|
||||
AA.btn:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
AA.btn:RegisterForDrag("LeftButton")
|
||||
|
||||
local icon = AA.btn:CreateTexture(nil, "BACKGROUND")
|
||||
-- classic round minimap button (gold ring); pfUI keeps this look for docked buttons
|
||||
local bg = AA.btn:CreateTexture(nil, "BACKGROUND")
|
||||
bg:SetTexture("Interface\\Minimap\\UI-Minimap-Background")
|
||||
bg:SetWidth(20)
|
||||
bg:SetHeight(20)
|
||||
bg:SetPoint("TOPLEFT", AA.btn, "TOPLEFT", 7, -5)
|
||||
local icon = AA.btn:CreateTexture(nil, "ARTWORK")
|
||||
icon:SetTexture("Interface\\Icons\\Trade_Alchemy")
|
||||
icon:SetWidth(20)
|
||||
icon:SetHeight(20)
|
||||
icon:SetPoint("TOPLEFT", AA.btn, "TOPLEFT", 7, -5)
|
||||
icon:SetTexCoord(0.07, 0.93, 0.07, 0.93)
|
||||
local border = AA.btn:CreateTexture(nil, "OVERLAY")
|
||||
border:SetTexture("Interface\\Minimap\\MiniMap-TrackingBorder")
|
||||
|
||||
function AA.StyleButton()
|
||||
if pfUI and pfUI.api and pfUI.api.CreateBackdrop then
|
||||
-- pfUI look: flat icon inside a pfUI backdrop, same as other docked buttons
|
||||
if not AA.btn.pcdBackdrop then
|
||||
AA.btn.pcdBackdrop = true
|
||||
pcall(pfUI.api.CreateBackdrop, AA.btn, nil, true)
|
||||
end
|
||||
icon:SetDrawLayer("ARTWORK")
|
||||
icon:ClearAllPoints()
|
||||
icon:SetPoint("TOPLEFT", AA.btn, "TOPLEFT", 3, -3)
|
||||
icon:SetPoint("BOTTOMRIGHT", AA.btn, "BOTTOMRIGHT", -3, 3)
|
||||
icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
|
||||
border:Hide()
|
||||
AA.btn:SetHighlightTexture("Interface\\Buttons\\ButtonHilight-Square")
|
||||
elseif pfUI then
|
||||
icon:SetDrawLayer("ARTWORK")
|
||||
icon:ClearAllPoints()
|
||||
icon:SetAllPoints(AA.btn)
|
||||
icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
|
||||
border:Hide()
|
||||
AA.btn:SetHighlightTexture("Interface\\Buttons\\ButtonHilight-Square")
|
||||
else
|
||||
icon:SetDrawLayer("BACKGROUND")
|
||||
icon:ClearAllPoints()
|
||||
icon:SetWidth(20); icon:SetHeight(20)
|
||||
icon:SetPoint("TOPLEFT", AA.btn, "TOPLEFT", 6, -5)
|
||||
icon:SetTexCoord(0, 1, 0, 1)
|
||||
border:ClearAllPoints()
|
||||
border:SetWidth(53); border:SetHeight(53)
|
||||
border:SetPoint("TOPLEFT", AA.btn, "TOPLEFT", 0, 0)
|
||||
border:Show()
|
||||
AA.btn:SetHighlightTexture("Interface\\Minimap\\UI-Minimap-ZoomButton-Highlight")
|
||||
end
|
||||
end
|
||||
AA.StyleButton()
|
||||
border:SetWidth(53)
|
||||
border:SetHeight(53)
|
||||
border:SetPoint("TOPLEFT", AA.btn, "TOPLEFT", 0, 0)
|
||||
AA.btn:SetHighlightTexture("Interface\\Minimap\\UI-Minimap-ZoomButton-Highlight")
|
||||
AA.StyleButton = function() end
|
||||
|
||||
function AA.PlaceButton()
|
||||
if AA.btn:GetParent() ~= Minimap then return end -- docked by pfUI
|
||||
|
||||
Reference in New Issue
Block a user