Quantcast
WoWInterface - View Single Post - How to create circular action buttons ?
View Single Post
11-25-20, 05:05 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,641
This simple block of code almost gets it working ..

It is not a button that does anything other than display an icon and border ring. You would have to add any other functionality you want, or work it into a button based off of a template. All this does is create the minimum to get the result you want.

Lua Code:
  1. local button = CreateFrame("CheckButton", "MyRoundButton", UIParent)
  2. button:SetPoint("CENTER")
  3. button:SetSize(50, 50)
  4. local texPath = GetSpellTexture(278326)
  5. local icon = button:CreateTexture("BACKGROUND")
  6. icon:SetPoint("CENTER")
  7. SetPortraitToTexture(icon,texPath)
  8. local tex = button:CreateTexture("ARTWORK")
  9. tex:SetPoint("CENTER")
  10. tex:SetTexture("Interface\\Artifacts\\Artifacts-PerkRing-Final-Mask")

You would have to create a simple addon to add this code into. It would only need a toc file and the lua file with the above code in. The below link should help you get that part started. I've heard of a site out there somewhere that creates an addon out of a block of code but I have never used it so do not know what the site is myself.

Assuming you are interesting in learning how to create at least simple addons then this may be a good starting point
https://wow.gamepedia.com/Getting_st...writing_addons
__________________

Last edited by Xrystal : 11-25-20 at 05:11 AM.
  Reply With Quote