View Single Post
08-06-14, 11:26 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Just overwrite the entire variable with your own. For example, if the Bartender4 saved variable is called Bartender4DB (look in its TOC file) then you would just do:

Code:
Bartender4DB = {
    -- your table contents here, copied from your saved variables file
}
ReloadUI()
Note that you cannot do this before Bartender4 has loaded. You should wait until the PLAYER_LOGIN event fires. Also, you cannot reload the UI without user interaction, so the whole thing should be tied to a prompt, eg. "This looks like your first time loading SuperAwesomeUI. Would you like to apply all the settings and reload your UI? Yes/No".

If you need some examples, go look at some UI packs that already do this, such as Mayron UI.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote