# HG changeset patch # User Nenue # Date 1471996210 14400 # Node ID cd6e78091b04a065f28828c562eab2368cff6145 # Parent 95ed343c3a42efb993b74a4a971bfb427208fb66 - clear points from anything that is xml diff -r 95ed343c3a42 -r cd6e78091b04 Modules/BuffFrame.lua --- a/Modules/BuffFrame.lua Tue Aug 23 16:15:09 2016 -0400 +++ b/Modules/BuffFrame.lua Tue Aug 23 19:50:10 2016 -0400 @@ -75,10 +75,6 @@ local veneer = vn.GetVeneer(frame, 'VeneerBuffTemplate') local id = frame:GetID() - local position = tonumber(name:match("%d")) - if position == 1 then - veneer:Show() - end veneer.progress:SetPoint('BOTTOMLEFT', veneer, 'BOTTOMLEFT', 0, -6) veneer.progress:SetPoint('TOPRIGHT', veneer, 'BOTTOMRIGHT', 0, -1) @@ -89,14 +85,16 @@ veneer.progress.fg:SetPoint('TOP', 0, -BUFF_PROGRESS_INSET) veneer.duration:SetFontObject(VeneerNumberFont) - veneer.duration:SetPoint('TOP', veneer, 'BOTTOM', 0, -2) + veneer.duration:ClearAllPoints() + veneer.duration:SetPoint('BOTTOM', veneer, 'BOTTOM', 0, 2) veneer.count:SetFontObject(VeneerNumberFont) - veneer.count:SetPoint('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', -3, 3) + veneer.count:ClearAllPoints() + veneer.count:SetPoint('TOPRIGHT', veneer, 'TOPRIGHT', -3, -3) veneer.underlay:SetParent(UIParent) veneer.underlay:SetFrameStrata('BACKGROUND') - veneer.border:SetColorTexture(0,0,0,1) + veneer.border:SetColorTexture(0,0,0,0) veneer.border:SetPoint('TOPLEFT', veneer, 'TOPLEFT', -BORDER_SIZE_L, BORDER_SIZE_U) veneer.border:SetPoint('BOTTOMRIGHT', veneer, 'BOTTOMRIGHT', BORDER_SIZE_R, -BORDER_SIZE_D) veneer.border:Show() @@ -161,13 +159,28 @@ if count then count:ClearAllPoints() hooksecurefunc(count, 'SetText', function(self, text) + print(self:GetName(), 'SetText', text) + local n = veneer.count:GetNumPoints() + for i = 1, n do + print(i, veneer.count:GetPoint(n)) + end + veneer.count.isUpdating = true self:Hide() + veneer.count:Show() veneer.count:SetText(text) + veneer.count.isUpdating = false end) - hooksecurefunc(count, 'Hide', function(self, text) + hooksecurefunc(count, 'Hide', function(self) + if veneer.count.isUpdating then + print('|cFFFF4400blocked Hide hook|r') + return + end + + print(self:GetName(), 'Hide') veneer.count:Hide() end) - hooksecurefunc(count, 'Show', function(self, text) + hooksecurefunc(count, 'Show', function(self) + print(self:GetName(), 'Show') veneer.count:Show() end) end @@ -184,13 +197,12 @@ hooksecurefunc(frame, 'Show', function(self) veneer:Show() - veneer.count:Show() - veneer.border:Show() local isVisible = self:IsVisible() if isVisible ~= visibility[self] then print('|cFFFFFF00SHOW|r', self:GetName()) visibility[self] = isVisible end + veneer.underlay:Show() end) anchors[frame] = veneer @@ -211,6 +223,8 @@ if frame.filter == 'HARMFUL' then veneer.border:Show() + else + veneer.border:Hide() end @@ -318,12 +332,16 @@ end local lastBuff, topBuff + local numBuffs = 0 for i = 1, BUFF_ACTUAL_DISPLAY do local buff = _G['BuffButton'..i] if buff then - if mod(i,12) == 1 then - if i == 1 then + numBuffs = numBuffs + 1 + buff:ClearAllPoints() + if mod(numBuffs,12) == 1 then + if numBuffs == 1 then buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -120, -6) + plugin.currentTop = buff:GetTop() else buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V) end @@ -335,17 +353,19 @@ end end + numBuffs = 0 for i = 1, DEBUFF_ACTUAL_DISPLAY do local debuff = _G['DebuffButton'..i] if debuff then - if i == 1 then + numBuffs = numBuffs + 1 + if numBuffs == 1 then if topBuff then debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V) else debuff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -120, -6) end topBuff = debuff - elseif mod(i, 12) == 1 then + elseif mod(numBuffs, 12) == 1 then debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V) topBuff = debuff else @@ -355,6 +375,9 @@ end end + if lastBuff then + plugin.currentBottom = lastBuff:GetBottom() + end end local AuraButton_UpdateDuration = function(frame, timeLeft) @@ -371,9 +394,23 @@ timeString = format('%d', seconds) end + if timeLeft < 10 then + if not veneer.duration.getHuge then + veneer.duration.getHuge = true + veneer.duration:SetFontObject(VeneerNumberFontLarge) + veneer.duration:SetTextColor(1,0,0,1) + end + else + if veneer.duration.getHuge then + veneer.duration.getHuge = nil + veneer.duration:SetFontObject(VeneerNumberFont) + veneer.duration:SetTextColor(1,1,1,1) + end + + end + veneer.duration:SetText(timeString) - veneer.duration:SetVertexColor(1,1,1) end diff -r 95ed343c3a42 -r cd6e78091b04 Veneer.lua --- a/Veneer.lua Tue Aug 23 16:15:09 2016 -0400 +++ b/Veneer.lua Tue Aug 23 19:50:10 2016 -0400 @@ -147,7 +147,7 @@ veneer:SetAllPoints(frame) veneer:SetParent(frame) veneer.label:SetText(name) - veneer.bg:SetColorTexture(1,1,1,0) + veneer.bg:SetColorTexture(0,0,0,0) veneer:Hide() veneer:EnableMouse(false) diff -r 95ed343c3a42 -r cd6e78091b04 Veneer.xml --- a/Veneer.xml Tue Aug 23 16:15:09 2016 -0400 +++ b/Veneer.xml Tue Aug 23 19:50:10 2016 -0400 @@ -87,7 +87,7 @@ - + @@ -115,7 +115,7 @@ - + self.duration = self.progress.duration @@ -126,15 +126,15 @@ - - + + - + @@ -143,8 +143,8 @@ - - + +