View Single Post
04-12-19, 05:04 AM   #5
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
I'm not sure if it is in the documentation other than reading the Ace3 code, so here's a tip: if you create the toggle mentioned above in your options table, you can set the load state as per user settings.
Lua Code:
  1. function MyAddOn:OnInitialize()
  2.     -- set up your saved variables and defaults as normal for Ace3
  3.  
  4.     -- keep user setting for enabled/disabled
  5.     self:SetEnabledState(self.db.profile.enabled) -- this line, assuming you name the toggle enabled in the defaults table
  6. end

Last edited by myrroddin : 04-13-19 at 03:33 AM. Reason: thanks humfras!
  Reply With Quote