Skip to content
APHONIC edited this page Sep 15, 2026 · 2 revisions

Wizard

Wizard.lua: schedules a first-run setup wizard and unloads its module once it's done.

LibAPH.ScheduleWizardIfNeeded(isCompleted, runFn, delayMs)

Runs runFn after delayMs (default 3000) if isCompleted is false or nil. The delay lets the rest of the addon's UI finish building before the wizard dialog opens.

LibAPH.ScheduleWizardIfNeeded(MyAddon.settings.wizard_completed, MyAddon.run_wizard)

LibAPH.AutoUnloadWizardModule(settings, toggleFn)

Unloads the wizard module (via toggleFn("wizard", true)) once it's finished, unless the player already unloaded it manually. Pairs with ScheduleWizardIfNeeded and the Module Manager: a completed wizard has nothing left to do, so it will be unloaded afterwards.

local function wizard_finish()
    MyAddon.settings.wizard_completed = true
    LibAPH.AutoUnloadWizardModule(MyAddon.settings, MyAddon.toggle_module_disabled)
end

Home · Getting Started

Clone this wiki locally