volvox.GuiBuilder (defined in Interface/GuiBuilder.lua) builds settings pages declaratively on top of the bundled StdUi toolkit (LibStub("volvoxStdUi")).
Key behaviors:
- All element methods return
selffor chaining, anderror()if no current category/tab is selected. - Every keyed widget auto-registers its config default via
volvox.Config:SetDefault(key, default)at declaration time, and auto-wires load (Config:Read) / save (Config:Write) at render time. - All
text/tooltipstrings are localized via AceLocale when available. - Non-header elements are packed two per row; headers break rows, span the full width, and act as section dividers with
Theme.spacing.sectionGapextra room above them (except at the top of a page). Widgets that carry a TOP label (editbox, slider, doubleslider, dropdown) reserveTheme.spacing.labelGapheadroom in their row. Tooltip attachment skips FontString labels because only frame widgets supportSetScript. - Each
:Tab()becomes a sidebar sub-page in the settings window: the category’screateLayout()returns a{ multiPage = true, name, pages = { { name, layout } } }descriptor, andInterface/Default.luarenders one indented sidebar entry per page under an uppercase group label. There is no nested tab strip. Deferred page-building callbacks capture their element definition per iteration, so each row renders and binds the widget declared for that row.
Structure
Category() begins a settings category and records it in volvox.InterfaceCategoryRegistry so it survives GUI resets. Tab() begins a new sub-page in the current category, rendered as an indented sidebar entry in the settings window.
Example
Widgets
Each widget takes a singleconfig table:
| Method | Config fields | Notes |
|---|---|---|
:Button(config) | text, width?, height?, onClick? | Defaults: width 150, height 20 |
:Checkbox(config) | text, key?, default?, onChange?, tooltip? | Keyed default: false. onChange(self, checked) fires after save |
:EditBox(config) | text, key?, default?, width?, height?, onChange?, tooltip? | Keyed default: "". Saves on Enter or when focus leaves, then onChange(self, value) |
:Header(config) | text | Full-width section header with themed underline |
:Slider(config) | text, min?, max?, step?, default?, key?, onChange?, tooltip? | Defaults: min 0, max 100, step 1, keyed default 0 |
:DoubleSlider(config) | text1, text2, min1?, max1?, min2?, max2?, step?, step1?, step2?, default1?, default2?, key?, onChange?, tooltip? | Registers two defaults: key .. ".value1" and key .. ".value2" |
:Dropdown(config) | text, key?, options, default?, onChange?, init?, multi?, width?, tooltip? | options is an array of { text, value }. Width default 200 |
:ColorPicker(config) | text, key?, default?, width?, height?, onChange?, tooltip? | Keyed default: { r = 1, g = 1, b = 1, a = 1 } |
:HalfLabel(config) | text | Half-width label, packed two per row |
:Spacer() | — | Empty half-width slot for layout spacing |
Category restoration
volvox.InterfaceCategoryRegistry with the interface manager after a GUI reset.
Color helpers
Also defined onvolvox in this file:
| Function | Purpose |
|---|---|
volvox.CreateHeaderWithUnderline(frame, text, color?) | Header label + 1px 50%-opacity underline container |
volvox.ColorToDrawFormat(color) | Convert WoW 0–1 color ({r,g,b,a?}) to 0–255 integers |
volvox.DrawFormatToColor(r, g, b, a?) | Convert 0–255 channels back to 0–1 |
.png?fit=max&auto=format&n=yZatCT6YQ7S22QWv&q=85&s=bb502db827d4362d1268445c3b70d21d)