Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-18-19, 08:25 AM   #1
DashingSplash
A Murloc Raider
Join Date: Jun 2019
Posts: 7
Using GetBindingKey() on MultiActionBars

Hi,

I am currently having trouble with GetBindingKey() when trying to fetch the keybinds of the Multi Action Bars. Below is a sample code of my current AddOn.

Code:
local dashingDismount = CreateFrame("Frame")

function dashingBindings()
	local buttonName
	local actionType, id, _, actionName
	local key1, key2
	local ActionBars = {"Action","MultiBarBottomLeft","MultiBarBottomRight","MultiBarLeft","MultiBarRight"}
	
	for bar = 1, #ActionBars do
		for i = 1, 12 do
			buttonName = ActionBars[bar] .. "Button" .. i
						
			actionType, id, _ = GetActionInfo(_G[buttonName].action)
			actionName = GetSpellInfo(id)

			print(buttonName)

			key1, key2 = GetBindingKey(buttonName)

		    if key1 ~= nil then
				print(key1)
		    end
		    if key2 ~= nil then
				print(key2)
		    end
		end
	end
end

local function dashingInit(self, event, ...)
	dashingBindings()
end

dashingDismount:RegisterEvent("PLAYER_LOGIN")
dashingDismount:SetScript("OnEvent", dashingInit)
The code only manages to print(key1) for ActionButton1 to ActionButton12. MultiBarBottomLeftButton1 and beyond do not get to the print() at all. Am I missing something obvious?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Using GetBindingKey() on MultiActionBars

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off