Category: oUF: Plugins
Addon Information
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)

This file is a Addon for oUF by haste. You must have that installed before this Addon will work.

Author:
Version:
1.1
Date:
11-01-2008 03:16 PM
Size:
959 b
Downloads:
3,272
Favorites:
81
MD5:
Pictures
oUF Smooth Update
Smoothly animates status bars on oUF frames.

You can smooth bars in various ways:
  • frame.Health.Smooth = true
  • frame.Power.Smooth = true
  • frame:SmoothBar(frame.Health)
  • frame:SmoothBar(frame.Power)
  • frame:SmoothBar(any other statusbar)
  Change Log - oUF Smooth Update
Updated API
(frame.Smooth(Power|Health) to frame.(Health|Power).Smooth)
Added :SmoothBar(bar) method to frame for non-standard bars.
  Comments - oUF Smooth Update
Post A Reply
Author Comments Comment Options
Old 05-28-2009, 12:50 PM  
wagglesmurfsignup
A Defias Bandit

Forum posts: 3
File comments: 5
Uploads: 0
Great work Gotai!
wagglesmurfsignup is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 04-21-2009, 05:54 PM  
Phanx
A Chromatic Dragonspawn
 
Phanx's Avatar
Interface Author - Click to view interfaces

Forum posts: 186
File comments: 675
Uploads: 17
Thank you, Gotai!
Phanx is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 04-08-2009, 01:19 PM  
Gotai
A Defias Bandit
Interface Author - Click to view interfaces

Forum posts: 3
File comments: 15
Uploads: 6
Fix for bars not filling completely.

Here's a fix for the bars not filling completely. Replace lines 39-41 with:

Code:
		if cur == value or abs(cur - value) < 2 then
			bar:SetValue_(value)
			smoothing[bar] = nil
		end
We're currently working out the cause of the bars crossing the entire screen. Should have a fix for that shortly.

Edit: Thanks to diligent testing by Caellian, I'm fairly sure this should patch the problem for good: http://pastey.net/111986

For the interested few, GetValue() returns wonky values before the first SetValue. One of the possible returns is a QNAN value, which was causing the problem.

Last edited by Gotai : 04-09-2009 at 07:16 AM.
Gotai is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-09-2009, 08:19 PM  
Toran
A Wyrmkin Dreamwalker

Forum posts: 57
File comments: 183
Uploads: 0
Quote:
Originally posted by hipjipp
I've been noticing a small "bug" or perhaps a slight glitch.. When creating a new character or getting onto a low-leveled one, the bar isn't filled completely... There's about 5-10 pixels missing on the bar when it's "full". Could this be fixed with anything or am i stuck with it? It disappears after a certain hp-limit, but i havn't payed to close attention to it to say when the limit is reached.
Any thoughts on how to fix this? I notice the same thing on my low lvl bank toon (shaman orc). Didn't notice on my lvl 26 Priest Undead. Haven't checked my others yet.

Edit: Happens on my lvl 70 Rogue also, but only on the energy bar - last few pixels missing. Seems to be fixed on a reload in his case.

Last edited by Toran : 02-18-2009 at 09:02 PM.
Toran is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-07-2009, 06:16 AM  
hipjipp
A Cliff Giant
 
hipjipp's Avatar
Interface Author - Click to view interfaces

Forum posts: 77
File comments: 191
Uploads: 9
I've been noticing a small "bug" or perhaps a slight glitch.. When creating a new character or getting onto a low-leveled one, the bar isn't filled completely... There's about 5-10 pixels missing on the bar when it's "full". Could this be fixed with anything or am i stuck with it? It disappears after a certain hp-limit, but i havn't payed to close attention to it to say when the limit is reached.
__________________
Roarcat will eat you! Roar! =)
hipjipp is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-14-2008, 03:56 AM  
Xuerian
A Deviate Faerie Dragon
 
Xuerian's Avatar
Interface Author - Click to view interfaces

Forum posts: 13
File comments: 60
Uploads: 5
Quote:
Originally posted by p3lim
.SmoothBar() doesnt work
Which is why you call :SmoothBar.
Xuerian is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-10-2008, 01:52 PM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
.SmoothBar() doesnt work
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-08-2008, 10:31 PM  
Caellian
A Chromatic Dragonspawn
 
Caellian's Avatar
Interface Author - Click to view interfaces

Forum posts: 156
File comments: 557
Uploads: 4
Quote:
Originally posted by Caellian
Absolutely lovely, thanks for that

I might have spotted a bug though (or not) on my other computer, the character was in a party, one of the party member's health bar was crossing the entire screen from left to right (the unitframe being top left)
A reloadui fixed it, so far.
It has happened again, despite the change you've made, a simple reloadui fix it though.
__________________
Caellian is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-04-2008, 07:09 PM  
Xuerian
A Deviate Faerie Dragon
 
Xuerian's Avatar
Interface Author - Click to view interfaces

Forum posts: 13
File comments: 60
Uploads: 5
I'd suggest you just fold this in your frames as it seems to be a isolated case, and this code is fairly simple. Ignore the hooking part and apply it yourself, as it'd also let you specify the amount to smooth.

If other orb-based frames exist and use the same standard method, I could support that.

Quote:
Originally posted by zork
It worked perfectly for the statusbars but I have problems with my orbs. My orbs need to be sized by SetTexCoord this is due to a bug of SetStatusbar = Vertical and round texture files.

My texture is called "self.Health.Filling" or "self.Power.Filling" maybe you could add another option for Healthbars that are made out of textures.

Thats what worked out for me:

Code:
local f, min, max = CreateFrame("Frame"), math.min, math.max
f:SetScript("OnUpdate", function()
  local limit = 30/GetFramerate()
  for bar, value in pairs(smoothing) do
    local cur = bar:GetValue()
    local barmin, barmax = bar:GetMinMaxValues()
    local new = cur + min((value-cur)/30, max(value-cur, limit))
    bar:SetValue_(new)
    if bar.Filling then
      bar.Filling:SetHeight((new / barmax) * bar:GetWidth())
      bar.Filling:SetTexCoord(0,1,  math.abs(new / barmax - 1),1)
    end
    if cur == value or abs(cur - value) < 2 then
      smoothing[bar] = nil
    end
  end
end)
Looks awesome now. Thanks alot.

Last edited by Xuerian : 11-04-2008 at 07:15 PM.
Xuerian is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-04-2008, 12:43 PM  
zork
A Warpwood Thunder Caller
 
zork's Avatar
Interface Author - Click to view interfaces

Forum posts: 93
File comments: 739
Uploads: 18
It worked perfectly for the statusbars but I have problems with my orbs. My orbs need to be sized by SetTexCoord this is due to a bug of SetStatusbar = Vertical and round texture files.

My texture is called "self.Health.Filling" or "self.Power.Filling" maybe you could add another option for Healthbars that are made out of textures.

Thats what worked out for me:

Code:
local f, min, max = CreateFrame("Frame"), math.min, math.max
f:SetScript("OnUpdate", function()
  local limit = 30/GetFramerate()
  for bar, value in pairs(smoothing) do
    local cur = bar:GetValue()
    local barmin, barmax = bar:GetMinMaxValues()
    local new = cur + min((value-cur)/30, max(value-cur, limit))
    bar:SetValue_(new)
    if bar.Filling then
      bar.Filling:SetHeight((new / barmax) * bar:GetWidth())
      bar.Filling:SetTexCoord(0,1,  math.abs(new / barmax - 1),1)
    end
    if cur == value or abs(cur - value) < 2 then
      smoothing[bar] = nil
    end
  end
end)
Looks awesome now. Thanks alot.
__________________
| Simple is beautiful.
| Roth UI | GoogleCode | DevShots | Der Dicke | http://dm.next-gen.org

Last edited by zork : 11-04-2008 at 12:49 PM.
zork is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-04-2008, 12:36 PM  
Xuerian
A Deviate Faerie Dragon
 
Xuerian's Avatar
Interface Author - Click to view interfaces

Forum posts: 13
File comments: 60
Uploads: 5
Quote:
Originally posted by zork
Tested your mod and the feeling was not very smooth. I tested around abit and found that changing this

Code:
local new = cur + min((value-cur)/3, max(value-cur, limit))
to
Code:
local new = cur + min((value-cur)/30, max(value-cur, limit))
finally gave me the smooth feeling I was looking for. Hmmm...
That's the simple way to change how smooth you want it to be, seeing as that's current + difference/30 instead of 3... it'll be 10 times slower.

My goal was just to make it slide smoothly instead of jumping around, so if you like it at a different setting, it'll work just fine. I don't see myself making any changes to this any time soon as it's such a simple plugin.
Xuerian is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-04-2008, 12:25 PM  
zork
A Warpwood Thunder Caller
 
zork's Avatar
Interface Author - Click to view interfaces

Forum posts: 93
File comments: 739
Uploads: 18
Tested your mod and the feeling was not very smooth. I tested around abit and found that changing this

Code:
local new = cur + min((value-cur)/3, max(value-cur, limit))
to
Code:
local new = cur + min((value-cur)/30, max(value-cur, limit))
finally gave me the smooth feeling I was looking for. Hmmm...
__________________
| Simple is beautiful.
| Roth UI | GoogleCode | DevShots | Der Dicke | http://dm.next-gen.org

Last edited by zork : 11-04-2008 at 12:41 PM.
zork is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-01-2008, 05:11 PM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
Quote:
Originally posted by Xuerian
I've changed the API to p3lim's suggestion, and added a frame:SmoothBar(bar) method to support any other bars. The sanity check is also a little more generous, hopefully avoiding any infinite bars.
Thank you
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-01-2008, 03:18 PM  
Xuerian
A Deviate Faerie Dragon
 
Xuerian's Avatar
Interface Author - Click to view interfaces

Forum posts: 13
File comments: 60
Uploads: 5
I've changed the API to p3lim's suggestion, and added a frame:SmoothBar(bar) method to support any other bars. The sanity check is also a little more generous, hopefully avoiding any infinite bars.

Last edited by Xuerian : 11-01-2008 at 03:18 PM.
Xuerian is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-01-2008, 02:50 PM  
p3lim
A Scalebane Royal Guard
 
p3lim's Avatar
Interface Author - Click to view interfaces

Forum posts: 441
File comments: 756
Uploads: 18
Could you please make it work like this instead of what it is right now?
Code:
<object>.Health.Smooth = true
Code:
<object>.Power.Smooth = true
Would be much appreciated
p3lim is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Post A Reply



Category Jump:




The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOInterface | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


©2009 MMOUI / ZAM Network
vBulletin - Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.