Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-01-16, 04:25 AM   #1
Walkerbo
A Cobalt Mageweaver
 
Walkerbo's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 233
Help with button textures

Hi all

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.

This is an image of what I am seeing.
http://i.imgur.com/xLcC1uS.png?1

Here is my code.

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.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Help with button textures


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off