Quantcast Adding Font Options to my addon - WoWInterface
Thread Tools Display Modes
11-12-19, 01:22 PM   #1
Reetro
A Murloc Raider
Join Date: Oct 2019
Posts: 4
Adding Font Options to my addon

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()

end
  Reply With Quote
11-12-19, 04:11 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,670
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

  Reply With Quote
11-12-19, 09:21 PM   #3
Reetro
A Murloc Raider
Join Date: Oct 2019
Posts: 4
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.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Adding Font Options to my addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off