|Go to Page...|
Legion Pre-Patch (7.0.3)
Minor patch (6.2.4)
Minor patch (6.2.3)
Fury of Hellfire (6.2)
The Adventure Continues (6.1)
Warlords of Draenor (6.0.3)
Warlords of Draenor Pre-Patch (6.0.2)
|Updated:||06-25-16 12:13 PM|
|Created:||06-25-09 05:14 PM|
An alternative to using the AceGUI container BlizOptionsGroup to create entries in the Blizzard options panel. All entries created use the same frame objects allowing for minimal memory use. An entry can be created and an options table assigned to it later allowing for LOD options. The library monitors for AceConfigDialog-3.0, AceConfigRegistry-3.0, and AceGUI-3.0 to be loaded before using them to further facilitate LOD behavior.
-- In main module (myAddon): myAddon.config = LibStub('LibOptionsAssist-1.1').AddEntry("myAddon", nil, "myAddon_Config") myAddon.config:SetInfo(format("Version: %s", GetAddOnMetadata("myAddon", 'Version'))) -- In LOD module (myAddon_Config): LibStub('AceConfigRegistry-3.0'):RegisterOptionsTable("myAddon", myAddon.options) myAddon.config:AssignOptions("myAddon")
name - (string) The text to appear in the Blizzard options panel under the AddOns tab.Returns:
parent - (string) If this is to be a child entry then this should be the name that was used to create the parent entry.
loadOnDemand - (function or string) If a function is given then that function will be run the first time the entry is selected, passing entry as it's only argument. If a string is given, or if the function returns a string, an addon with that name will be loaded if it isn't already. If the string is "parent" then the load on demand behavior of the parent will be invoked instead.
key - (any) A value used to prevent the Recycle method from removing the metatable from the entry.
entry - (table) A table with the required fields to work with the Blizzard options panel (see Entries below).
name - (string) The name of the entry to check for.Returns:
parent - (string) The name of the parent entry if a child is being looked for.
index - (number) Index of the entry or nil if it doesn't exist.
entry - (table) The table for the entry or nil if it doesn't exist.
parent - (string) If a string is provided then all entries returned will be children of that parent, otherwise only entries with no parent are returned.Returns:
index - (number) Index of the entry.
entry - (table) The table for the entry.
name - (string) The addon's name as it appears in the Interface\AddOns folder.Returns:
loaded - (boolean) Whether or not the addon is loaded.
reason - (string) If the addon is not loaded then this will be the reason why.
name - (string) The name of the entry to remove.
parent - (string) The name of the parent entry if a child is being removed.
parent - (string) The name of the parent entry whose children are to be sorted.
sortFunc - (function) An optional function to be used for determining the order of the child entries. A default function will be used if none is provided that ignores case, color codes, and extra spaces.
name - (string) A name as from an AceConfigRegistry-3.0 RegisterOptionsTable call.
... - Zero or more table keys that lead to a sub-table.
desc - (string) The current value of the description text.
info - (string) The current value of the information text.
title - (string) The current value of the title text.
key - (any) This value must match what was provided via AddEntry or SetKey to remove the metatable and allow garbage collection.
desc - (string) The text to be displayed.
info - (string) The text to be displayed.
newKey - (any) The value that key should be set to.Returns:
oldKey - (any) The current value needed to fully Recycle entry.
success - (boolean or nil) True if the key was changed, nil otherwise.
title - (string) The text to be displayed.