I have an issue with the textures on a button.
Both the highlight and pushed textures fit the button frame without issue, but the normal texture always displays much bigger than the other two thus exceeding the button size.
I have attached an image of what I am seeing.
Here is my code.
local myTestingFrame = CreateFrame("Button","myTestingFrame",UIParent, "SecureActionButtonTemplate,ActionButtonTemplate")myTestingFrame:SetScale(2)myTestingFrame:SetPoint("CENTER")myTestingFrame:SetPushedTexture("Interface\\Icons\\Inv_misc_archaeology_amburfly")myTestingFrame:SetHighlightTexture("Interface\\Icons\\Spell_shadow_carrionswarm")myTestingFrame:SetNormalTexture("Interface\\Icons\\Spell_druid_swarm")myTestingFrame:SetMovable(true)myTestingFrame:SetClampedToScreen(true)myTestingFrame:RegisterForDrag("RightButton")myTestingFrame:SetScript("OnDragStart",myTestingFrame.StartMoving)myTestingFrame:SetScript("OnDragStop",myTestingFrame.StopMovingOrSizing)myTestingFrame:SetToplevel(true)myTestingFrame:SetScript("OnClick",function(self) print("Button Clicked") end)
Any help would be great.
Did you see what happens when you remove this?
I have tried a number of different things trying to resolve this issue.
The myTestingFrame:SetScale(2) increases the scale of the button itself not the textures, if I comment out the line I still get the same display issues just at its default size.
I have also tried just defining the size of the button with myTestingFrame:SetSize(40,40) with no luck.
I just have not been able to find out why.