Skip to main content

Theme

volvox.Theme (defined in Interface/Theme.lua) is the shared dark-modern palette, font, spacing, and size token set consumed by every GUI file — the settings window, the sidebar, the GUI builder pages, the status toggle frame, the minimap button, and the Gatherer status bar. It loads between Module/Module and Core/StatusToggles so it exists before any consumer.

Palette

Color entries are { r, g, b, a } arrays in 0-1 range:
NameHexUsed for
bg0#0b0f14Window backdrop
bg1#131922Panels
bg2#1b232eFields, buttons
border#2a3542All borders
text#e6edf3Normal text
muted#8b98a5Secondary text
accent#007affBlue accent — the single accent color
success#6db15fSuccess states
warn#ecad41Warnings
danger#e05b63Errors, destructive states
Alongside the colors:
  • volvox.Theme.font = { family = UNIT_NAME_FONT or STANDARD_TEXT_FONT, size = 12, titleSize = 18, headerSize = 14 }
  • volvox.Theme.spacing = { gutter = 20, pad = 12, sectionGap = 18, labelGap = 20 } — column gutter, outer window inset, extra gap above section headers, and headroom reserved above widgets with TOP labels.
  • volvox.Theme.size = { windowWidth = 900, windowHeight = 560, titleHeight = 44, sidebarWidth = 170, sidebarEntryHeight = 28, sidebarSubEntryHeight = 24, sidebarGroupLabelHeight = 24 } — the settings window and sidebar geometry.

Helpers

---@param name string           -- palette entry name (e.g. "accent")
---@param alphaOverride number|nil
---@return number r, number g, number b, number a
function volvox.Theme:Get(name, alphaOverride)
Returns a named color as four numbers for SetColorTexture / SetTextColor call sites. Raises an error for an unknown color name.
---@param name string
---@param alphaOverride number|nil
---@return table color          -- { r = , g = , b = , a = }
function volvox.Theme:Table(name, alphaOverride)
Returns the color as an { r=, g=, b=, a= } keyed table for StdUi config entries.
---@param name string
---@return string hex           -- e.g. "007aff"
function volvox.Theme:Hex(name)
Returns the color as a 6-char lowercase hex string for |cff...|r markup (used by the minimap tooltip and dropdown titles).

Settings window

volvox.Interface (defined in Interface/Default.lua) is the main settings window, built on the bundled StdUi toolkit with its config derived from volvox.Theme. The window is Theme.size.windowWidth × Theme.size.windowHeight (900×560) with a teal 24px LOOTROUTE header in the title strip. Navigation is a left sidebar (volvox.Sidebar, defined in Interface/Sidebar.lua): single-page categories get one clickable entry, and multi-page categories (built with the GUI builder) get an uppercase group label plus one indented sub-entry per page. The selected entry is highlighted with an accent fill at 0.16 alpha, a 3px accent bar on its left edge, and text-colored caption; unselected entries are muted and highlight bg2 on hover. The content area to the right of the sidebar is a single StdUi scroll frame. Pages are built lazily on first view via StdUi:BuildWindow, then measured deterministically by re-running their EasyLayout rows — there are no height-probing timers. Each lazy page starts at the scroll viewport height so fullSize custom rows (such as the Systems panels) are measured against a usable frame instead of collapsing to a placeholder. volvox.Interface.UpdateContentHeight() relayouts the currently shown page and resizes the scroll child, for pages that build content asynchronously. Settings pages are declared with the GUI builder; two pages ship built-in:
  • General (Interface/Layout/General.lua) — tick mode and tick rate.
  • Modules (Interface/Layout/Modules.lua) — enable/disable toggles for every registered module.
---@param parent table   -- the settings window
---@param width number   -- sidebar width in pixels
---@return table sidebar
function volvox.Sidebar:Create(parent, width)
The returned sidebar panel exposes:
MethodPurpose
sidebar:AddEntry({ id, text, indent?, onSelect? })Add a clickable navigation entry; indent = true renders a smaller, indented sub-entry
sidebar:AddGroupLabel(text)Add a non-clickable, uppercase, muted group label
sidebar:Select(id)Select an entry: restyle and fire its onSelect(id) callback
sidebar:SetSelected(id)Mark an entry selected without firing onSelect
sidebar:GetSelected()Return the currently selected entry id
The active sidebar instance is stored at volvox.Interface.settingsSidebar after InitializeGUI(). Page ids are "<category>" for single-page categories and "<category>/<page>" for GUI-builder pages (for example "LootRoute/Routes").

Opening it

---@return nil
function volvox.OpenSettings()
Opens (or toggles) the settings window. It restores interface categories, forces a full GUI rebuild if the LootRoute category is missing, and — when the frame isn’t built yet — sets volvox.openConfigWhenReady = true so the window opens as soon as it exists.

Single Button Assistant

_SingleButtonAssistant.lua exposes volvox.SingleButtonAssistant and persists its module toggle at modules.singleButtonAssistant. The Modules page shows an Enable SBA checkbox when the assistant has loaded. When Gatherer is enabled, SBA only runs while Gatherer’s State is FIGHT; otherwise it still requires UnitAffectingCombat("player") before casting. Each tick reads Blizzard’s assisted-combat suggestion, validates target/range/usability, then protected-casts the exact spell ID via the global CastSpellByID; CastSpellByName is used only as a fallback when the exact-ID path is unavailable or the protected ID callback fails. Nil exact-ID returns are reported as unconfirmed instead of immediately falling back, because CastSpellByID is command-style and a same-tick name fallback can queue the same suggestion twice. The standalone slash command is /wggsba:
CommandAction
/wggsba onEnable the repeating SBA ticker
/wggsba offDisable the ticker
/wggsba statsPrint tick/cast/skip counters
/wggsba resetReset counters
/wggsba debugToggle SBA debug messages

Slash commands

Registered in Core/Macro.lua under /volvox (dispatcher exposed as volvox.Macro):
CommandAction
/volvoxOpen the settings window
/volvox settingsOpen the settings window
/volvox configOpen the settings window
/volvox minimapShow the minimap button (clears the hidden flag)
Unknown sub-commands log a warning. New commands register through:
---@param name string                 -- sub-command keyword (stored lowercased)
---@param handler fun(args: string)   -- called with the remaining argument string
---@param description? string
Macro:RegisterCommand(name, handler, description)

Minimap button

volvox.Minimap (defined in Interface/Minimap/Minimap.lua), created during volvox:Init():
  • Left click — toggle the settings window (opens it when ready if the frame isn’t built yet).
  • Right click — dropdown menu: Enable Bot / Disable Bot (calls volvox.Gatherer:Start() / volvox.Gatherer:Stop()), Settings, Hide Minimap Button (persisted; restore via /volvox minimap), and Close.
  • Draggable — position persists to the MinimapButtonPosition config key.

Global status toggles

Core/StatusToggles.lua provides a shared on-screen icon bar with clickable toggles:
---@param options table   -- must include `label` and `var`
---@return table|nil toggle
function volvox:AddGlobalToggle(options)
options fields:
FieldPurpose
labelDisplay label (required)
varUnique persistence identifier (required)
valueInitial state (default false)
onClickClick handler
tooltipTooltip text
iconTexture path or spell id (falls back to a question mark icon)
Behavior:
  • Lazily creates the singleton volvox.GlobalStatusFrame (icon bar with a trailing settings gear button, drag/lock, hover styling) on first call. The frame is colored from volvox.Theme: background bg0 at 0.85 alpha, enabled icons accent, disabled icons muted at 0.6, hover bg2 at 0.9, borders and separators border at 0.9, and the lock icon tinted success (unlocked) / danger (locked).
  • Returns nil if label or var is missing; returns the existing toggle if one with the same var already exists.
  • Toggle state persists per-var in a separate JSON file, scripts/LootRoute/DemonStatusFrame.json (independent of volvox.Config), which also stores frame position and lock state and can read legacy scripts/Gatherer/DemonStatusFrame.json / configs/Demon/DemonStatusFrame.json files.