properly hide the LBF Backdrop and Gloss on empty buttons (thanks to jjsheets for the API)

This commit is contained in:
Hendrik Leppkes
2008-05-03 14:21:10 +00:00
parent c07eae6991
commit 350332af1c
+18
View File
@@ -245,6 +245,15 @@ end
function PetButtonPrototype:ShowButton()
self.pushedTexture:SetTexture(self.textureCache.pushed)
self.highlightTexture:SetTexture(self.textureCache.highlight)
if LBF then
local backdrop, gloss = LBF:GetBackdropLayer(self), LBF:GetGlossLayer(self)
if backdrop then
backdrop:Show()
end
if gloss then
gloss:Show()
end
end
end
function PetButtonPrototype:HideButton()
@@ -253,6 +262,15 @@ function PetButtonPrototype:HideButton()
self.pushedTexture:SetTexture("")
self.highlightTexture:SetTexture("")
if LBF then
local backdrop, gloss = LBF:GetBackdropLayer(self), LBF:GetGlossLayer(self)
if backdrop then
backdrop:Hide()
end
if gloss then
gloss:Hide()
end
end
end
function PetButtonPrototype:ShowGrid()