Mercurial > wow > reaction
diff Bar.lua @ 103:890e4c4ab143
- added alpha settings (base and stateful)
- added scale settings (stateful only)
- updated overlay to work with stateful anchor/scale (though when in a state with scale, the button size/spacing can't be manipulated)
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Thu, 06 Nov 2008 01:28:07 +0000 |
parents | 39265b16d208 |
children | b2fb8f7dc780 |
line wrap: on
line diff
--- a/Bar.lua Sun Oct 26 02:26:31 2008 +0000 +++ b/Bar.lua Thu Nov 06 01:28:07 2008 +0000 @@ -38,6 +38,7 @@ f:SetFrameStrata("MEDIUM") f:SetWidth(self.width) f:SetWidth(self.height) + f:SetAlpha(config.alpha or 1.0) f:Show() f:EnableMouse(false) f:SetClampedToScreen(true) @@ -95,11 +96,12 @@ function Bar:SetAnchor(point, frame, relativePoint, x, y) local c = self.config c.point = point or c.point - c.anchor = frame and frame:GetName() or c.anchor + c.anchor = frame or c.anchor c.relpoint = relativePoint or c.relpoint c.x = x or c.x c.y = y or c.y self:ApplyAnchor() + ReAction:RefreshBar(self) end function Bar:GetAnchor() @@ -188,6 +190,16 @@ self:SetLabel(self.name) -- Bar:SetLabel() defined in Overlay.lua end +function Bar:GetAlpha() + return self.config.alpha or 1.0 +end + +function Bar:SetAlpha(value) + self.config.alpha = value + self:GetFrame():SetAlpha(value or 1.0) + ReAction:RefreshBar(self) +end + function Bar:AddButton(idx, button) local f = self:GetFrame()