• 0

    posted a message on Adding spark to LibCandyBar
    The comments about the parent made me go back and look at the examples I've tried to follow and I realized they set the parent to the actual candybar object of the bar frame. I tried changing the spark creating bit to:


    It worked(!). The spark is now on top of the bar just like I want. Thanks for pointing me in the right direction.
    Posted in: AddOn HELP!
  • 0

    posted a message on Adding spark to LibCandyBar
    I'm trying to add a position spark to a statusbar made using LibCandyBar-3.0, as as far as I can tell this functionality isn't included there. I'm almost there. The bar shows up and counts down and the spark appears. The problem is that the spark seems to appear behind the bar instead of on top of it. Could someone suggest what to do to make it appear on top to make it look really nice? This is basically the relevant bits of what I have now:

                    local buff, rank, texture, count, type, duration, time, source, isStealable, consolidate, spellid = UnitBuff("player",i)
                    local bar = LibStub("LibCandyBar-3.0"):New("Interface\\TargetingFrame\\UI-StatusBar",200,20)
                    bar:AddUpdateFunction( function(bar)
                                                if not bar.spark then
                                                    bar.spark = bar:CreateTexture(nil,"OVERLAY");
                                                    bar.spark:SetHeight(bar.height * 2.3);
                                                local statusBar = bar.candyBarBar
                                                local _, max = statusBar:GetMinMaxValues()
                                                local position = (statusBar:GetValue() / max * statusBar:GetWidth());
                                                bar.spark:SetPoint("CENTER",bar,"LEFT",position + bar.spark:GetWidth(),0);
                                           end )

    Yes it's yet another buffbar mod. I didn't know any Lua or WoW addon coding before starting this and google and the sources of other addons have helped a lot but I can't seem to get over this last hurdle. If there are any other blatant stupidities in the above (not unlikely) then free to point them out.

    Edit: And now I notice I put this in the wrong subforum. Sorry :(
    Posted in: AddOn HELP!
  • To post a comment, please or register a new account.