Mercurial > wow > buffalo2
comparison BuffFrame/BuffButton.lua @ 59:07ef62fe201f
Re-write of BuffFrame module:
- uses secure hooks on blizzard BuffFrame.lua functions to determine needed action
- make use of built-in table behavior to reduce unnecessary frame updates
| author | Nenue |
|---|---|
| date | Thu, 28 Jul 2016 18:27:56 -0400 |
| parents | d7655c4e6e06 |
| children |
comparison
equal
deleted
inserted
replaced
| 58:f253baf6022d | 59:07ef62fe201f |
|---|---|
| 129 bottom_extent = max(bottom_extent, guide:GetHeight()) | 129 bottom_extent = max(bottom_extent, guide:GetHeight()) |
| 130 | 130 |
| 131 guide.info = {} -- UnitAura cache | 131 guide.info = {} -- UnitAura cache |
| 132 | 132 |
| 133 if i == consolidatedPosition then | 133 if i == consolidatedPosition then |
| 134 guide.legend:SetTexture(1,1,0,0.5) | 134 guide.legend:SetColorTexture(1,1,0,0.5) |
| 135 else | 135 else |
| 136 guide.legend:SetTexture(legend.r, legend.g, legend.b, legend.a) | 136 guide.legend:SetColorTexture(legend.r, legend.g, legend.b, legend.a) |
| 137 end | 137 end |
| 138 | 138 |
| 139 guide.idText:SetText(i) -- needs to reflect the current position | 139 guide.idText:SetText(i) -- needs to reflect the current position |
| 140 | 140 |
| 141 guide:ClearAllPoints() | 141 guide:ClearAllPoints() |
| 272 deco:Show() | 272 deco:Show() |
| 273 deco:SetAlpha(1) | 273 deco:SetAlpha(1) |
| 274 end | 274 end |
| 275 | 275 |
| 276 if debuffBorder then | 276 if debuffBorder then |
| 277 deco.background:SetTexture(debuffBorder:GetVertexColor()) | 277 deco.background:SetColorTexture(debuffBorder:GetVertexColor()) |
| 278 debuffBorder:Hide() | 278 debuffBorder:Hide() |
| 279 else | 279 else |
| 280 if guide.info.caster == 'player' then | 280 if guide.info.caster == 'player' then |
| 281 print(guide.info.caster) | 281 print(guide.info.caster) |
| 282 deco.background:SetTexture(unpack(c.PlayerColor)) | 282 deco.background:SetColorTexture(unpack(c.PlayerColor)) |
| 283 elseif buffData.isBossDebuff then | 283 elseif buffData.isBossDebuff then |
| 284 print(guide.info.isBossDebuff) | 284 print(guide.info.isBossDebuff) |
| 285 deco.background:SetTexture(unpack(c.BossColor)) | 285 deco.background:SetColorTexture(unpack(c.BossColor)) |
| 286 else | 286 else |
| 287 print(guide.info.caster) | 287 print(guide.info.caster) |
| 288 deco.background:SetTexture(unpack(c.Color)) | 288 deco.background:SetColorTexture(unpack(c.Color)) |
| 289 end | 289 end |
| 290 end | 290 end |
| 291 | 291 |
| 292 | 292 |
| 293 buffDuration:ClearAllPoints() | 293 buffDuration:ClearAllPoints() |
