View Single Post
03-03-13, 07:18 AM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
@Haleth
Nice one.

@humfras

You can cheat alot more if you have to. Atleast it's a huge improvement of what we currently had to do.

The texture can use blending and gradients are possible aswell. Additonally you can use overlays or backgrounds. You can recolor on value change. You can even position another texture (spark) ontop of the ring.

Lua Code:
  1. local function calc_health_spark(self,value)
  2.     local spark = self.health_spark.texture  
  3.     local adjust = 0.009
  4.     value = 1-value+adjust
  5.     local mult = 1
  6.     local radian = math.rad(90) + math.rad(value * (mult*90*self.config.health.segments_used))
  7.     spark:SetPoint("CENTER", spark.radius * math.cos(radian), spark.radius * math.sin(radian))
  8.     spark:SetRotation(radian - spark.shiftradian)  
  9.   end

On that note...I have not tested frame rotation which should be possible via animationgroups. Thus some could try to stack textures on a frame and rotate the full frame inside the scrollFrame.

Another big plus is the ability of AnimationGroups. Sth like Animation > SetSmoothing is just nice to have.

Sets the smoothing type for the animation. This setting affects the rate of change in the animation's progress value as it plays.

Signature:

Animation:SetSmoothing("smoothType")

Arguments:

smoothType - Type of smoothing for the animation (string)
  • IN - Initially progressing slowly and accelerating towards the end
  • IN_OUT - Initially progressing slowly and accelerating towards the middle, then slowing down towards the end
  • NONE - Progresses at a constant rate from beginning to end
  • OUT - Initially progressing quickly and slowing towards the end
http://wowprogramming.com/docs/widge...n/SetSmoothing

__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 03-03-13 at 07:36 AM.
  Reply With Quote