-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Circle CI edited this page Aug 30, 2018
·
3 revisions
Adds support for an element that updates and displays the player's reputation and standing with a tracked faction as a StatusBar widget.
-
Repuration
A statusbar which displays the player's current reputation with the tracked faction. -
Reputation.Reward
An optional widget that is visible if the tracked faction has a pending reward.
-
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
) -
tooltipAnchor
- Anchor for the tooltip (default:"ANCHOR_BOTTOMRIGHT"
)
This plug-in adds another color to oUF.colors.reaction
for paragon support, after exalted.
- A default texture will be applied if the element is a StatusBar and doesn't have a texture set.
- A default texture will be applied to the
Reward
sub-widget if it's a Texture and doesn't have a texture set. - Tooltip and mouse interaction options are only enabled if the element is mouse-enabled.
- Remember to set the plug-in as an optional dependency for the layout if not embedding.
-- Position and size
local Reputation = CreateFrame('StatusBar', nil, self)
Reputation:SetPoint('BOTTOM', 0, -50)
Reputation:SetSize(200, 20)
Reputation:EnableMouse(true) -- for tooltip/fading support
-- Position and size the Reward sub-widget
local Reward = Reputation:CreateTexture(nil, 'OVERLAY')
Reward:SetPoint('LEFT')
Reward:SetSize(20, 20)
-- Text display
local Value = Reputation:CreateFontString(nil, 'OVERLAY')
Value:SetAllPoints(Reputation)
Value:SetFontObject(GameFontHighlight)
self:Tag(Value, '[reputation:cur] / [reputation:max]')
-- Add a background
local Background = Reputation:CreateTexture(nil, 'BACKGROUND')
Background:SetAllPoints(Reputation)
Background:SetTexture('Interface\\ChatFrame\\ChatFrameBackground')
-- Register with oUF
self.Reputation = Reputation
self.Reputation.Reward = Reward