+ Reply to Thread
Results 1 to 3 of 3

Thread: New Gadgets element

  1. #1
    Join Date
    Oct 2011

    Post New Gadgets element

    I've made a new element since wtBarwithborders was a bit lacking and wtBar and wtBarHealth just didnt do what I was wanting. So I've created my own and uploading it for anyone to use.
    At this time not gonna host this outside of the rift forums because you do have to modify 1 file within gadgets to make sure it loads.

    aBar adds alot of functionality with borders and adds some overriding checks.

    Download aBar here

    Go to your Addons folder and place the file in

    Then you will need to open RiftAddon.toc within Gadgets/wtLibUnitFrame
    you can open this file in notepad
    Add the following line


    You can put this line at the end or the begining. Just make sure it's with the curly brackets.

    Here is a sample frame I used to test the borders..
    BEWARE Borders will start flashing and changing colors on combat!

    Download my test frame here

    Most of the documentation is with the aBar. Will add more/better documentation if need be.

  2. #2
    Join Date
    Jan 2011


    I'm not quite sure what it does from this description. Any chance of a screenshot?
    Archy Mage, Face, Prime, Primal Rouge, Rogue, Eric, W, @ Laethys --- Nefarious ---

  3. #3
    Join Date
    Oct 2011


    Here is example screenshot of the test frame.
    Sorry for the vagueness but this is more a utility script that adds to the library that gadgets use.
    This really only applies to those who create their own unitframe since this will do nothing otherwise.

    New Gadgets element-example.jpg

    As seen in the image when creating a unitframe each of the borders are there own "frame type" when decalring them. The other borders are the same but are not rendering the mask.

    --- snip ---
                    id="border2", type="aBar", parent="frameBackdrop", layer = 2,
                    attach =
                        {point = "TOPLEFT", element="frameBackdrop", targetPoint = "TOPLEFT"},
                        {point = "BOTTOMRIGHT", element="frameBackdrop", targetPoint = "BOTTOMRIGHT"},
                    binding = "tid",
                    --color = {r=1, g=0, b=0, a=1},
                    border = 
                        visibility = true,
                        color = {r=0, g=0, b=0, a=1},
                        width = 5,
                        XOffset = 10,
                        YOffset = 10,
                        --media ={"shadow"},
    --[[                texture = { texAddon = "Gadgets", 
                                            texFile = { t = "img/wb.png", 
                                                             b = "img/wt.png", 
                                                             l = "img/wr.png", 
                                                             r = "img/wl.png"
    --- snip --
    WT.Unit.CreateVirtualProperty("tid", { "id"}, 
            return 100
    The above code was sniped out of my testframe, you can create a VirtualProperty to use as static binding since aBar just like wtBar, wtBarHealth, all require the use of a binding for the mask(This is a % value of 0 -100, This value will have no effect on the border). Since setting the binding to a static value and not actually rendering the bar only using it for the border should not give any performance issues.

    Hope this clarifies things, below is the documentation I put with aBar

    description = "A bar with a customizable border element.",

    This is required.
    binding = "The property to bind to. Must be a percentage property (0..100)",

    These are optional.
    width = "The width of the bar",
    height = "The height of the bar",
    growthDirection = "String. The direction the bar will grow; Right, left, up or down. Defaults to right.",
    invert = "Bool. Deficit bar growth. Bar will grow on percent loss",
    media = "MediaID for the texture, for use with LibMedia, will override texAddon and texFile",
    texAddon = "The addon ID for the addon containing the bar texture, this need to be declared with texFile.",
    texFile = "The filename of the texture for the bar, this need to be declared with texAddon.",
    colorBinding = "A binding to allow a color to be auto assigned to the bar (e.g. roleColor, callingColor). Will overwrite color.",
    color = "A table containing {r,g,b,a} members (0..1)",
    border = "A table housing all the config options for the border."
    width = "Sets the thickness of the border."
    XOffset = "Sets the X offset of the border from the frame."
    YOffset = "Sets the Y offset of the border from the frame."
    colorBinding = "Sets the binding for the color of border, will overide color. See the other colorBinding for more info."
    color = "Set the Color of the border. See color for more info."
    visibilityBinding = "Sets the binding for the border visible."
    visibility = "Sets the visilability of the border. This is required when using border."
    --NOTE: When making your own textures the top and bottom extend to the outer edge of the side borders.
    media = "A table contain {t, b, l, r} using members found in wtInitMedia file."
    texture = "A table containing {texAddon, texFile}"
    texAddon = "AddonID where files are loaded from"
    texFile = "A table containing {t, b, l, r} each given the location of the texture you wish to load."

+ Reply to Thread


Posting Permissions

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