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 04:16 PM
Size:
959 b
Downloads:
4,819
Favorites:
84
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 Comment Options
Old 11-03-2009, 10:46 AM  
c0ding
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
How to make it works with only de button bar style?

http://www.wowinterface.com/download...lerDiablo.html

It's from Zork, but only the button bar.

Regards,
c0ding is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 08-21-2009, 01:48 AM  
FatalEntity
A Kobold Labourer

Forum posts: 0
File comments: 87
Uploads: 2
I was having a problem with the status bar being full even if it should be empty. By applying the smoothing function to the health bar and mana bar and logging in on a warrior or DK its most noticeable that their rage/runic power bar is at FULL and not empty as it should be when you log in (assuming you diffident log out with some amount of power. Happens to any statsbar that should be at zero after it is created.

I fixed it by changing the Smooth function to this

Code:
local function Smooth(self, value)
	if value ~= self:GetValue() then
		smoothing[self] = value
	else
		smoothing[self] = nil
		self:SetValue_(value) -- Added this
	end
end

Last edited by FatalEntity : 08-21-2009 at 01:49 AM.
FatalEntity is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 05-28-2009, 01: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, 06:54 PM  
Phanx
A Cobalt Mageweaver
 
Phanx's Avatar
Interface Author - Click to view interfaces

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

Forum posts: 3
File comments: 22
Uploads: 7
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 08:16 AM.
Gotai is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-09-2009, 09:19 PM  
Toran
A Wyrmkin Dreamwalker

Forum posts: 59
File comments: 217
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 10:02 PM.
Toran is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-07-2009, 07: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, 04: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, 02:52 PM  
p3lim
A Molten Giant
 
p3lim's Avatar
Interface Author - Click to view interfaces

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

Forum posts: 163
File comments: 663
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.
__________________


Quote:
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-04-2008, 08: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 08:15 PM.
Xuerian is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-04-2008, 01:43 PM  
zork
A Flamescale Wyrmkin
 
zork's Avatar
Interface Author - Click to view interfaces

Forum posts: 146
File comments: 1080
Uploads: 28
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.
| Blog | Roth UI | Roth UI mini | Roth UI FAQ | GoogleCode | DevShots | TheBigOne | Guild

Last edited by zork : 11-04-2008 at 01:49 PM.
zork is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 11-04-2008, 01: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, 01:25 PM  
zork
A Flamescale Wyrmkin
 
zork's Avatar
Interface Author - Click to view interfaces

Forum posts: 146
File comments: 1080
Uploads: 28
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.
| Blog | Roth UI | Roth UI mini | Roth UI FAQ | GoogleCode | DevShots | TheBigOne | Guild

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

Forum posts: 560
File comments: 839
Uploads: 19
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
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.