I'm writing an addon that involves the quest tracker and I'm trying to set up a way to figure out which item in the tracker the mouse cursor is over so I can remove items on clicks. So far I've come up with two ways to do this:
1) Set a OnUpdate handler whenever the mouse is over the quest tracker and use GetLeft(), GetRight, etc to figure out which font string in the tracker the mouse is over. The reason I'm somewhat against this idea is that it involves looping through all the tracked quests (although I'll grant that there aren't that many) every time OnUpdate happens.
2) Put a frame with no background over every quest/objectives and get mouse events on the frames. I really liked this one in practice and it was pretty easy to code up but I feel like making 25 effectively useless frames is a poor coding practice.
Anyone have a suggestion on either which of those two is a better idea or, ideally, a better idea that I haven't thought of? Thanks in advance.
How do I manipulate text (font size in particular) on a button? Right now I'm using button:SetText() to set the text and button:SetNormalFontObject() and button:SetHighlightFontObject() to set the font styles, but I can't set sizes using those functions. Is there a better way of handling this?