Quantcast
WoWInterface - View Single Post - Assign atlas texture to button in lua?
View Single Post
03-26-20, 05:39 AM   #4
Vrul
An Onyxian Warder
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 357
I'd say mess with SetTexCoord until it looks ok:
Code:
local myButton = CreateFrame("Button", nil, myParent)
myButton:SetNormalAtlas("QuestCollapse-Show-Up")
myButton:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down")
myButton:GetPushedTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9)
myButton:SetSize(25, 25)
  Reply With Quote