Mercurial > wow > buffalo2
changeset 95:43303398d1b9
- Pre-load veneer frames for buffs, set their triggers when the appropriate frames have spawned.
- Add border frames into the PETBATTLES frame lock table so they are hidden properly. Normal triggers don't work here.
author | Nenue |
---|---|
date | Sun, 01 Jan 2017 19:56:35 -0500 |
parents | df10cd0ae949 |
children | bb38bc0e787f |
files | Modules/BuffFrame.lua Modules/BuffFrame.xml |
diffstat | 2 files changed, 18 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Modules/BuffFrame.lua Sun Jan 01 19:31:06 2017 -0500 +++ b/Modules/BuffFrame.lua Sun Jan 01 19:56:35 2017 -0500 @@ -180,10 +180,14 @@ function Facade:OnShow() + print(self:GetName(), 'OnShow') self.underlay:Show() end function Facade:OnHide() + + print(self:GetName(), 'OnHide') self.underlay:Hide() + end function Facade:OnLoad() @@ -239,12 +243,15 @@ (ANCHOR_INSET_DELTA[COUNT_ANCHOR][1] * COUNT_INSET), (ANCHOR_INSET_DELTA[COUNT_ANCHOR][2] * COUNT_INSET)) - self.underlay:SetParent(self) + self.underlay:SetParent(UIParent) + self.underlay:SetFrameStrata('BACKGROUND') self.border:SetColorTexture(0,0,0,1) self.border:SetPoint('TOPLEFT', self, 'TOPLEFT', -BORDER_SIZE_L, BORDER_SIZE_U) self.border:SetPoint('BOTTOMRIGHT', self, 'BOTTOMRIGHT', BORDER_SIZE_R, -BORDER_SIZE_D) self.border:Show() + + FRAMELOCK_STATES.PETBATTLES[self.underlay:GetName()] = "hidden" end function plugin:AcquireConfigButton(name) @@ -300,7 +307,7 @@ function plugin:SetupButton (name) local frame = _G[name] - --print('|cFFFFFF00Adopting', name) + print('|cFFFFFF00Adopting', name) local icon = _G[name .. 'Icon'] local border = _G[name .. 'Border'] @@ -339,17 +346,22 @@ duration:ClearAllPoints() end - hooksecurefunc(frame, "Hide", function(self) + hooksecurefunc(frame, "Hide", function(frame) veneer:Hide() end) - hooksecurefunc(frame, 'Show', function(self) + hooksecurefunc(frame, 'Show', function(frame) veneer:Show() end) + hooksecurefunc(frame, 'SetShown', function(frame, isShown) + veneer:SetShown(isShown) + end) + + veneer:SetParent(UIParent) veneer:SetAllPoints(frame) - veneer:SetFrameStrata('BACKGROUND') + veneer:SetFrameStrata('MEDIUM') end