1. #1

    WeakAura Custom Progress Bar

    Hey guys

    I wanna have a progress bar (castbar) but instead of the current time / total time I want it to show the percentage
    for example 0.7 / 1.2 would just show 58%

    by default i want it to be white lets say, but after 80% i want it to become green

    I assume this would be achieved by making a custom text function and a custom condition function, but I have no idea how to write these
    Can someone help me please

  2. #2
    You did or not ?

  3. #3
    Quote Originally Posted by nethical View Post
    You did or not ?
    kinda, found this post and it helped me massively
    Quote Originally Posted by latreese View Post
    WA Custom Text functions are passed the following parameters:
    Code:
    customTextFunc(region.expirationTime, region.duration, values.progress, values.duration, values.name, values.icon, values.stacks)
    So, in your Custom Text function, you'd want to do something like
    Code:
    function(expirationTime)
        local remaining = expirationTime - GetTime()
        local minutes = math.floor(remaining / 60)
        return (minutes > 0) and (minutes .. "m") or remaining
    end


    the whole problem was is just i didnt know what was being passed as paramaters and how should it look
    i mean this
    Code:
    customTextFunc(region.expirationTime, region.duration, values.progress, values.duration, values.name, values.icon, values.stacks)
    while this was enough for me, and i succesfully did the custom text function, i still dont know how would the custom condition function look, like what gets passed there, i dont really need it anymore as i change colors in "animation" rn, i still would like to know for the future how to do it via condition programmatically, ive tried looking for these function "prototypes" on github but couldnt find

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •