Mercurial > wow > kbf
comparison KBF.lua @ 12:5f07c89cb6af
tooltips for buffs
| author | Chris Mellon <arkanes@gmai.com> |
|---|---|
| date | Wed, 13 Oct 2010 11:11:13 -0500 |
| parents | 76650e326a57 |
| children | be6c10697c59 |
comparison
equal
deleted
inserted
replaced
| 11:76650e326a57 | 12:5f07c89cb6af |
|---|---|
| 45 buffCount = buffCount + 1 | 45 buffCount = buffCount + 1 |
| 46 if self.dirty then | 46 if self.dirty then |
| 47 if self:BindBarToBuff(frame, unit) then break end | 47 if self:BindBarToBuff(frame, unit) then break end |
| 48 end | 48 end |
| 49 self:UpdateBarExpirationTime(frame) | 49 self:UpdateBarExpirationTime(frame) |
| 50 -- Don't forget to refresh shown tooltips | |
| 51 if ( GameTooltip:IsOwned(frame) ) then | |
| 52 GameTooltip:SetUnitAura(unit, idx, filter); | |
| 53 end | |
| 50 end | 54 end |
| 51 -- temporary enchants | 55 -- temporary enchants |
| 52 -- TODO: The blizz secure aura header binds both temp enchants | 56 -- TODO: The blizz secure aura header binds both temp enchants |
| 53 -- to the main hand. No support for cancelling weapon enchants | 57 -- to the main hand. No support for cancelling weapon enchants |
| 54 -- until this gets fixed up | 58 -- until this gets fixed up |
| 151 timetext = string.format("%1.1f", s) | 155 timetext = string.format("%1.1f", s) |
| 152 else | 156 else |
| 153 timetext = string.format("%.0f", floor(s)) | 157 timetext = string.format("%.0f", floor(s)) |
| 154 end | 158 end |
| 155 return timetext | 159 return timetext |
| 160 end | |
| 161 | |
| 162 function KBF:OnEnter(button, motion) | |
| 163 -- this is for the secure buttons, so use the attributes | |
| 164 -- I'd like a better place to position this but it's funky for right now, handle it later | |
| 165 GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT"); | |
| 166 GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2); | |
| 167 GameTooltip:SetUnitAura(button:GetAttribute("unit"), button:GetID(), button:GetAttribute("filter")); | |
| 168 | |
| 156 end | 169 end |
| 157 | 170 |
| 158 -- creates a icon + statusbar bar | 171 -- creates a icon + statusbar bar |
| 159 function kbf:ConstructBar(frame, r, g, b) | 172 function kbf:ConstructBar(frame, r, g, b) |
| 160 local texture = "Interface\\TargetingFrame\\UI-StatusBar" | 173 local texture = "Interface\\TargetingFrame\\UI-StatusBar" |
