Quick Pitbull4 Question
Moderators: Fridmarr, Worldie, Aergis, _Chloe
7 posts
• Page 1 of 1
Quick Pitbull4 Question
Is there anyway to get Pitbull4 to limit the number of letters it shows in each characters name? Kinda like the way Grid does for its raid frames?
- Tandors
- Posts: 247
- Joined: Wed Dec 19, 2007 4:43 pm
Re: Quick Pitbull4 Question
quite sure it's limited by the font size but maybe there is something in the new lua code. Never bothered to dig into it. The old system was more easier to use unless you are very familiar with the lua coding.
- Seloei
- Posts: 1130
- Joined: Wed Mar 19, 2008 2:24 am
- Location: Estonia
Re: Quick Pitbull4 Question
Right now there is definitely no limit on the player names. They go out of the fram as far as they need to get the whole name spelled out.
- Tandors
- Posts: 247
- Joined: Wed Dec 19, 2007 4:43 pm
Re: Quick Pitbull4 Question
sorry for necro-ing your post but it might be usefull.
I use this for Pitbull LuaText name field:
Shows the first 6 characters of the unit name. When mouseovered, it shows either the amount of missing hp or the players name when full health.
I use this for Pitbull LuaText name field:
- Code: Select all
if IsMouseOver(unit) then
local max,cur = MaxHP(unit),HP(unit)
local rem = max - cur
if rem > 0 then
local r,g,b = HPColor(cur, max)
return "|cff%02x%02x%02x-%s|r",r,g,b,Short(max-cur,true)
else
return '%s',strsub(Name(unit),1,6)
end
else
local s = Status(unit)
if s then
return s
else
return '%s',strsub(Name(unit),1,6)
end
end
Shows the first 6 characters of the unit name. When mouseovered, it shows either the amount of missing hp or the players name when full health.
-

trellian - Posts: 671
- Joined: Wed Jul 16, 2008 3:02 am
- Location: Silvermoon, EU
Re: Quick Pitbull4 Question
There's a cool way to make it alternate between two texts using a sine function. I have it alternating between Faction Name and Faction Rep Level and then displaying xp on mouseover currently. I'll go grab the code to share with you in a sec.
I think the frequency is 5 seconds. My trig is a little rusty. Don't think I've seen something like this implemented before. If you really wanted to, you could put a rotation of as many items as you wanted. Just split the sine curve into as many slices as you want items, amplify it, and adjust the frequency. If you have something specific in mind and can't do the math for it, let me know and I'll see if I can write it up.
- Code: Select all
[if IsMouseOver then
FractionalXP ' ' PercentXP:Percent:Paren ' ' Concatenate('R: ', PercentRestXP:Hide(0):Percent)
elseif Sin(Rad(10 * Pi * CurrentTime)) < 0 then
ReputationName
elseif ReputationName then
FractionalReputation ' ' PercentReputation:Percent:Paren
end]
I think the frequency is 5 seconds. My trig is a little rusty. Don't think I've seen something like this implemented before. If you really wanted to, you could put a rotation of as many items as you wanted. Just split the sine curve into as many slices as you want items, amplify it, and adjust the frequency. If you have something specific in mind and can't do the math for it, let me know and I'll see if I can write it up.
- Jerey-Darkspear
- Posts: 183
- Joined: Tue Jun 17, 2008 12:38 am
7 posts
• Page 1 of 1
Return to Add-ons, UI, and Macros
Who is online
Users browsing this forum: No registered users and 1 guest


