Thread Tools Display Modes
09-03-16, 04:40 PM   #1
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Ace3 RegisterOptionsTable Help

I am one of the authors of Skillet. Skillet has a plugin interface where each plugin is independent and contains the code below. This results in the options table having one line for each addon as shown in the attached image.

Since the actual options / details of each plugin line are small (one or two items), I would prefer that there be one main line on the left titled "Plugins" and then all of the plugin's options appear on the single page.

Is there a way I can code each individual plugin so that this happens?

Code:
plugin.options =
{
	type = 'group',
	name = "TheUndermineJournal",
	order = 1,
	args = {
		enabled = {
			type = "toggle",
			name = L["Enabled"],
			get = function()
				return Skillet.db.profile.plugins.TUJ.enabled
			end,
			set = function(self,value)
				Skillet.db.profile.plugins.TUJ.enabled = value
				Skillet:UpdateTradeSkillWindow()
			end,
			width = "double",
			order = 1
		},
	},
}
	local acecfg = LibStub("AceConfig-3.0")
	acecfg:RegisterOptionsTable("Skillet TheUndermineJournal", plugin.options)
	local acedia = LibStub("AceConfigDialog-3.0")
	acedia:AddToBlizOptions("Skillet TheUndermineJournal", "TheUndermineJournal", "Skillet")
Click image for larger version

Name:	SkilletOptions.jpg
Views:	257
Size:	29.0 KB
ID:	8802
  Reply With Quote
09-03-16, 06:37 PM   #2
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
I do this in Toaster since it controls settings for the various AddOns it detects which are using LibToast-1.0 - each AddOn is inserted into the options table upon being found/loaded from storage.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
09-04-16, 12:55 AM   #3
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Originally Posted by Torhal View Post
I do this in Toaster
Thanks! With your hint, I was able to figure out how to do what I wanted!
Attached Thumbnails
Click image for larger version

Name:	SkilletOptions2.jpg
Views:	236
Size:	26.9 KB
ID:	8804  
  Reply With Quote
09-04-16, 01:42 AM   #4
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Glad to hear it!
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Ace3 RegisterOptionsTable Help

Thread Tools
Display Modes

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