comparison Modules/BuffFrame.lua @ 78:08951972041a

- adjust top anchors for OrderHallCommandBar
author Nenue
date Tue, 30 Aug 2016 03:32:22 -0400
parents d9d16e67725c
children 0784b87f9722
comparison
equal deleted inserted replaced
77:51f248dc0276 78:08951972041a
128 local veneer = GetVeneer(frame) 128 local veneer = GetVeneer(frame)
129 129
130 skinnedFrames[frame] = frame 130 skinnedFrames[frame] = frame
131 frame:SetSize(BUFF_BUTTON_SIZE,BUFF_BUTTON_SIZE) 131 frame:SetSize(BUFF_BUTTON_SIZE,BUFF_BUTTON_SIZE)
132 132
133
133 local offset = BUFF_BUTTON_ZOOM/2 134 local offset = BUFF_BUTTON_ZOOM/2
134 icon:SetTexCoord(offset, 1 - offset, offset, 1 - offset) 135 icon:SetTexCoord(offset, 1 - offset, offset, 1 - offset)
135 if border then 136 if border then
136 border:Hide() 137 border:Hide()
137 hooksecurefunc(border, 'SetVertexColor', function(frame, r, g, b, a) 138 hooksecurefunc(border, 'SetVertexColor', function(frame, r, g, b, a)
326 end 327 end
327 --BuffButton1 328 --BuffButton1
328 --DebuffButton1 329 --DebuffButton1
329 --todo: separate frame groups and iterate over them at appropriate times 330 --todo: separate frame groups and iterate over them at appropriate times
330 if BuffButton1 then 331 if BuffButton1 then
332
331 TempEnchant1:SetPoint('TOPRIGHT', BuffButton1, 'TOPRIGHT', BuffButton1:GetWidth()+4, 0) 333 TempEnchant1:SetPoint('TOPRIGHT', BuffButton1, 'TOPRIGHT', BuffButton1:GetWidth()+4, 0)
332 end 334 end
333 335
334 local lastBuff, topBuff 336 local lastBuff, topBuff
335 local numBuffs = 0 337 local numBuffs = 0
338 if buff then 340 if buff then
339 numBuffs = numBuffs + 1 341 numBuffs = numBuffs + 1
340 buff:ClearAllPoints() 342 buff:ClearAllPoints()
341 if mod(numBuffs,BUFFS_PER_ROW) == 1 then 343 if mod(numBuffs,BUFFS_PER_ROW) == 1 then
342 if numBuffs == 1 then 344 if numBuffs == 1 then
343 buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y) 345 if OrderHallCommandBar and OrderHallCommandBar:IsVisible() then
346 buff:SetPoint('TOPRIGHT', OrderHallCommandBar, 'BOTTOMRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
347 else
348 buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
349 end
344 plugin.currentTop = buff:GetTop() 350 plugin.currentTop = buff:GetTop()
345 else 351 else
346 buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V) 352 buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V)
347 end 353 end
348 topBuff = buff 354 topBuff = buff