changeset 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
files KBF.lua KBF.xml
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/KBF.lua	Sun Oct 17 08:45:13 2010 -0500
+++ b/KBF.lua	Sun Oct 17 17:21:12 2010 -0500
@@ -250,11 +250,11 @@
 
 function KBF:OnEnter(button, motion)
     -- this is for the secure buttons, so use the attributes
-    -- I'd like a better place to position this but it's funky for right now, handle it later
-    local unit = button.unit or button:GetAttribute("unit")
-    local filter = button.filter or button:GetAttribute("filter")
+    local unit = SecureButton_GetModifiedUnit(button) or button.unit-- will perform vehicle toggle
+    local filter = button:GetAttribute("filter") or button.filter 
     local index = button:GetAttribute("index") or button.index
     if unit and filter and index then
+        -- I'd like a better place to position this but it's funky for right now, handle it later
         GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT");
         GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2);
         GameTooltip:SetUnitAura(unit, index, filter);
@@ -263,7 +263,7 @@
     local slot = button:GetAttribute("target-slot") -- temp enchant
     GameTooltip:SetOwner(button, "ANCHOR_BOTTOMLEFT");
     GameTooltip:SetFrameLevel(button:GetFrameLevel() + 2);
-    GameTooltip:SetInventoryItem("player", slot)
+    GameTooltip:SetInventoryItem(unit, slot)
 end
 
 -- creates a icon + statusbar bar
--- a/KBF.xml	Sun Oct 17 08:45:13 2010 -0500
+++ b/KBF.xml	Sun Oct 17 17:21:12 2010 -0500
@@ -4,7 +4,7 @@
     <Button name="KBFSecureUnitAuraTemplate" inherits="SecureActionButtonTemplate" virtual="true">
         <Attributes>
 			<Attribute name="type" value="cancelaura" />
-			<Attribute name="allowToggleVehicle" value="true" />
+			<Attribute name="toggleForVehicle" value="true" />
 			<Attribute name="unit" value="player" />
 		</Attributes>
 		<Size>