Fixed NormalTexture display

This commit is contained in:
Hendrik Leppkes
2008-11-09 15:09:56 +01:00
parent 21a325c494
commit 15f27066ec
+19 -1
View File
@@ -41,7 +41,15 @@ function Bartender4.Button:Create(id, parent)
button.parent = parent
button.stateactions = {}
button:SetFrameStrata("MEDIUM")
button:SetRealNormalTexture("")
local oldNT = _G[("%sNormalTexture"):format(name)]
oldNT:Hide()
button.normalTexture = button:CreateTexture(("%sBTNT"):format(name))
button.normalTexture:SetAllPoints(oldNT)
--button:SetFrameStrata("MEDIUM")
-- overwrite some scripts with out customized versions
button:SetScript("OnEnter", onEnter)
@@ -183,6 +191,16 @@ function onUpdate(self, elapsed)
end
end
Button.SetRealNormalTexture = Button.SetNormalTexture
function Button:SetNormalTexture(...)
self.normalTexture:SetTexture(...)
end
Button.GetRealNormalTexture = Button.GetNormalTexture
function Button:GetNormalTexture()
return self.normalTexture
end
function Button:ClearStateAction()
for state in pairs(self.stateactions) do
self.stateactions = {}