Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add KeyBound support to the ExtraActionButton! #135

Merged
merged 1 commit into from

2 participants

@Goranaws

Seemed a quick and easy way to make it work. Also, the added function could be used in any Dominos addon.

Goranaws 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.
8e5a800
@Tuller Tuller merged commit 7387903 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 23, 2013
  1. Added key bound support.

    Goranaws authored
    Seemed a quick and easy way to make it work. Also, the added function could be used in any Dominos addon.
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 2 deletions.
  1. +14 −2 extraActionBar.lua
View
16 extraActionBar.lua
@@ -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
Something went wrong with that request. Please try again.