Converting DogTag for use with oUF
So I am in the process of transitioning from PitBull to oUF. One thing I had setup in my PitBull layout was a DogTag that I got from a DogTag thread on the Elitist Jerks UI forums.
Code:
[(if ((Abbreviate(Name) ~= Name) and (Length(Name) > 10)) then Code:
[(if ((Abbreviate(Name) ~= Name) and (Length(Name) > 10)) then |
looked at this file yet?
Code:
oUF/elements/tags.lua names like "Smeê" actually turn out to be "Sme\195\170", so without utf8lib you won't get legible operations on extended utf8 characters. here is the tag i use for my raid frames, while not as complex as yours it may give you a point to start from : Code:
oUF.Tags["[raidhp]"] = function(u) Code:
local numberize = function(val) http://github.com/tekkub/ouf_tek/blo...bea/layout.lua |
Bad jadakren, 'o' is a global!
|
Quote:
|
...
god damnit I hate the 10 char minimum post, it ruins the effect of only posting "..." |
Quote:
|
Quote:
|
o h h . . . .
|
Quote:
|
oUF oUF ouF ouF ouf ouf unf unf unf unf unf
|
Glad the thread was a smash hit =)
|
??
Code:
oUF.Tags["[name]"] = function(u) |
methinks the ***** in this thread (maybe?) is that you should use "local o"
|
Code:
oUF.Tags["[name]"] = function(u) I thought I could find the abbreviate function from DogTag3.0 Lib and copy it over, but I was unable to find any reference to it. I could only find Abbrev and it was for "shortclassification" "shortclass" and "shortsex" . There is something that I am overlooking in my search, and I for the life of me I am unable to figure it out. |
Quote:
Functions must be valid, i guess that 'Abbreviate' and 'Length' etc is made by DogTag and Im not sure what they actually do to the string. Also, custom tags should have custom names, overriding the '[name]' tag can mess up other layouts. |
try this:
Code:
oUF.TagEvents['[customname]'] = 'UNIT_HEALTH UNIT_MAXHEALTH PLAYER_FLAGS_CHANGED' |
Quote:
|
Ok I finally got a chance to try it out after raid. I am getting this error:
Code:
Interface\AddOns\oUF_Septembark\Septembark_Main.lua:123: function arguments expected near '.' Code:
oUF.TagEvents['[customname]'] = 'UNIT_HEALTH UNIT_MAXHEALTH PLAYER_FLAGS_CHANGED' |
I think you're horribly complicating this... but that's to be expected if you were using DogTags before. Ignoring the conditionals at the start, what do you want your little [customname] tag to look like?
|
Quote:
Truncating doesn't help me when there are several mobs with the same beginning of a name. Lots of mobs have a generic beginning and then are identified by Acolyte, Spellweaver, Bloodknight, Centurion, etc. Sorry if I am making this horribly complicated , I am still learning this whole lua thing. I am coming from PitBull in hopes to "trim the fat" from my unit frames (5.6mb to be exact). In oUF I am given the chance to only take what I want. |
All times are GMT -6. The time now is 01:17 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI