Commit 7cab3be4 authored by Azilroka's avatar Azilroka

1.45

parent be35fb54
......@@ -155,7 +155,7 @@ function BB:CreateSeedButton(ItemID)
end
local Button = CreateFrame('Button', nil, self.Bar.SeedsFrame, 'SecureActionButtonTemplate, ActionButtonTemplate')
Button:SetTemplate()
PA:SetTemplate(Button)
Button:SetSize(30, 30)
Button:SetAttribute('type', 'item')
Button:SetAttribute('item', GetItemInfo(ItemID))
......@@ -163,15 +163,16 @@ function BB:CreateSeedButton(ItemID)
Button.icon:SetTexture(select(5, GetItemInfoInstant(ItemID)))
Button.icon:SetTexCoord(unpack(PA.TexCoords))
Button.icon:SetInside()
Button.icon:SetPoint('TOPLEFT', 1, -1)
Button.icon:SetPoint('BOTTOMRIGHT', -1, 1)
Button.icon:SetDrawLayer('ARTWORK')
Button:SetNormalTexture('')
Button:SetPushedTexture('')
Button:SetHighlightTexture('')
Button:HookScript('OnEnter', function(self)
GameTooltip:SetOwner(self, 'ANCHOR_TOPRIGHT', 2, 4)
Button:HookScript('OnEnter', function(button)
GameTooltip:SetOwner(button, 'ANCHOR_TOPRIGHT', 2, 4)
GameTooltip:ClearLines()
GameTooltip:SetItemByID(ItemID)
GameTooltip:Show()
......@@ -179,18 +180,18 @@ function BB:CreateSeedButton(ItemID)
Button:HookScript('OnLeave', GameTooltip_Hide)
local function Update(self)
local function Update(button)
if not InCombatLockdown() then
if self:GetAttribute('item') ~= GetItemInfo(ItemID) then
self:SetAttribute('item', GetItemInfo(ItemID))
if button:GetAttribute('item') ~= GetItemInfo(button.ItemID) then
button:SetAttribute('item', GetItemInfo(button.ItemID))
end
local Count = GetItemCount(ItemID)
self:EnableMouse(Count > 0)
self.Count:SetText(Count > 0 and Count or '')
self.icon:SetDesaturated(Count == 0)
self:UnregisterEvent('PLAYER_REGEN_ENABLED')
local Count = GetItemCount(button.ItemID)
button:EnableMouse(Count > 0)
button.Count:SetText(Count > 0 and Count or '')
button.icon:SetDesaturated(Count == 0)
button:UnregisterEvent('PLAYER_REGEN_ENABLED')
else
self:RegisterEvent('PLAYER_REGEN_ENABLED')
button:RegisterEvent('PLAYER_REGEN_ENABLED')
end
end
......@@ -334,25 +335,25 @@ function BB:Initialize()
Bar.SeedsFrame:RegisterEvent(event)
end
Bar:SetScript('OnEvent', function(self)
Bar:SetScript('OnEvent', function(frame)
if not InCombatLockdown() then
if BB:InFarmZone() then
self:Show()
UIFrameFadeIn(self, 0.5, 0, 1)
frame:Show()
UIFrameFadeIn(frame, 0.5, 0, 1)
else
BB:DropTools()
self:Hide()
frame:Hide()
end
end
end)
Bar.SeedsFrame:SetScript('OnEvent', function(self)
Bar.SeedsFrame:SetScript('OnEvent', function(frame)
if not InCombatLockdown() then
if BB:InSeedZone() then
self:Show()
UIFrameFadeIn(self, 0.5, 0, 1)
frame:Show()
UIFrameFadeIn(frame, 0.5, 0, 1)
else
self:Hide()
frame:Hide()
end
end
end)
......@@ -365,9 +366,8 @@ function BB:Initialize()
_G.ElvUI[1]:CreateMover(BB.Bar.SeedsFrame, 'BigButtonsSeedBar', 'BigButtons Seed Bar Anchor', nil, nil, nil, 'ALL,GENERAL')
end
if AS then
AS:CreateShadow(Bar.SeedsFrame)
AS:SetTemplate(Bar.SeedsFrame, 'Transparent')
Bar.SeedsFrame.BorderColor = { Bar.SeedsFrame:GetBackdropBorderColor() }
end
PA:CreateShadow(Bar.SeedsFrame)
PA:SetTemplate(Bar.SeedsFrame)
Bar.SeedsFrame.BorderColor = { Bar.SeedsFrame:GetBackdropBorderColor() }
end
\ No newline at end of file
......@@ -323,6 +323,10 @@ function MF:Initialize()
AddOnFrames['Blizzard_TalkingHeadUI'] = nil
end
for Frame, _ in pairs(Frames) do
MF:MakeMovable(Frame)
end
-- Check Forced Loaded AddOns
for AddOn, Table in pairs(AddOnFrames) do
if IsAddOnLoaded(AddOn) then
......
## Interface: 80100
## Title: |cFF16C3F2Project|r|cFFFFFFFFAzilroka|r
## Author: Azilroka
## Version: 1.44
## Version: 1.45
## OptionalDeps: AddOnSkins, ElvUI, Tukui
## SavedVariables: ProjectAzilrokaDB, stAddonManagerProfilesDB, stAddonManagerServerDB
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment