Appearance
AceConfigDialog-3.0
AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
API Reference
AddToBlizOptions
method#
lua
AceConfigDialog:AddToBlizOptions(appName, name?, parent?, ...)Add an option table into the Blizzard Interface Options panel.
You can optionally supply a descriptive name to use and a parent frame to use, as well as a path in the options table. If no name is specified, the appName will be used instead.
If you specify a proper parent (by name), the interface options will generate a tree layout. Note that only one level of children is supported, so the parent always has to be a head-level node.
This function returns a reference to the container frame registered with the Interface Options, as well as the registered ID. You can use the ID to open the options with the API function Settings.OpenToCategory.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
appName | string | The application name as given to :RegisterOptionsTable. | |
name (optional) | string | A descriptive name to display in the options tree (defaults to appName). | |
parent (optional) | string | The parent to use in the interface options tree. | |
... | any | The path in the options table to feed into the interface options panel. |
Returns
| Type | Description |
|---|---|
frame | The reference to the frame registered into the Interface Options. |
any | The category ID to pass to Settings.OpenToCategory. |
Example
lua
local frame, categoryID = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("MyAddon")Close
method#
lua
AceConfigDialog:Close(appName)Close a specific options window.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
appName | string | The application name as given to :RegisterOptionsTable. |
CloseAll
method#
lua
AceConfigDialog:CloseAll()Close all open options windows.
Open
method#
lua
AceConfigDialog:Open(appName, container?, ...)Open an option window at the specified path (if any).
This function can optionally feed the group into a pre-created container instead of creating a new container frame.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
appName | string | The application name as given to :RegisterOptionsTable. | |
container (optional) | table | An optional container frame to feed the options into. | |
... | any | The path to open after creating the options window (see :SelectGroup for details). |
SelectGroup
method#
lua
AceConfigDialog:SelectGroup(appName, ...)Selects the specified path in the options window.
The path specified has to match the keys of the groups in the table.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
appName | string | The application name as given to :RegisterOptionsTable. | |
... | any | The path to the key that should be selected. |
Example
lua
LibStub("AceConfigDialog-3.0"):SelectGroup("MyAddon", "display", "colors")SetDefaultSize
method#
lua
AceConfigDialog:SetDefaultSize(appName, width, height)Sets the default size of the options window for a specific application.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
appName | string | The application name as given to :RegisterOptionsTable. | |
width | number | The default width. | |
height | number | The default height. |
GetStatusTable
method#
lua
AceConfigDialog:GetStatusTable(appName, path?)Get the table AceConfigDialog uses to persist the open window's UI state (such as the selected group or tab) for appName at the given path. Read it to inspect the dialog, or seed it to control the initial state.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
appName | string | The application name as given to :RegisterOptionsTable. | |
path (optional) | table | The path of group keys identifying a node in the options tree; omit for the root. |
Returns
| Type | Description |
|---|---|
table | The status table for that node, created on first access. |
