Mercurial > wow > kbf
comparison KBF.lua @ 21:c2ff66c87521
minor lie, slightly better vehicle support
author | Chris Mellon <arkanes@gmai.com> |
---|---|
date | Sun, 17 Oct 2010 17:21:12 -0500 |
parents | 54e30adde56b |
children | 940628cd5bfc |
comparison
equal
deleted
inserted
replaced
20:54e30adde56b | 21:c2ff66c87521 |
---|---|
248 return timetext | 248 return timetext |
249 end | 249 end |
250 | 250 |
251 function KBF:OnEnter(button, motion) | 251 function KBF:OnEnter(button, motion) |
252 -- this is for the secure buttons, so use the attributes | 252 -- this is for the secure buttons, so use the attributes |
253 -- I'd like a better place to position this but it's funky for right now, handle it later | 253 local unit = SecureButton_GetModifiedUnit(button) or button.unit-- will perform vehicle toggle |
254 local unit = button.unit or button:GetAttribute("unit") | 254 local filter = button:GetAttribute("filter") or button.filter |
255 local filter = button.filter or button:GetAttribute("filter") | |
256 local index = button:GetAttribute("index") or button.index | 255 local index = button:GetAttribute("index") or button.index |
257 if unit and filter and index then | 256 if unit and filter and index then |
257 -- I'd like a better place to position this but it's funky for right now, handle it later | |
258 GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT"); | 258 GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT"); |
259 GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2); | 259 GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2); |
260 GameTooltip:SetUnitAura(unit, index, filter); | 260 GameTooltip:SetUnitAura(unit, index, filter); |
261 return | 261 return |
262 end | 262 end |
263 local slot = button:GetAttribute("target-slot") -- temp enchant | 263 local slot = button:GetAttribute("target-slot") -- temp enchant |
264 GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT"); | 264 GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT"); |
265 GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2); | 265 GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2); |
266 GameTooltip:SetInventoryItem("player", slot) | 266 GameTooltip:SetInventoryItem(unit, slot) |
267 end | 267 end |
268 | 268 |
269 -- creates a icon + statusbar bar | 269 -- creates a icon + statusbar bar |
270 function kbf:ConstructBar(frame, r, g, b) | 270 function kbf:ConstructBar(frame, r, g, b) |
271 local texture = "Interface\\TargetingFrame\\UI-StatusBar" | 271 local texture = "Interface\\TargetingFrame\\UI-StatusBar" |