-
Notifications
You must be signed in to change notification settings - Fork 0
ColorOverrides
ColorOverrides manages multiple keyed color values in one row.
| Field | Type | Description |
|---|---|---|
entries |
table | List of { key, label } color entries. |
getColor |
function | Reads current color by key. |
setColor |
function | Writes color by key. |
getDefaultColor |
function | Reads default color by key. |
app:RegisterControl("bars.colors", {
id = "classColors",
type = "coloroverrides",
label = "Class colors",
entries = {
{ key = "WARRIOR", label = "Warrior" },
{ key = "MAGE", label = "Mage" },
},
getColor = function(key)
return MyAddonDB.profile.classColors[key]
end,
setColor = function(key, color)
MyAddonDB.profile.classColors[key] = color
MyAddon.RefreshClassColors()
end,
getDefaultColor = function(key)
return MyAddon.DefaultClassColors[key]
end,
})Wiki
• Home
• Architecture
• Vendoring
• Quick Start
• Field Glossary
• Troubleshooting
• Validation
Reference
⚬ Config API
⚬ UI API
⚬ Elements
⚬ Examples
Elements
Structure
• Category
• Page
• Group
• Dashboard
• InfoPage
• Custom
Controls
• Toggle
• CheckboxDropdown
• Dropdown
• MultiDropdown
• SoundDropdown
• Input
• Slider
• Button
Advanced
• ColorPicker
• ColorPalette
• ColorOverrides
• ReorderList
• Expandable
• Notes
Examples
Start
• Minimal Addon
• Complete Settings Center
• Wrapper Bridge Pattern
Data and Behavior
• Dependent Controls
• Nested Database Values
• Dynamic Dropdowns
• Runtime Refresh
• Search and New Badges
• Custom Hosted Editors
Polish
• Support Links
• Theme Colors
• Theme Borders