Hello so for the past few days I've been trying to figure how to add font options to my World Of Warcraft addon BetterAuraTracker Classic. Currently I've gotten it setup to be able to change fonts now am trying to figure how to setup my options menu. I got a Drop menu setup how do I populate it with it with fonts?
Here is the code for my dropdown menu
BetterAuraTrackerPanel.BuffFontOptionsPanel.BuffFontDrop = CreateFrame("frame", "BuffFontDrop", BetterAuraTrackerPanel.BuffFontOptionsPanel, "UIDropDownMenuTemplate")
BetterAuraTrackerPanel.BuffFontOptionsPanel.BuffFontDrop:SetPoint("TOPLEFT", 0, -65)
BetterAuraTrackerPanel.BuffFontOptionsPanel.BuffFontDrop.onClick = function(self, arg1, arg2, checked)
print(UIDropDownMenu_GetText(self), UIDROPDOWNMENU_MENU_VALUE, arg1, arg2)
end
BetterAuraTrackerPanel.BuffFontOptionsPanel.BuffFontDrop.initialize = function(self, level)
local info = UIDropDownMenu_CreateInfo()
You can use LibSharedMedia to get a list of fonts registered with the library. You and/or your users are probably already using it. If you're at a loss as to creating a dropdown and options menu in the first place, then you could look into using AceConfig. It's part of the Ace3 library framework, though you don't need to use it all to get options menus.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh
Alright looked at Libshared media not really sure what to do with it sorry am a bit new to Lua this is my first addon how do I go about registering fonts with it? and how does it collect fonts? and I did get the drop down menu working now I just need to populated it with fonts.