From 57a2350c54832ddd0560801e738db3f83a35bc46 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 28 Nov 2009 21:59:55 +0100 Subject: [PATCH] Replace backdrop with spark animations --- Molinari.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Molinari.lua b/Molinari.lua index 220f185..c14ac6e 100644 --- a/Molinari.lua +++ b/Molinari.lua @@ -1,9 +1,12 @@ -local button = CreateFrame('Button', 'Molinari', UIParent, 'SecureActionButtonTemplate') +local button = CreateFrame('Button', 'Molinari', UIParent, 'SecureActionButtonTemplate, AutoCastShineTemplate') button:RegisterForClicks('LeftButtonUp') button:SetAttribute('*type*', 'macro') +button:Hide() -button:SetBackdrop({bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=]}) -button:SetBackdropColor(0, 0, 0, 0.4) +for _, spark in pairs(button.sparkles) do + spark:SetHeight(spark:GetHeight() * 3) + spark:SetWidth(spark:GetWidth() * 3) +end button:RegisterEvent('PLAYER_LOGIN') button:RegisterEvent('MODIFIER_STATE_CHANGED') @@ -13,6 +16,7 @@ button:SetScript('OnLeave', function(self) self:RegisterEvent('PLAYER_REGEN_ENABLED') else self:Hide() + AutoCastShine_AutoCastStop(self) end end) @@ -52,7 +56,7 @@ end GameTooltip:HookScript('OnTooltipSetItem', function(self) local item = self:GetItem() - if(item and Clickable) then + if(item and Clickable()) then local spell, r, g, b = ScanTooltip() if(not spell) then spell, r, g, b = Disenchantable(item) @@ -64,7 +68,7 @@ GameTooltip:HookScript('OnTooltipSetItem', function(self) button:SetAllPoints(slot) button:SetParent(slot) button:Show() - button:SetBackdropColor(r, g, b, 0.4) + AutoCastShine_AutoCastStart(button, r, g, b) end end end) -- 1.7.9.5