Mercurial > wow > buffalo2
comparison Modules/BuffFrame.lua @ 70:1b0d7bcd252e
- anchors code
author | Nenue |
---|---|
date | Mon, 22 Aug 2016 20:38:43 -0400 |
parents | ebc18a7412a1 |
children | 6f8661094643 |
comparison
equal
deleted
inserted
replaced
69:ebc18a7412a1 | 70:1b0d7bcd252e |
---|---|
13 | 13 |
14 local BUFF_BUTTON_SIZE = 48 | 14 local BUFF_BUTTON_SIZE = 48 |
15 local BUFF_PROGRESS_SIZE = 4 | 15 local BUFF_PROGRESS_SIZE = 4 |
16 local BUFF_PROGRESS_INSET = 1 | 16 local BUFF_PROGRESS_INSET = 1 |
17 local BUFF_BUTTON_ZOOM = .15 | 17 local BUFF_BUTTON_ZOOM = .15 |
18 local BORDER_SIZE_L = 0 | 18 local BORDER_SIZE_L = 1 |
19 local BORDER_SIZE_R = 0 | 19 local BORDER_SIZE_R = 1 |
20 local BORDER_SIZE_U = 1 | 20 local BORDER_SIZE_U = 4 |
21 local BORDER_SIZE_D = 7 | 21 local BORDER_SIZE_D = 1 |
22 | 22 |
23 | 23 |
24 local plugin = CreateFrame('Frame', 'VeneerBuffFrame', UIParent) | 24 local plugin = CreateFrame('Frame', 'VeneerBuffFrame', UIParent) |
25 local vn, print = LibStub("LibKraken").register(VeneerController, plugin) | 25 local vn, print = LibStub("LibKraken").register(VeneerController, plugin) |
26 local tprint = DEVIAN_WORKSPACE and function(...) _G.print('Timer', ...) end or function() end | 26 local tprint = DEVIAN_WORKSPACE and function(...) _G.print('Timer', ...) end or function() end |
240 local isVisible = self:IsVisible() | 240 local isVisible = self:IsVisible() |
241 if isVisible ~= visibility[self] then | 241 if isVisible ~= visibility[self] then |
242 visibility[self] = isVisible | 242 visibility[self] = isVisible |
243 end | 243 end |
244 veneer:Hide() | 244 veneer:Hide() |
245 veneer.count:Hide() | |
245 underlay:Hide() | 246 underlay:Hide() |
246 end) | 247 end) |
247 | 248 |
248 hooksecurefunc(frame, 'Show', function(self) | 249 hooksecurefunc(frame, 'Show', function(self) |
249 veneer:Show() | 250 veneer:Show() |
251 veneer.count:Show() | |
250 veneer.border:Show() | 252 veneer.border:Show() |
251 underlay:Show() | 253 underlay:Show() |
252 local isVisible = self:IsVisible() | 254 local isVisible = self:IsVisible() |
253 if isVisible ~= visibility[self] then | 255 if isVisible ~= visibility[self] then |
254 print('|cFFFFFF00SHOW|r', self:GetName()) | 256 print('|cFFFFFF00SHOW|r', self:GetName()) |
382 --BuffButton1 | 384 --BuffButton1 |
383 --DebuffButton1 | 385 --DebuffButton1 |
384 --todo: separate frame groups and iterate over them at appropriate times | 386 --todo: separate frame groups and iterate over them at appropriate times |
385 if BuffButton1 then | 387 if BuffButton1 then |
386 TempEnchant1:SetPoint('TOPRIGHT', BuffButton1, 'TOPRIGHT', BuffButton1:GetWidth()+4, 0) | 388 TempEnchant1:SetPoint('TOPRIGHT', BuffButton1, 'TOPRIGHT', BuffButton1:GetWidth()+4, 0) |
389 end | |
390 | |
391 local lastBuff, topBuff | |
392 for i = 1, BUFF_ACTUAL_DISPLAY do | |
393 local buff = _G['BuffButton'..i] | |
394 if buff then | |
395 if i == 1 then | |
396 buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -120, -6) | |
397 topBuff = buff | |
398 elseif mod(i,12) == 1 then | |
399 buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -14) | |
400 topBuff = buff | |
401 else | |
402 buff:SetPoint('TOPRIGHT', lastBuff, 'TOPLEFT') | |
403 end | |
404 lastBuff = buff | |
405 end | |
406 end | |
407 | |
408 for i = 1, DEBUFF_ACTUAL_DISPLAY do | |
409 local debuff = _G['DebuffButton'..i] | |
410 if debuff then | |
411 if i == 1 then | |
412 if topBuff then | |
413 debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -14) | |
414 else | |
415 debuff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -120, -6) | |
416 end | |
417 topBuff = debuff | |
418 elseif mod(i, 12) == 1 then | |
419 debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -14) | |
420 topBuff = debuff | |
421 else | |
422 debuff:SetPoint('TOPRIGHT', lastBuff, 'TOPLEFT') | |
423 end | |
424 lastBuff = debuff | |
425 end | |
387 end | 426 end |
388 | 427 |
389 end | 428 end |
390 | 429 |
391 local AuraButton_UpdateDuration = function(frame, timeLeft) | 430 local AuraButton_UpdateDuration = function(frame, timeLeft) |