Well, using the structure from your first post, let's say you want Usual and Rare to be the sub-categories in the Interface Options list, and Cats/Dogs to be tabs, and Tabby/Tortoiseshell and Terrier/Pug to be selected from a list, while Rare just has a list (no tabs):
Code:
local options = {
name = "MyAddon",
type = "group",
get = function() return random(2) == 2 end,
set = function(info, value) print(info.name, value and "ENABLED" or "DISABLED") end,
args = {
usual = {
name = "Usual",
type = "group",
childGroups = "tabs",
args = {
cats = {
name = "Cats",
type = "group",
childGroups = "tree",
args = {
tabby = {
name = "Tabby",
type = "toggle",
},
torty = {
name = "Tortoiseshell",
type = "toggle",
}
}
},
dogs = {
name = "Dogs",
type = "group",
childGroups = "tree",
args = {
terrier = {
name = "Terrier",
type = "toggle",
},
pug = {
name = "Pug",
type = "toggle",
}
}
}
}
},
rare = {
name = "Rare",
type = "group",
args = {
squirfly = {
name = "Flying Squirrel",
type = "toggle",
}
}
}
}
}
"tree" is the default, so you don't need to specify it on the Rare group, but it's also inheritable, so since you specified it on the Usual group, you do need to specify it on the Cats and Dogs group. Then, you can register the whole table with AceConfigRegistry at once, but you have to add the Usual and Rare groups to the Blizz options separately. To avoid the awkwardness of having a blank main panel, for this example we'll use an About panel for the top level "MyAddon" panel.
Code:
LibStub("AceConfig-Registry-3.0"):RegisterOptionsTable("MyAddon", options)
-- Top level "MyAddon" in the Interface Options list:
LibStub("LibAboutPanel").new(nil, "MyAddon")
-- Second level "Usual" in the Interface Options list:
LibStub("AceConfig-Dialog-3.0"):AddToBlizOptions("MyAddon", options.args.usual.name, "MyAddon", "usual")
-- Second level "Rare" in the Interface Options list:
LibStub("AceConfig-Dialog-3.0"):AddToBlizOptions("MyAddon", options.args.rare.name, "MyAddon", "rare")
(There are also some links in that second block that may be of interest.)