BetterStatusBar:GetBackgroundAlpha()
Get the alpha value of the bar's background
Return value
the alpha value [0, 1]
Usage
local alpha = bar:GetBackgroundAlpha()
BetterStatusBar:GetBackgroundColor()
Get the background color of the bar
Return values
- the red value [0, 1]
- the green value [0, 1]
- the blue value [0, 1]
Usage
local r, g, b = bar:GetBackgroundColor()
BetterStatusBar:GetColor()
Get the color of the bar
Return values
- the red value [0, 1]
- the green value [0, 1]
- the blue value [0, 1]
Usage
local r, g, b = bar:GetColor()
BetterStatusBar:GetDeficit()
Get whether the bar is showing its deficit
Return value
whether the bar is showing its deficit
Usage
assert(bar:GetDeficit() == true)
BetterStatusBar:GetExtraAlpha()
Get the alpha value of the bar's extra portion
Return value
the alpha value [0, 1]
Usage
local alpha = bar:SetExtraAlpha()
BetterStatusBar:GetExtraColor()
Get the extra color of the bar
Return values
- the red value [0, 1]
- the green value [0, 1]
- the blue value [0, 1]
Usage
local r, g, b = bar:GetExtraColor()
BetterStatusBar:GetExtraValue()
Return the extra value
Return value
the extra value
Usage
assert(bar:GetExtraValue() == 0.25)
BetterStatusBar:GetIcon()
Return the icon's texture path of the bar
Return value
the texture path or nil
Usage
local icon = bar:GetIcon()
BetterStatusBar:GetIconPosition()
Return whether the icon is on the left or bottom.
If the bar is reversed, then the icon will be on the right or top instead.
Return value
true if the icon is on left or top, otherwise, false.
Usage
local left = bar:GetIconPosition()
BetterStatusBar:GetMinMaxValues()
Return the minimum and maximum values of the bar Since this can't be changed, it will always return 0, 1
Return values
- the minimum value: 0
- the maximum value: 1
Usage
local min, max = bar:GetMinMaxValues()
BetterStatusBar:GetNormalAlpha()
Get the alpha value of the bar
Return value
the alpha value [0, 1]
Usage
local alpha = bar:GetNormalAlpha()
BetterStatusBar:GetOrientation()
Get the current orientation of the bar
Return value
"HORIZONTAL" or "VERTICAL"
Usage
assert(bar:GetOrientation() == "VERTICAL")
BetterStatusBar:GetReverse()
Get whether the bar is currently reversed
Return value
whether the bar is reversed
Usage
assert(bar:GetReverse() == true)
BetterStatusBar:GetTexture()
Get the texture that the bar is using
Return value
the path to the texture
Usage
assert(bar:GetTexture() == [[Interface\TargetingFrame\UI-StatusBar]])
BetterStatusBar:GetValue()
Return the current value
Return value
the value between [0, 1]
Usage
assert(bar:GetValue() == 0.5)
BetterStatusBar:SetBackgroundAlpha(a)
Set the alpha value of the bar's background If you do not specify the alpha, it will be the same as the bar's normal alpha
Parameters
- a
- the alpha value [0, 1] or nil
Usage
bar:SetBackgroundAlpha(0.7)
bar:SetBackgroundAlpha()
BetterStatusBar:SetBackgroundColor(br, bg, bb)
Set the background color of the bar If you don't specify the colors, then it will come up with a good color based on the normal color
Parameters
- br
- the red value [0, 1] or nil
- bg
- the green value [0, 1] or nil
- bb
- the blue value [0, 1] or nil
Usage
bar:SetBackgroundColor(0.5, 0.41, 0)
bar:SetBackgroundColor()
BetterStatusBar:SetColor(r, g, b)
Set the color of the bar If the background color or the extra color is not set, they will take on a similar color to what is specified here
Parameters
- r
- the red value [0, 1]
- g
- the green value [0, 1]
- b
- the blue value [0, 1]
Usage
bar:SetColor(1, 0.82, 0)
BetterStatusBar:SetDeficit(deficit)
Set whether the bar is showing its deficit Showing deficit means that if the value is set to 25%, it'd show 75%
Parameters
- deficit
- whether the bar shows its deficit
Usage
bar:SetDeficit(true)
BetterStatusBar:SetExtraAlpha(a)
Set the alpha value of the bar's extra portion If you do not specify the alpha, it will be the same as the bar's normal alpha
Parameters
- a
- the alpha value [0, 1] or nil
Usage
bar:SetExtraAlpha(0.7)
bar:SetExtraAlpha()
BetterStatusBar:SetExtraColor(er, eg, eb)
Set the extra color of the bar If you don't specify the colors, then it will come up with a good color based on the normal color
Parameters
- er
- the red value [0, 1] or nil
- eg
- the green value [0, 1] or nil
- eb
- the blue value [0, 1] or nil
Usage
bar:SetExtraColor(0.8, 0.6, 0)
bar:SetExtraColor()
BetterStatusBar:SetExtraValue(extraValue)
Set the extra value of a status bar This is useful if you have a base value and an auxillary value, such as experience and rested experience.
Parameters
- extraValue
Usage
bar:SetExtraValue(0.25)
BetterStatusBar:SetIcon(path)
Set the icon's texture path of the bar, or remove it.
Parameters
- path
- the texture path or nil
Usage
bar:SetIcon([[Interface\Icons\Ability_Parry]])
bar:SetIcon(nil)
BetterStatusBar:SetIconPosition(value)
Set whether the icon is on the left or bottom.
If the bar is reversed, then the icon will be on the right or top instead.
Parameters
- value
- a boolean
Usage
bar:SetIconPosition(true)
bar:SetIconPosition(false)
BetterStatusBar:SetNormalAlpha(a)
Set the alpha value of the bar If the background or extra alpha is not set, they will be the same as the alpha specified here
Parameters
- a
- the alpha value [0, 1]
Usage
bar:SetNormalAlpha(0.7)
BetterStatusBar:SetOrientation(orientation)
Set the orientation of the bar
Parameters
- orientation
- "HORIZONTAL" or "VERTICAL"
Usage
bar:SetOrientation("VERTICAL")
BetterStatusBar:SetReverse(reverse)
Set whether the bar is reversed Reversal means the bar goes right-to-left instead of left-to-right
Parameters
- reverse
- whether the bar is reversed
Usage
bar:SetReverse(true)
BetterStatusBar:SetTexture(texture)
Set the texture that the bar is currently using
Parameters
- texture
- the path to the texture
Usage
bar:SetTexture([[Interface\TargetingFrame\UI-StatusBar]])
BetterStatusBar:SetValue(value)
Set the current value
Parameters
- value
- value between [0, 1]
Usage
bar:SetValue(0.5)
PitBull4.Controls.MakeBetterStatusBar(parent)
Make a better status bar than what Blizzard provides
Parameters
- parent
- frame the status bar is parented to
Return value
a BetterStatusBar object
Usage
local bar = PitBull4.Controls.MakeBetterStatusBar(someFrame)
Facts
- Date created
- 03 Jan 2009
- Last updated
- 05 Apr 2009