# HG changeset patch # User Nenue # Date 1471912723 14400 # Node ID 1b0d7bcd252ea1dc75dd5ce45f1352b0e9bd691a # Parent ebc18a7412a183052c9f79848d6f20c2ac049c7e - anchors code diff -r ebc18a7412a1 -r 1b0d7bcd252e Modules/BuffFrame.lua --- a/Modules/BuffFrame.lua Sun Aug 21 10:28:09 2016 -0400 +++ b/Modules/BuffFrame.lua Mon Aug 22 20:38:43 2016 -0400 @@ -15,10 +15,10 @@ local BUFF_PROGRESS_SIZE = 4 local BUFF_PROGRESS_INSET = 1 local BUFF_BUTTON_ZOOM = .15 -local BORDER_SIZE_L = 0 -local BORDER_SIZE_R = 0 -local BORDER_SIZE_U = 1 -local BORDER_SIZE_D = 7 +local BORDER_SIZE_L = 1 +local BORDER_SIZE_R = 1 +local BORDER_SIZE_U = 4 +local BORDER_SIZE_D = 1 local plugin = CreateFrame('Frame', 'VeneerBuffFrame', UIParent) @@ -242,11 +242,13 @@ visibility[self] = isVisible end veneer:Hide() + veneer.count:Hide() underlay:Hide() end) hooksecurefunc(frame, 'Show', function(self) veneer:Show() + veneer.count:Show() veneer.border:Show() underlay:Show() local isVisible = self:IsVisible() @@ -386,6 +388,43 @@ TempEnchant1:SetPoint('TOPRIGHT', BuffButton1, 'TOPRIGHT', BuffButton1:GetWidth()+4, 0) end + local lastBuff, topBuff + for i = 1, BUFF_ACTUAL_DISPLAY do + local buff = _G['BuffButton'..i] + if buff then + if i == 1 then + buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -120, -6) + topBuff = buff + elseif mod(i,12) == 1 then + buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -14) + topBuff = buff + else + buff:SetPoint('TOPRIGHT', lastBuff, 'TOPLEFT') + end + lastBuff = buff + end + end + + for i = 1, DEBUFF_ACTUAL_DISPLAY do + local debuff = _G['DebuffButton'..i] + if debuff then + if i == 1 then + if topBuff then + debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -14) + else + debuff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -120, -6) + end + topBuff = debuff + elseif mod(i, 12) == 1 then + debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -14) + topBuff = debuff + else + debuff:SetPoint('TOPRIGHT', lastBuff, 'TOPLEFT') + end + lastBuff = debuff + end + end + end local AuraButton_UpdateDuration = function(frame, timeLeft)