Thread Tools Display Modes
01-17-13, 02:54 AM   #1
MiRai
A Warpwood Thunder Caller
Join Date: Jul 2011
Posts: 96
Smooth Power Values (Digits)

I wasn't quite sure how to put what I wanted to ask into words, so I made a quick and dirty mock up video. I will recommend that you watch it at a higher resolution than the default 360p embedded resolution:

Video

Is it possible to make the power value digits count 'up' and 'down' like in the video? If so, what would it take to accomplish that? Is this going to be a boatload of work?

To be completely honest, I'm not entirely sure that I'd like this change, but if at all possible, I would like to see it in action on my screen while playing before I can truly make that call. As always, any help is appreciated.

Thanks!

EDIT: Apologies... the layout is oUF_Fail and here is the link.
  Reply With Quote
01-17-13, 05:50 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Set a OnValueChanged script handler on the power bar and update the text based on the value it receives.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
01-18-13, 07:31 AM   #3
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Originally Posted by haste View Post
Set a OnValueChanged script handler on the power bar and update the text based on the value it receives.
Thanks Haste this gave me the starting point I needed to get this working. Really appreciate all the help
  Reply With Quote
01-23-13, 06:13 AM   #4
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
I really like that. Especially, because I currently use "numbers only" unit frames that work fine but could need some ooomph. Please share the solution.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
01-23-13, 06:55 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I'd imagine something like this:
Code:
self.Power:HookScript("OnValueChanged", function(bar, value)
     bar.value:SetText(value)
end)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-24-13, 03:29 PM   #6
Sauerkraut
A Wyrmkin Dreamwalker
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 52
Phanx's way is probably better but...

Code:
	local text = lib.gen_fontstring(f.Health, cfg.font, 18, "OUTLINE")
	text:SetPoint("RIGHT", s.arrow, "LEFT", 6, -8)
	s:SetScript("OnValueChanged", function(self, value)
	text:SetFormattedText("%d", value, 0)
	text:SetJustifyH("RIGHT")
	end)
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Smooth Power Values (Digits)


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