1.    local BloodRune = CreateFrame("Frame", nil, UIParent)
       BloodRune:SetPoint("TOPLEFT", 10, -10)
       local BloodRuneIcon = BloodRune:CreateTexture()
      -- RuneIcon:SetTexCoord(0, 1, 0, 1)
       BloodRuneIcon:SetPoint("TOPLEFT", 0, 0)
       BloodRuneIcon:SetPoint("BOTTOMRIGHT", 0, 0)
       local CoolDown = CreateFrame("Cooldown", nil, BloodRune,  "CooldownFrameTemplate")
       CoolDown:SetPoint("TOPLEFT", 0, 0)
       CoolDown:SetPoint("BOTTOMRIGHT", 0, 0)
       CoolDown:SetCooldown(GetTime(), 20)
       BloodRune.Blood = BloodRuneIcon

    This works but looks ugly. The cooldown animation is a square. How do I make the cooldown round, been searching around not having much luck.

    Also I need to know how I can make a smaller frame inside a larger frame scale it self.

    Say we have the parent frame 100 x 100. Then the child frame 50x50. What I want is that child frame to grow or shrink by an equal with and height.

    So if the parent frame changed to 100 wide by 20 high. Then the child frame would be 20x20.

    About the frame changing size I got something worked out using onsizechanged setscript.


    This is a bit out of my realm, I've had no good cause to play with cooldown animations at any point. I'll see if I can find someone who might be able to help.

    Well I dug into the deathknight icons. And found one that looks like a ring. This stuff is really hard for me. But with my limited knowledge. I think the ring is somehow being used as a border texture for the cooldown. This way the cooldowns appear round. But how I have no idea how to code that up.

    Ring file "Interface\AddOns\GalvinUnitBars\textures\UI-PlayerFrame-Deathknight-Ring"

    I have another problem when I extracted the texture and put it into the folder. then do SetTexture to the path. It doesn't work.


    And I cut and pasted the folder to make sure there are no typos. So how come it shows it when I specifiy the internal file but not a texture file in my addons folder?

    I even used a converter on the extracted file to make sure it was extracted correctly.

    EDIT: Found out seems if I add my own textures I have to restart the game before they work.

       local BloodRuneIconFrame = CreateFrame("Button", nil, UIParent)
       BloodRuneIconFrame:SetPoint("TOPLEFT", 10, -10)
       local BloodRuneIcon = BloodRuneIconFrame:CreateTexture()
       local CoolDown = CreateFrame("Cooldown", nil, BloodRuneIconFrame,  "CooldownFrameTemplate")
         local BloodRuneBorderFrame = CreateFrame("Frame", nil, CoolDown)
           local BloodRuneBorder = BloodRuneBorderFrame:CreateTexture()

    CooldownFrame_SetTimer(CoolDown, GetTime(), 20, 1)

    Well I figured half of it out. But the I still need to know how to hide the cooldown texture that goes outside of the icon area. There must be one last thing I'm overlooking.

    no luck on finding someone? There any books or anything on animation. This is holding up developement of my addon.

    The two books on wow programming have nearly nothing on animation.

    I understand your frustration, but it's impossible for any book to cover every single need you could possibly have. The first edition of the book came out before the animation system was ever implemented. The second edition was meant to include a chapter on the animation system but this was unable to happen due to several factors.

    Also, what you're trying to do isn't animation. You're using the cooldown model which is completely separate from what you are trying to do. I'll try to take a look at it tonight, but you know more about this particular game system than I do at this moment.

    This is a community and we help each other when possible. It's very frustrating for me to hear what I am interpreting as a sense of entitlement in this case. The only way for me to get the information for you, since I've already asked, is to play with it for myself. That's a direct cost of my time for your benefit, and I'm an incredibly busy man. That being said, I will try to take a look at it this evening, if I can.

    The moral of the story is you don't make the cooldown model square, you can't do this. What you can do is change the size of the cooldown and put it under a border that hides the corners. This is how the default UI does this, as can be seen in RuneFrame.xml. For example, you can do the following:

     -- Construct a rune icon with cooldown model, with the same technique as RuneFrame.xml
     if not BloodRuneIconFrame then
        BloodRuneIconFrame = CreateFrame("Button", nil, UIParent)
        BloodRuneIconFrame.icon = BloodRuneIconFrame:CreateTexture(nil, "BACKGROUND")
        BloodRuneIconFrame.cooldown = CreateFrame("Cooldown", nil, BloodRuneIconFrame)
        BloodRuneIconFrame.borderFrame = CreateFrame("Frame", nil, BloodRuneIconFrame)
        BloodRuneIconFrame.border = BloodRuneIconFrame.borderFrame:CreateTexture(nil, "OVERLAY")
     rune = BloodRuneIconFrame
     -- Place and size the rune
     rune:SetPoint("LEFT", 50, 0)
     rune:SetSize(50, 50)
     rune.cooldown:SetPoint("CENTER", rune, "CENTER", 0, 1)
     rune.cooldown:SetSize(31, 31)
     rune.border:SetVertexColor(0.6, 0.6, 0.6, 1)
     CooldownFrame_SetTimer(rune.cooldown, GetTime(), 20, 1)

    When implemented correctly, as you can see, it appears that the cooldown model is circular when in fact it's not. Hope that helps.

    Thanks, I wasn't asking you do it now, just curious how it was going. Sorry

    Yeah that was the conclusion I came to after playing around with sizes and stuff.


    Thanks. Hope you got it working!

    Yeah I even added some math so if the rune frame changes size the cooldown frame will change size so it will always look like its round. But right now working on frame management. This addon is going to be nice when done.

    Thanks again.