Mercurial > wow > buffalo2
comparison Modules/BuffFrame.lua @ 80:bb6b532c5d2f
- added "world state" frame for zone-specific currencies and context-based artifact/experience progress
| author | Nenue |
|---|---|
| date | Tue, 11 Oct 2016 08:03:41 -0400 |
| parents | 0784b87f9722 |
| children | 16b300d96724 |
comparison
equal
deleted
inserted
replaced
| 79:0784b87f9722 | 80:bb6b532c5d2f |
|---|---|
| 93 veneer.duration:SetPoint('BOTTOM', veneer, 'BOTTOM', 0, 2) | 93 veneer.duration:SetPoint('BOTTOM', veneer, 'BOTTOM', 0, 2) |
| 94 | 94 |
| 95 veneer.count:SetFontObject(VeneerNumberFont) | 95 veneer.count:SetFontObject(VeneerNumberFont) |
| 96 veneer.count:ClearAllPoints() | 96 veneer.count:ClearAllPoints() |
| 97 veneer.count:SetPoint('TOPRIGHT', veneer, 'TOPRIGHT', -3, -3) | 97 veneer.count:SetPoint('TOPRIGHT', veneer, 'TOPRIGHT', -3, -3) |
| 98 veneer.count:SetJustifyH('RIGHT') | |
| 99 veneer.count:SetSize(30,30) | |
| 98 | 100 |
| 99 veneer.underlay:SetParent(UIParent) | 101 veneer.underlay:SetParent(UIParent) |
| 100 veneer.underlay:SetFrameStrata('BACKGROUND') | 102 veneer.underlay:SetFrameStrata('BACKGROUND') |
| 101 veneer.border:SetColorTexture(0,0,0,1) | 103 veneer.border:SetColorTexture(0,0,0,1) |
| 102 veneer.border:SetPoint('TOPLEFT', veneer, 'TOPLEFT', -BORDER_SIZE_L, BORDER_SIZE_U) | 104 veneer.border:SetPoint('TOPLEFT', veneer, 'TOPLEFT', -BORDER_SIZE_L, BORDER_SIZE_U) |
| 175 print(self:GetName(), 'SetText', text) | 177 print(self:GetName(), 'SetText', text) |
| 176 local n = veneer.count:GetNumPoints() | 178 local n = veneer.count:GetNumPoints() |
| 177 for i = 1, n do | 179 for i = 1, n do |
| 178 print(i, veneer.count:GetPoint(n)) | 180 print(i, veneer.count:GetPoint(n)) |
| 179 end | 181 end |
| 180 veneer.count.isUpdating = true | |
| 181 self:Hide() | |
| 182 veneer.count:Show() | 182 veneer.count:Show() |
| 183 veneer.count:SetText(text) | 183 veneer.count:SetText(text) |
| 184 veneer.count.isUpdating = false | |
| 185 end) | 184 end) |
| 186 hooksecurefunc(count, 'Hide', function(self) | 185 hooksecurefunc(count, 'Hide', function(self) |
| 187 if veneer.count.isUpdating then | 186 if veneer.count.isUpdating then |
| 188 print('|cFFFF4400blocked Hide hook|r') | 187 print('|cFFFF4400blocked Hide hook|r') |
| 189 return | 188 return |
| 340 if buff then | 339 if buff then |
| 341 numBuffs = numBuffs + 1 | 340 numBuffs = numBuffs + 1 |
| 342 buff:ClearAllPoints() | 341 buff:ClearAllPoints() |
| 343 if mod(numBuffs,BUFFS_PER_ROW) == 1 then | 342 if mod(numBuffs,BUFFS_PER_ROW) == 1 then |
| 344 if numBuffs == 1 then | 343 if numBuffs == 1 then |
| 345 if OrderHallCommandBar and OrderHallCommandBar:IsVisible() then | 344 buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y) |
| 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 | |
| 350 plugin.currentTop = buff:GetTop() | 345 plugin.currentTop = buff:GetTop() |
| 351 else | 346 else |
| 352 buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V) | 347 buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V) |
| 353 end | 348 end |
| 354 topBuff = buff | 349 topBuff = buff |
| 471 SkinFrame('TempEnchant'..i) | 466 SkinFrame('TempEnchant'..i) |
| 472 _G['TempEnchant'..i..'Border']:SetVertexColor(0.5,0,1,1) | 467 _G['TempEnchant'..i..'Border']:SetVertexColor(0.5,0,1,1) |
| 473 | 468 |
| 474 end | 469 end |
| 475 | 470 |
| 471 local OrderHallCommandBarMod = CreateFrame('Frame') | |
| 472 function OrderHallCommandBarMod:Refresh() | |
| 473 OrderHallCommandBar.Background:SetAlpha(0.5) | |
| 474 OrderHallCommandBar:ClearAllPoints() | |
| 475 OrderHallCommandBar:SetPoint('TOP') | |
| 476 OrderHallCommandBar:SetWidth(580) | |
| 477 end | |
| 478 function OrderHallCommandBarMod:Setup() | |
| 479 if OrderHallCommandBar then | |
| 480 print('mapping orderhall bar') | |
| 481 hooksecurefunc(OrderHallCommandBar, 'Show', OrderHallCommandBarMod.Refresh) | |
| 482 self:Refresh() | |
| 483 self:UnregisterEvent('ADDON_LOADED') | |
| 484 else | |
| 485 self:RegisterEvent('ADDON_LOADED') | |
| 486 self:SetScript('OnEvent', OrderHallCommandBarMod.Setup) | |
| 487 end | |
| 488 end | |
| 476 plugin.init = function () | 489 plugin.init = function () |
| 477 | |
| 478 | |
| 479 | |
| 480 plugin.db = vn.db[PLUGIN_NAME] | 490 plugin.db = vn.db[PLUGIN_NAME] |
| 481 end | 491 OrderHallCommandBarMod:Setup() |
| 492 end |
