WoWInterface - View Single Post - Closing all frames with the same name
View Single Post
04-17-20, 04:56 PM   #7
I did that?
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,265
It depends on what you are doing with the buttons and how many you need active at the one time (if you are just stacking one on top of the other it sounds like you only need one).

An example of re-use is your action bar buttons. You can change the spell/action for a single button any number of times by dragging a spell/item etc. onto it. This doesn't create a new button each time, just changes what the current button is used for.

You could use re-use individual button from the table if you identify which one is no longer in use.

Cheesey example using the 3rd button created to re-use:
local reUseButton = MyButtons[3]
reUseButton:SetText("Some New Action!")
reUseButton:SetScript("OnClick", function(self)
    print("You clicked:", self:GetText())
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 04-17-20 at 05:17 PM.
  Reply With Quote