-
-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Circle CI edited this page Aug 30, 2018
·
3 revisions
Adds support for an element that updates and displays the player's experience or honor as a StatusBar widget.
-
ExperienceA statusbar which displays the player's current experience or honor until the next level.
Has drop-in support forAnimatedStatusBarTemplate. -
Experience.RestedAn optional background-layered statusbar which displays the exhaustion the player current has.
Must be parented to theExperiencewidget if used.
-
inAlpha- Alpha used when the mouse is over the element (default:1) -
outAlpha- Alpha used when the mouse is outside of the element (default:1) -
restedAlpha- Alpha used for theRestedsub-widget (default:0.15) -
tooltipAnchor- Anchor for the tooltip (default:"ANCHOR_BOTTOMRIGHT")
This plug-in adds colors for experience (normal and rested) as well as honor.
Accessible through oUF.colors.experience and oUF.colors.honor.
- A default texture will be applied if the widget(s) is a StatusBar and doesn't have a texture set.
- Tooltip and mouse interaction options are only enabled if the element is mouse-enabled.
- Backgrounds/backdrops must be parented to the
Restedsub-widget if used. - Toggling honor-tracking is done through the PvP UI
- Remember to set the plug-in as an optional dependency for the layout if not embedding.
-- Position and size
local Experience = CreateFrame('StatusBar', nil, self)
Experience:SetPoint('BOTTOM', 0, -50)
Experience:SetSize(200, 20)
Experience:EnableMouse(true) -- for tooltip/fading support
-- Position and size the Rested sub-widget
local Rested = CreateFrame('StatusBar', nil, Experience)
Rested:SetAllPoints(Experience)
-- Text display
local Value = Experience:CreateFontString(nil, 'OVERLAY')
Value:SetAllPoints(Experience)
Value:SetFontObject(GameFontHighlight)
self:Tag(Value, '[experience:cur] / [experience:max]')
-- Add a background
local Background = Rested:CreateTexture(nil, 'BACKGROUND')
Background:SetAllPoints(Experience)
Background:SetTexture('Interface\\ChatFrame\\ChatFrameBackground')
-- Register with oUF
self.Experience = Experience
self.Experience.Rested = Rested