Reply
 
Thread Tools Display Modes
Unread 01-17-13, 02:54 AM   #1
MiRai
A Theradrim Guardian
Join Date: Jul 2011
Posts: 69
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:



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.
MiRai is offline   Reply With Quote
Unread 01-17-13, 05:50 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 982
Set a OnValueChanged script handler on the power bar and update the text based on the value it receives.
__________________
「貴方は1人じゃないよ」
haste is offline   Reply With Quote
Unread 01-18-13, 07:31 AM   #3
Sauerkraut
A Cyclonian
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 46
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
Sauerkraut is offline   Reply With Quote
Unread 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: 903
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..."

Dawn is offline   Reply With Quote
Unread 01-23-13, 06:55 PM   #5
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,399
I'd imagine something like this:
Code:
self.Power:HookScript("OnValueChanged", function(bar, value)
     bar.value:SetText(value)
end)
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 01-24-13, 03:29 PM   #6
Sauerkraut
A Cyclonian
 
Sauerkraut's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 46
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)
Sauerkraut is offline   Reply With Quote
Reply

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

Thread Tools
Display Modes

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