Originally Posted by Phanx
oUF doesn't handle tooltips, but it's simple to add them:
Code:
frame:SetScript("OnEnter", UnitFrame_OnEnter)
frame:SetScript("OnLeave", UnitFrame_OnLeave)
|
Ah thanks!
Originally Posted by Phanx
For menus, I can't recall offhand, but I think unit buttons might not be registered for right-clicks by default... try adding this:
Code:
frame:RegisterForClicks("AnyUp")
|
Thanks again! Worked as a charm
Btw, is there a health Tag that shortens the health numbers? For instance 7100 becomes 7.1k ? Did try the Tags I knew off and did even check SUF for the tags. (Did remember that SUF did use [curhp] so I thought I'd check that addon for it)
Would be really neat to have that Tag for target frames, esp on boss fights
Edit:
Thought I'd add combo points to the target frame using the example in cpoints.lua (just to try it out). Did alter it tho from self to and from health to frame. I don't get any errors, but it dosent show anything either.
Probably missing out on some small detail :S
And I'm not completly sure on what "index" does either. Maybe something I should'nt be using?
The full code can be found here >
http://pastebin.com/U5JH0ten , did update it now when I made this edit
I won't be using the combo points myself, will be using
Droodfocus to handle that, but thought it would be nice to add that and just comment it out incase a user want to use them.
Code:
if unit == "target" then
local CPoints = {}
for index = 1, MAX_COMBO_POINTS do
local CPoint = health:CreateTexture(nil, 'BACKGROUND', health)
-- Position and size of the combo point.
CPoint:SetSize(12, 16)
CPoint:SetPoint("LEFT", health, "LEFT", index * CPoint:GetWidth(), 10)
CPoints[index] = CPoint
end
-- Register with oUF
health.CPoints = CPoints
end