-
Notifications
You must be signed in to change notification settings - Fork 0
SoundDropdown
SoundDropdown stores one sound value and can preview sounds through a custom resolver, custom playback function, or LibSharedMedia lookup.

| Field | Type | Description |
|---|---|---|
soundResolver |
function | Converts stored value to playable sound. |
previewSoundFunc |
function | Custom preview playback. |
previewTooltip |
string | Tooltip text for preview button. |
playbackChannel |
string | Sound channel, e.g. "Master". |
getPlaybackChannel |
function | Dynamic channel provider. |
placeholderText |
string | Empty selection text. |
menuHeight |
number | Dropdown menu height. |
app:RegisterControl("sounds.alerts", {
id = "readySound",
key = "readySound",
type = "sounddropdown",
label = "Ready sound",
placeholderText = NONE or "None",
playbackChannel = "Master",
previewTooltip = "Preview this sound.",
soundResolver = function(value)
return MyAddon.ResolveSound(value)
end,
previewSoundFunc = function(value)
MyAddon.PlaySound(value)
end,
})The preview button tries, in order:
previewSoundFuncsoundResolver-
LibSharedMedia-3.0sound lookup - Raw stored value
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