Permalink
Browse files

Added key bound support.

Seemed a quick and easy way to make it work. Also, the added function could be used in any Dominos addon.
  • Loading branch information...
1 parent 555501e commit 8e5a800294d05ec790a3450d7a608447a679ecfb @Goranaws committed Jan 23, 2013
Showing with 14 additions and 2 deletions.
  1. +14 −2 extraActionBar.lua
View
@@ -29,13 +29,25 @@ function ExtraBar:NumButtons(f)
return 1
end
+--KeyBound Support!
+local KeyBound = LibStub('LibKeyBound-1.0')
+function ExtraBar:RetroFit_BindableButton(button)
+ for i, data in pairs(Dominos.BindableButton) do
+ if (type(data) ~= "userdata") then
+ button[i] = data
+ end
+ end
+ button:UnregisterEvent("UPDATE_EXTRA_ACTIONBAR");
+ button:HookScript("OnEnter", function(self) KeyBound:Set(self) end)
+end
+
function ExtraBar:AddButton(i)
local b = self:GetExtraButton(i)
if b then
b:SetAttribute('showgrid', 1)
b:SetParent(self.header)
b:Show()
-
+ self:RetroFit_BindableButton(b)
self.buttons[i] = b
end
end
@@ -52,4 +64,4 @@ end
function ExtraBar:GetExtraButton(index)
return _G['ExtraActionButton' .. index]
-end
+end

0 comments on commit 8e5a800

Please sign in to comment.