Thread: Rename keybinds
View Single Post
10-15-20, 12:06 PM   #1
sundertw
A Kobold Labourer
Join Date: Oct 2020
Posts: 1
Rename keybinds

Evening all,

Im trying to get this addon to work again but i have no idea how
Broke since 9.0.1

local function updatehotkey(self, actionButtonType)
local hotkey = _G[self:GetName() .. 'HotKey']
local text = hotkey:GetText()


text = string.gsub(text, '(Mouse Button 4)', 'm4')
text = string.gsub(text, '(Mouse Button 5)', 'm5')
text = string.gsub(text, '(Middle Mouse)', 'mM')
text = string.gsub(text, '(Mouse Wheel Down)', 'DWN')
text = string.gsub(text, '(Mouse Wheel Up)', ' UP')
text = string.gsub(text, '(`)', '-')



hotkey:SetText(text)
end
hooksecurefunc("ActionButton_UpdateHotkeys", updatehotkey)

ActionBarButtonEventsFrame:GetScript("OnEvent")(ActionBarButtonEventsFrame, "UPDATE_BINDINGS")

Hope someone can help me out
THnx
  Reply With Quote