-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
donniedice edited this page May 1, 2026
·
10 revisions
Complete reference for every public method in RGX-Framework. Organized by module.
| Method | Signature | Returns | Description |
|---|---|---|---|
RegisterModule |
RGX:RegisterModule(name, module, opts) |
bool |
Register a module. opts = { global = "RGXFonts" }. Returns true on success, false on duplicate/invalid. |
GetModule |
RGX:GetModule(name) |
table|nil |
Lookup by normalized name, then alias → _G. |
RequireModule |
RGX:RequireModule(name) |
table|nil |
Like GetModule but calls geterrorhandler() on miss. |
GetFonts |
RGX:GetFonts() |
table|nil |
Shortcut → RGXFonts
|
GetColors |
RGX:GetColors() |
table|nil |
Shortcut → RGXColors
|
GetTextures |
RGX:GetTextures() |
table|nil |
Shortcut → RGXTextures
|
GetDropdowns |
RGX:GetDropdowns() |
table|nil |
Shortcut → RGXDropdowns
|
GetUI |
RGX:GetUI() |
table|nil |
Shortcut → RGXUI
|
GetColorPicker |
RGX:GetColorPicker() |
table|nil |
Shortcut → RGXColorPicker
|
GetMinimap |
RGX:GetMinimap() |
table|nil |
Shortcut → RGXMinimap
|
GetPetBattles |
RGX:GetPetBattles() |
table|nil |
Shortcut → RGXPetBattles (dormant → nil) |
GetSharedMedia |
RGX:GetSharedMedia() |
table|nil |
Shortcut → RGXSharedMedia (dormant → nil) |
GetDesign |
RGX:GetDesign() |
table|nil |
Shortcut → RGXDesign
|
GetCombat |
RGX:GetCombat() |
table|nil |
Shortcut → RGXCombat (dormant → nil) |
GetReputation |
RGX:GetReputation() |
table|nil |
Shortcut → RGXReputation (dormant → nil) |
GetDataBroker |
RGX:GetDataBroker() |
table|nil |
Shortcut → RGXDataBroker
|
GetSound |
RGX:GetSound() |
table|nil |
Shortcut → RGXSound
|
| Method | Signature | Returns | Description |
|---|---|---|---|
IsReady |
RGX:IsReady() |
bool |
Whether ADDON_LOADED init has completed. |
OnReady |
RGX:OnReady(callback) |
— | Queue a function. Called immediately if ready, otherwise deferred until init completes. |
OnLogin |
RGX:OnLogin(callback) |
— | Queue a function for PLAYER_LOGIN. |
OnLoad |
RGX:OnLoad(callback) |
— | Queue a function for ADDON_LOADED. |
| Method | Signature | Returns | Description |
|---|---|---|---|
PlaySound |
RGX:PlaySound(soundID) |
— | Wraps PlaySound() with pcall error handling. |
Mixin |
RGX:Mixin(target, ...) |
table |
Mixes one or more source tables into target. Same as WoW's Mixin(). |
Debug |
RGX:Debug(...) |
— | Prints debug message prefixed with [RGX] if debugMode is enabled. |
CopyTable |
RGX:CopyTable(src) |
table |
Deep-copy a table. |
Clamp |
RGX:Clamp(value, min, max) |
number |
Clamp a number between min and max. |
Lerp |
RGX:Lerp(a, b, t) |
number |
Linear interpolation from a to b by t (0–1). |
TableCount |
RGX:TableCount(tbl) |
number |
Count total key-value pairs (both array and hash parts). |
| Method | Signature | Returns | Description |
|---|---|---|---|
RegisterEvent |
RGX:RegisterEvent(event, callback, id, owner) |
— | Register a WoW event handler. id is optional (auto-generated from tostring(callback) if nil). owner is optional metadata. |
UnregisterEvent |
RGX:UnregisterEvent(event, id) |
— | Remove a handler by event name + ID. |
RegisterUnitEvent |
RGX:RegisterUnitEvent(event, unit, callback, id, owner) |
— | Register a unit-filtered event. unit e.g. "player". |
UnregisterUnitEvent |
RGX:UnregisterUnitEvent(event, unit, id) |
— | Remove a unit event handler. |
RegisterMessage |
RGX:RegisterMessage(message, callback, id, owner) |
— | Register for an internal message (callback-based pub/sub). |
SendMessage |
RGX:SendMessage(message, ...) |
— | Fire an internal message to all registered handlers. |
UnregisterMessage |
RGX:UnregisterMessage(message, id) |
— | Remove a message handler. |
FireEvent |
RGX:FireEvent(event, ...) |
— | Internal: dispatch an event to all registered handlers. Uses pcall per handler. |
CreateEmitter |
RGX:CreateEmitter(name) |
table |
Create a named event emitter object for addon-internal use. |
RegisterCallback |
emitter:RegisterCallback(event, callback, id) |
— | Register a callback on an emitter. |
local emitter = RGX:CreateEmitter("MyAddon")
emitter:RegisterCallback("OnSomething", function(...) end, "myId")
emitter:Fire("OnSomething", arg1, arg2)
emitter:UnregisterCallback("OnSomething", "myId")| Method | Signature | Returns | Description |
|---|---|---|---|
After |
RGX:After(delay, callback) |
timer |
One-shot timer. delay in seconds. Returns timer reference. |
Every |
RGX:Every(interval, callback) |
timer |
Repeating timer. interval in seconds. Returns timer reference. |
CancelTimer |
RGX:CancelTimer(timer) |
— | Cancel a running timer. |
| Method | Signature | Returns | Description |
|---|---|---|---|
Hook |
RGX:Hook(object, method, hookFn) |
— | Post-hook: calls hookFn(origFunc, ...) after the original. origFunc is the first argument for calling the original. |
| Method | Signature | Returns | Description |
|---|---|---|---|
QueueForCombat |
RGX:QueueForCombat(func, ...) |
— | If not in combat → func(...). If in combat → queue, fire on PLAYER_REGEN_ENABLED. |
ProcessCombatQueue |
RGX:ProcessCombatQueue() |
— | Internal: drains the combat queue. Called automatically on PLAYER_REGEN_ENABLED. |
| Method | Signature | Returns | Description |
|---|---|---|---|
SafeShow |
RGX:SafeShow(frame) |
— |
frame:Show() — combat-safe via queue. |
SafeHide |
RGX:SafeHide(frame) |
— |
frame:Hide() — combat-safe via queue. |
SafeSetPoint |
RGX:SafeSetPoint(frame, point, relFrame, relPoint, x, y) |
— |
ClearAllPoints() + SetPoint() — combat-safe. |
SafeSetParent |
RGX:SafeSetParent(frame, parent) |
— |
frame:SetParent(parent) — combat-safe. |
SafeSetCall |
RGX:SafeSetCall(fn, ...) |
— | Generic combat-safe call. Queues if in combat, calls immediately if not. |
SafeSetText |
RGX:SafeSetText(region, text) |
— |
region:SetText(text) — combat-safe. |
SafeUIDropDownMenu_SetText |
RGX:SafeUIDropDownMenu_SetText(dropdown, text) |
— |
UIDropDownMenu_SetText() — combat-safe. |
SafeUIDropDownMenu_Initialize |
RGX:SafeUIDropDownMenu_Initialize(dropdown, init, mode) |
— |
UIDropDownMenu_Initialize() — combat-safe. |
SafeUIDropDownMenu_Refresh |
RGX:SafeUIDropDownMenu_Refresh(dropdown) |
— |
UIDropDownMenu_Refresh() — combat-safe. |
SafeUIDropDownMenu_EnableDropDown |
RGX:SafeUIDropDownMenu_EnableDropDown(dropdown) |
— |
UIDropDownMenu_EnableDropDown() — combat-safe. |
SafeUIDropDownMenu_DisableDropDown |
RGX:SafeUIDropDownMenu_DisableDropDown(dropdown) |
— |
UIDropDownMenu_DisableDropDown() — combat-safe. |
SafeToggleDropDownMenu |
RGX:SafeToggleDropDownMenu(...) |
— |
ToggleDropDownMenu() — combat-safe. |
SafeCloseDropDownMenus |
RGX:SafeCloseDropDownMenus(...) |
— |
CloseDropDownMenus() — combat-safe. |
| Method | Signature | Returns | Description |
|---|---|---|---|
RegisterSlashCommand |
RGX:RegisterSlashCommand(cmd, callback) |
— | Register /cmd slash command. |
| Method | Signature | Returns | Description |
|---|---|---|---|
InitDatabase |
RGX:InitDatabase() |
— | Initializes _G.RGXFrameworkDB and sets RGX.db. Called automatically during ADDON_LOADED. |
GetDB |
RGX:GetDB() |
table |
Returns RGX.db (the framework's own SavedVars). |
DB |
RGX:DB(name, defaults) |
table |
Get/create a _G[name] SavedVars table. Deep-merges defaults without overwriting existing keys. |
MigrateDB |
RGX:MigrateDB(db, name, currentVersion, migrations) |
— | Run version-based migrations. Migrations execute from (storedVersion + 1) through currentVersion. First install (no stored version) skips all migrations. |
local db = RGX:DB("MyAddonDB", { version = 0, settings = {} })
RGX:MigrateDB(db, "MyAddonDB", 3, {
[1] = function(db) db.settings.newFeature = true end,
[2] = function(db) db.settings.oldKey = nil end,
[3] = function(db) db.settings.nested = { a = 1 } end,
})| Method | Signature | Returns | Description |
|---|---|---|---|
Trim |
RGX:Trim(str) |
string |
Strip leading/trailing whitespace. |
Split |
RGX:Split(str, sep) |
table |
Split string by separator. Returns array. |
TableKeys |
RGX:TableKeys(tbl) |
table |
Array of all keys. |
TableValues |
RGX:TableValues(tbl) |
table |
Array of all values. |
TableContains |
RGX:TableContains(tbl, value) |
bool |
Whether value exists in table (linear search). |
TableMap |
RGX:TableMap(tbl, fn) |
table |
Map each value through fn(value, key). |
TableFilter |
RGX:TableFilter(tbl, fn) |
table |
Filter values where fn(value, key) is truthy. |
TableFind |
RGX:TableFind(tbl, fn) |
value|nil |
First value where fn(value, key) is truthy. |
MergeTable |
RGX:MergeTable(dest, src) |
table |
Shallow merge src into dest. Returns dest. |
Round |
RGX:Round(num, decimals) |
number |
Round to decimals places. Default decimals = 0. |
Print |
RGX:Print(...) |
— | Print with [RGX] prefix. |
Warn |
RGX:Warn(...) |
— | Print warning with [RGX Warning] prefix. |
Error |
RGX:Error(...) |
— | Print error with [RGX Error] prefix. |
See Fonts for detailed usage, Dropdowns for font dropdown schemas.
| Method | Signature | Returns | Description |
|---|---|---|---|
Register |
Fonts:Register(name, path, opts) |
— | Register a font. opts = { flags = "", size = 12, category = "Custom", locale = "" }. Invalidates caches. |
RegisterAddonFont |
Fonts:RegisterAddonFont(addonName, fontFile, opts) |
— | Register a font from an addon directory. Constructs path as "Interface\\AddOns\\addonName\\fontFile". |
RegisterFontPack |
Fonts:RegisterFontPack(addonName, files, opts) |
— | Register multiple fonts from an addon. files is an array of filenames. |
RegisterBuiltInFonts |
Fonts:RegisterBuiltInFonts() |
— | Registers all 36 built-in font definitions. Called automatically during init. |
| Method | Signature | Returns | Description |
|---|---|---|---|
GetPath |
Fonts:GetPath(name) |
string|nil |
Get the font file path for a registered font. |
Get |
Fonts:Get(name) |
table|nil |
Get the full font definition table: { name, path, flags, size, category, locale }. |
GetFont |
Fonts:GetFont(name, size, flags) |
path, size, flags |
Get font tuple for SetFont(). Falls back to default font if name not found. |
List |
Fonts:List() |
table |
Array of all registered font names (including unavailable). |
ListAvailable |
Fonts:ListAvailable() |
table |
Array of available font names (excludes unavailableFonts). Cached; invalidated on Register(). |
FindByPath |
Fonts:FindByPath(path) |
string|nil |
Reverse lookup: find font name by file path. |
ResolveName |
Fonts:ResolveName(input) |
string|nil |
Resolve a name or path to a canonical font name. |
| Method | Signature | Returns | Description |
|---|---|---|---|
SetDefault |
Fonts:SetDefault(name) |
— | Set the default font. Must be a registered font name. |
GetDefault |
Fonts:GetDefault() |
string |
Current default font name. Default: "Inter-Regular". |
SetDefaultSize |
Fonts:SetDefaultSize(size) |
— | Set the default font size. Clamped to [6, 72]. |
SetDefaultFlags |
Fonts:SetDefaultFlags(flags) |
— | Set default font flags (e.g. "OUTLINE"). |
| Method | Signature | Returns | Description |
|---|---|---|---|
Apply |
Fonts:Apply(fontString, name, size, flags) |
bool |
Apply font to a FontString. Returns false if font not found. |
Quick |
Fonts:Quick(fontString) |
bool |
Apply default font/size/flags to a FontString. |
ApplyChildren |
Fonts:ApplyChildren(parent, name, size, flags) |
— | Apply font to all FontString children of a frame. |
CreateString |
Fonts:CreateString(parent, name, size, flags, text) |
FontString |
Create and apply a new FontString. |
FromTemplate |
Fonts:FromTemplate(fontString, template, overrides) |
bool |
Apply a preset template. Templates: "header", "title", "subtitle", "body", "small", "caption", "custom". overrides = { size, flags, color }. |
| Method | Signature | Returns | Description |
|---|---|---|---|
SplitFlags |
Fonts:SplitFlags(flags) |
table |
Split "OUTLINE, MONOCHROME" → {"OUTLINE", "MONOCHROME"}. |
NormalizeFlags |
Fonts:NormalizeFlags(flags) |
string |
Normalize flag string: trim, deduplicate, sort. |
DescribeFlags |
Fonts:DescribeFlags(flags) |
string |
Human-readable description of flag combination. |
NormalizeColorValue |
Fonts:NormalizeColorValue(val) |
r, g, b, a |
Accepts ColorMixin, {r,g,b,a}, or hex string. |
NormalizeShadowOffset |
Fonts:NormalizeShadowOffset(val) |
x, y |
Accepts number (both), {x,y}, or {x=x,y=y}. |
| Method | Signature | Returns | Description |
|---|---|---|---|
NormalizeStyle |
Fonts:NormalizeStyle(style) |
table |
Normalize a style table, filling defaults. |
CreateStyle |
Fonts:CreateStyle(name, opts) |
— | Register a named style. opts = { font, size, flags, color, shadow }. |
GetStyle |
Fonts:GetStyle(name) |
table|nil |
Retrieve a named style. |
ApplyStyle |
Fonts:ApplyStyle(fontString, styleName) |
bool |
Apply a named style to a FontString. |
ApplyStyleMap |
Fonts:ApplyStyleMap(fontString, styleMap, key) |
bool |
Apply a style from a map by key. |
| Method | Signature | Returns | Description |
|---|---|---|---|
GetGroupedFonts |
Fonts:GetGroupedFonts() |
table |
Fonts grouped by category. Cached. |
BuildGroupedFontItems |
Fonts:BuildGroupedFontItems(opts) |
table |
Build nested menu items for dropdowns. opts = { keepShownOnClick = bool, onSelect = fn }. Produces dual-schema items (both children/menuList and onClick/func). |
GetCategoryLabel |
Fonts:GetCategoryLabel(cat) |
string |
Get display label for a font category. |
| Method | Signature | Returns | Description |
|---|---|---|---|
CreateFontDropdown |
Fonts:CreateFontDropdown(parent, opts) |
table |
Create a font selection dropdown. Returns holder with onChange callback. |
CreateSimpleFontSelector |
Fonts:CreateSimpleFontSelector(parent, opts) |
table |
Simplified font selector. |
CreateFontSettingControl |
Fonts:CreateFontSettingControl(parent, opts) |
table |
Dropdown + reset button bound to storage[key]. |
AttachFontSelector |
Fonts:AttachFontSelector(dropdown, opts) |
— | Attach font selector behavior to an existing dropdown. |
GetOptionValues |
Fonts:GetOptionValues() |
table |
Get dropdown option values array. |
| Method | Signature | Returns | Description |
|---|---|---|---|
CreateFontMenuItems |
Fonts:CreateFontMenuItems(opts) |
table |
Delegate to BuildGroupedFontItems(opts). |
CreateFlagMenuItems |
Fonts:CreateFlagMenuItems(current, onChange) |
table |
Menu items for font flag selection. |
CreateSizeMenuItems |
Fonts:CreateSizeMenuItems(current, onChange) |
table |
Menu items for font size selection. |
CreateStyleMenuItems |
Fonts:CreateStyleMenuItems(current, onChange) |
table |
Menu items for named style selection. |
| Method | Signature | Returns | Description |
|---|---|---|---|
CreateStyleSelector |
Fonts:CreateStyleSelector(parent, opts) |
table |
Dropdown + size slider + flags menu + live preview. Returns selector object with Refresh(), GetValue(), SetValue(). |
AttachStyleSelector |
Fonts:AttachStyleSelector(dropdown, opts) |
— | Attach style selector behavior. |
CreateStyleEditorFrame |
Fonts:CreateStyleEditorFrame(parent, opts) |
Frame |
Full style editor frame. |
| Method | Signature | Returns | Description |
|---|---|---|---|
CreateTestFrame |
Fonts:CreateTestFrame() |
Frame |
Create a font test/preview frame. |
ToggleTestFrame |
Fonts:ToggleTestFrame() |
— | Toggle the test frame visibility. |
See Dropdowns for detailed item schema and usage.
| Method | Signature | Returns | Description |
|---|---|---|---|
CreateNestedDropdown |
Dropdowns:CreateNestedDropdown(parent, opts) |
table |
Create a nested dropdown. opts = { items = table|fn, title, width, onChange, initializer }. Items can be a table or a function (lazy rebuild). Returns holder with dropdown, button, text. |
CopyItem |
Dropdowns:CopyItem(item) |
table |
Deep-copy + normalize an item. Normalizes: menuList→children, arg1→value, font→value, name→value (if path), func→onClick (if no onClick). |
NormalizeItems |
Dropdowns:NormalizeItems(items) |
table |
Normalize an array of items via CopyItem. |
AddInlineButton |
Dropdowns:AddInlineButton(item, btnOpts) |
item |
Add an inline button to a menu item. btnOpts = { texture, onClick, width, height, margin }. |
ForceWidth |
Dropdowns:ForceWidth(dropdown, width) |
— | Force a dropdown's text/width. |
GetListFrame |
Dropdowns:GetListFrame(level) |
Frame|nil |
Get the dropdown list frame at the given nesting level. |
ShortenLabel |
Dropdowns:ShortenLabel(label, maxChars) |
string |
Truncate label with "..." if exceeds maxChars. |
See Colors for detailed usage.
| Method | Signature | Returns | Description |
|---|---|---|---|
Get |
Colors:Get(name) |
ColorMixin |
Get a named color from the palette. |
GetRGB |
Colors:GetRGB(name) |
r, g, b |
Get RGB components (0–1). |
GetHex |
Colors:GetHex(name) |
string |
Get hex color string (e.g. "ff58be81"). |
Create |
Colors:Create(r, g, b, a) |
ColorMixin |
Create a new ColorMixin. |
Clone |
Colors:Clone(color) |
ColorMixin |
Clone a color. |
GetClass |
Colors:GetClass(className) |
ColorMixin |
Get class color (English class name). |
GetQuality |
Colors:GetQuality(qualityEnum) |
ColorMixin |
Get item quality color (0=gray through 5=heirloom). |
GetPower |
Colors:GetPower(powerType) |
ColorMixin |
Get power type color (e.g. "MANA", "RAGE"). |
Wrap |
Colors:Wrap(text, colorName) |
string |
Wrap text in color escape sequences using a named color. |
Lerp |
Colors:Lerp(c1, c2, t) |
ColorMixin |
Linear interpolation between two colors. |
Darken |
Colors:Darken(color, amount) |
ColorMixin |
Darken a color by amount (0–1). |
Lighten |
Colors:Lighten(color, amount) |
ColorMixin |
Lighten a color by amount (0–1). |
OpenPicker |
Colors:OpenPicker(r, g, b, callback) |
— | Open the color picker with initial color and change callback. |
CreateColorPicker |
Colors:CreateColorPicker(parent, opts) |
table |
Create an embedded ColorPicker widget. |
CreateColorSettingControl |
Colors:CreateColorSettingControl(parent, opts) |
table |
Create a color swatch + label bound to storage[key]. |
ApplyStatusBar |
Colors:ApplyStatusBar(statusBar, colorName) |
— | Apply a named color to a StatusBar's texture. |
See Colors for full widget details.
| Method | Signature | Returns | Description |
|---|---|---|---|
Show |
ColorPicker:Show(r, g, b, a, callback) |
— | Show the color picker. |
Hide |
ColorPicker:Hide() |
— | Hide the color picker. |
Get |
ColorPicker:Get() |
r, g, b, a |
Get current color values. |
Set |
ColorPicker:Set(r, g, b, a) |
— | Set color programmatically. |
OnClose |
ColorPicker:OnClose(callback) |
— | Register a callback for when the picker closes. |
| Method | Signature | Returns | Description |
|---|---|---|---|
RegisterBar |
Textures:RegisterBar(name, path, opts) |
— | Register a statusbar texture. opts = { category = "Custom" }. |
GetBar |
Textures:GetBar(name) |
string|nil |
Get the texture path for a registered statusbar. |
ListBars |
Textures:ListBars() |
table |
Array of all registered statusbar names. |
GetDefaultBar |
Textures:GetDefaultBar() |
string |
Current default statusbar name. Default: "Blizzard". |
SetDefaultBar |
Textures:SetDefaultBar(name) |
— | Set the default statusbar. |
CreateBarDropdown |
Textures:CreateBarDropdown(parent, opts) |
table |
Create a statusbar selection dropdown. |
CreateBarSettingControl |
Textures:CreateBarSettingControl(parent, opts) |
table |
Create a bar dropdown + reset button. |
ImportLSM |
Textures:ImportLSM() |
— | Scan LibSharedMedia-3.0 for statusbar textures and register them. Called automatically on first query if LSM is loaded. |
| Method | Signature | Returns | Description |
|---|---|---|---|
ApplyBackdrop |
Design:ApplyBackdrop(frame, variant) |
— | Apply a backdrop template. Variants: "dark", "panel", "solid", "border". |
CreateFrame |
Design:CreateFrame(parent, opts) |
Frame |
Create a styled frame with backdrop. opts = { width, height, backdrop = "dark" }. |
CreateButton |
Design:CreateButton(parent, opts) |
Button |
Create a styled button. opts = { text, width, height, onClick }. |
CreateSectionHeader |
Design:CreateSectionHeader(parent, text) |
FontString |
Create a styled section header label. |
CreateDivider |
Design:CreateDivider(parent) |
Texture |
Create a horizontal divider line. |
CreateSection |
Design:CreateSection(parent, opts) |
Frame |
Create a section container with header and optional content. opts = { title, padding }. |
RGBToHex |
Design:RGBToHex(r, g, b) |
string |
Convert RGB (0–1) to hex string. |
| Key | Hex | Usage |
|---|---|---|
primary |
#58be81 |
Primary accent, highlights |
accent |
#bc6fa8 |
Secondary accent |
surface |
#1a1a2e |
Surface backgrounds |
background |
#16213e |
Frame backgrounds |
text |
#e0e0e0 |
Primary text |
subtext |
#a0a0a0 |
Secondary/muted text |
success |
#4caf50 |
Success indicators |
warning |
#ff9800 |
Warning indicators |
error |
#f44336 |
Error indicators |
border |
#333355 |
Border lines |
borderActive |
#58be81 |
Active/focused borders |
hover |
#2a2a4e |
Hover highlight |
| Method | Signature | Returns | Description |
|---|---|---|---|
CreateSlider |
UI:CreateSlider(parent, opts) |
table |
Create a slider control. opts = { label, min, max, step, value, onChange, width }. Returns { frame, slider, label, value }. |
CreateToggle |
UI:CreateToggle(parent, opts) |
table |
Create a checkbox toggle. opts = { label, value, onChange, width }. Returns { frame, checkbox, label }. |
CreateLabel |
UI:CreateLabel(parent, opts) |
FontString |
Create a styled label. opts = { text, font, size, flags, color, justifyH }. |
CreateColorPicker |
UI:CreateColorPicker(parent, opts) |
table |
Create a color picker control. opts = { label, value, onChange }. Returns { frame, swatch, label }. |
CreateColorSettingControl |
UI:CreateColorSettingControl(parent, opts) |
table |
Color swatch + label bound to storage[key]. |
CreateStatusBarDropdown |
UI:CreateStatusBarDropdown(parent, opts) |
table |
Statusbar texture dropdown. opts = { label, value, onChange }. |
CreateFontDropdown |
UI:CreateFontDropdown(parent, opts) |
table |
Font family dropdown. opts = { label, value, onChange }. |
CreateFontSettingControl |
UI:CreateFontSettingControl(parent, opts) |
table |
Font dropdown + reset button bound to storage[key]. |
| Method | Signature | Returns | Description |
|---|---|---|---|
CreateOptionsPanel |
UI:CreateOptionsPanel(name, opts) |
table |
Create a full options panel. opts = { title, subtitle, width, height, version, author, website }. Returns panel object. |
panel:AddTab |
panel:AddTab(name, buildFn) |
— | Add a tab. buildFn(container) is called to populate the tab content. |
panel:Open |
panel:Open() |
— | Open the panel to Interface Options. |
panel:SelectTab |
panel:SelectTab(index) |
— | Select a tab by index. |
panel:SelectTabByName |
panel:SelectTabByName(name) |
— | Select a tab by name. |
panel:InvalidateAllTabs |
panel:InvalidateAllTabs() |
— | Mark all tabs for rebuild on next show. |
panel:Refresh |
panel:Refresh() |
— | Force-refresh the current tab. |
| Method | Signature | Returns | Description |
|---|---|---|---|
Create |
Minimap:Create(config) |
table |
Create a minimap button. config = { texture, position, storage, storageKey, tooltip, onClick, onEnter, onLeave }. Returns button object. |
| Method | Signature | Returns | Description |
|---|---|---|---|
SetVisible |
button:SetVisible(visible) |
— | Show/hide the minimap button. |
GetAngle |
button:GetAngle() |
number |
Current angle in radians. |
SetAngle |
button:SetAngle(angle) |
— | Set position by angle. |
GetVisible |
button:GetVisible() |
bool |
Whether the button is shown. |
SetTooltip |
button:SetTooltip(text) |
— | Set tooltip text. |
OnClick |
button:OnClick(callback) |
— | Override the click handler. |
| Method | Signature | Returns | Description |
|---|---|---|---|
Register |
Sound:Register(id, opts) |
table |
Register a sound. opts = { path, name, variants, defaultVariant, volume, muted, welcome, setting, welcomeSound }. Returns handle. |
| Method | Signature | Returns | Description |
|---|---|---|---|
Init |
handle:Init() |
— | Initialize sound (validate file, set defaults). |
Play |
handle:Play(variant) |
— | Play the sound. If variant is nil and variants > 0, picks random. Supports "default", "random", or specific number. |
MuteDefault |
handle:MuteDefault() |
— | Mute the default variant. |
UnmuteDefault |
handle:UnmuteDefault() |
— | Unmute the default variant. |
Test |
handle:Test() |
— | Play the sound at full volume for testing. |
GetVariant |
handle:GetVariant() |
number |
Current variant number. |
SetVariant |
handle:SetVariant(n) |
— | Set current variant (1-indexed). |
GetSetting |
handle:GetSetting() |
string |
Current setting key. |
SetSetting |
handle:SetSetting(key) |
— | Set the setting key for persistence. |
Enable |
handle:Enable() |
— | Enable the sound. |
Disable |
handle:Disable() |
— | Disable the sound. |
ShowWelcome |
handle:ShowWelcome() |
— | Play the welcome sound if configured. |
Logout |
handle:Logout() |
— | Save current state for next login. |
| Method | Signature | Returns | Description |
|---|---|---|---|
NewDataObject |
DataBroker:NewDataObject(name, attrs) |
table |
Create a DataBroker data object. Returns a live proxy — attribute reads/writes go through metatable to the real object. attrs = { type, icon, label, OnClick, OnEnter, OnLeave, tooltipName, tooltipText, ... }. |
OnNewDataObject |
DataBroker:OnNewDataObject(callback) |
— | Register a callback fired when any data object is created. Receives (name, dataObject). |
OnAttributeChanged |
DataBroker:OnAttributeChanged(callback) |
— | Register a callback fired when any data object attribute changes. Receives (name, key, value, dataObject). |
| Command | Description |
|---|---|
/rgx modules |
List all loaded modules with status. |
/rgx fonts |
List all registered fonts with path, category, and availability. |
/rgx debug |
Toggle debug mode on/off. Prints detailed trace information when enabled. |
These modules are in-tree but not loaded by the XML loader since v1.5.18. See Dormant-Modules for their full API.
| Module | Global | Status |
|---|---|---|
| PetBattles | RGXPetBattles |
Self-initializes, but GetPetBattles() returns nil |
| SharedMedia | RGXSharedMedia |
Not initialized by TryInit
|
| Combat | RGXCombat |
Not initialized by TryInit
|
| Reputation | RGXReputation |
Not initialized by TryInit
|