View Single Post
11-25-22, 11:30 PM   #3
Yakkers
A Deviate Faerie Dragon
Join Date: May 2020
Posts: 10
Originally Posted by Vampyr78 View Post
What you are trying to achieve is very simple. You can just make Buttons that inherit from SecureActionButtonTemplate and assign it an action slot that is the same as the action slot on your actual action bar button. It's 1 for the first button on first bar 2 for the second, 13 for the first on second bar and so on. Using SacureActionButton should basicly make it behave like actionbar button and using exiting action slot should show you the exact same spell that is on the other button with the same action slot.

Code:
button = CreateFrame("CHECKBUTTON", name, parent, "SecureActionButtonTemplate, ActionBarButtonTemplate")
button:SetAttribute("type", "action")
button:SetAttribute("action", slot)
Oh wow, I can't believe it's that easy. Thanks so much.
This question is going to seem even stupider, but is there something I need to do to make child frames visible in a parent frame? My parent frame (which is going to hold all the copied hotbar icons) has bounds of 0,0,0,0 so I assume that means the parent frame is effectively invisible and that's why I'm not seeing the button child? I feel like this should be simple to find but google's algorithms are abysmal these days and I can't find the keywords it wants to show me what I need.

This is the other addon I've made, it was a simple single-frame thing so I didn't need to figure much out in this regard.
https://www.curseforge.com/wow/addons/hit-combo-popups

Edit: Got it, just needed to do Frame:SetSize(). Seems good to go now, all I need to do is figure out multi-parameter slash commands, or rather if something like /slashcommand 1 2 5 8 can be parsed as one argument that I can turn into a list of numbers.

Last edited by Yakkers : 11-26-22 at 03:34 PM.
  Reply With Quote