View Single Post
02-06-23, 06:25 AM   #1
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
Getting UIPanelButtonTemplate texture

I created a SecureActionButtonTemplate in this way

Lua Code:
  1. local main = CreateFrame("Frame", nil, UIParent)
  2. main:SetSize(450, 250)
  3. main:SetPoint("CENTER")
  4. main.button = CreateFrame("Button", nil, main, "SecureActionButtonTemplate")
  5. main.button:SetSize(32, 32)
  6. main.button:SetPoint("CENTER", main, "BOTTOM", 0, 40)
  7. main.button:RegisterForClicks("AnyUp")
  8. main.button:SetAttribute("type", "macro")
  9. main.button:SetAttribute("macrotext", "/stopcasting")

Now I would like to give this button the same texture as the UIPanelButtonTemplate, and maybe even set some text.
How can I do?

Last edited by Benalish : 02-06-23 at 12:24 PM.
  Reply With Quote