Thread Tools Display Modes
Prev Previous Post   Next Post Next
02-04-12, 06:41 PM   #8
Xuerian
A Fallenroot Satyr
 
Xuerian's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 27
Honestly, for your need of a button to toggle it in interface options, here is a basic reference.

lua Code:
  1. local frame = CreateFrame('Frame', 'MyConfigPanel', UIParent)
  2. frame.name = 'MyAddon'
  3. -- create a button and attach it to frame here
  4. InterfaceOptions_AddCategory(frame)
  5.  
  6. -- Show the panel somewhere, ex slash handler
  7. InterfaceOptionsFrame_OpenToCategory(frame)

It's really pretty simple.


Now, as far as a full-on config goes, use Ace3's AceConfig. This coming from someone who wanted to shun libraries and ended up rolling his own when he realized he needed to do the same thing for more than one addon.

As everyone else has basically stated, as soon as another addon uses the lib you used, the code is shared - only one copy of the library stays loaded in memory.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » How To Make AddOn Options?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off