Skip to content

Media Buttons

sfmict edited this page Mar 8, 2024 · 1 revision

To use these buttons, you need to include the LibSFDropDown and LibSharedMedia libraries.

Pulling the libraries into your addon

local lsfdd = LibStub("LibSFDropDown-1.5")
local media = LibStub("LibSharedMedia-3.0")

Button methods

local button = Button:ddSetOnSelectedFunc(func)

Sets a callback function that will be called when the selected value is set

Arg Type Description
func function(value) function that will be called with a value parameter

Creating buttons

local button = lsfdd:CreateMediaBackgroundButton([parent[, width]])

Creates a button with list of backgrounds and DropDownButtonMixin applied.

Arg Type Description
parent frame the parent of the button
width number the width of the button


local button = lsfdd:CreateMediaBorderButton([parent[, width]])

Creates a button with list of borders and DropDownButtonMixin applied.

Arg Type Description
parent frame the parent of the button
width number the width of the button


local button = lsfdd:CreateMediaStatusbarButton([parent[, width]])

Creates a button with list of status-bars and DropDownButtonMixin applied.

Arg Type Description
parent frame the parent of the button
width number the width of the button


local button = lsfdd:CreateMediaFontButton([parent[, width]])

Creates a button with list of fonts and DropDownButtonMixin applied.

Arg Type Description
parent frame the parent of the button
width number the width of the button


local button = lsfdd:CreateMediaSoundButton([parent[, width]])

Creates a button with list of sounds and DropDownButtonMixin applied.

Arg Type Description
parent frame the parent of the button
width number the width of the button

Clone this wiki locally