Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (27 sloc) 0.893 kB
--[[
a frame to update bindings to prevent craziness from happening in crazy town
--]]
local BindingsUpdater = CreateFrame('Frame')
function BindingsUpdater:OnEvent(event, ...)
local a = self[event]
if a then
a(self, event, ...)
end
end
function BindingsUpdater:UPDATE_BINDINGS(event)
self:UpdateFrames()
self:UnregisterEvent('UPDATE_BINDINGS')
end
function BindingsUpdater:UpdateFrames()
for _, frame in Dominos.Frame:GetAll() do
if frame.UPDATE_BINDINGS then
frame:UPDATE_BINDINGS()
end
end
end
hooksecurefunc('SetBinding', BindingsUpdater.UpdateFrames)
hooksecurefunc('SetBindingClick', BindingsUpdater.UpdateFrames)
hooksecurefunc('SetBindingItem', BindingsUpdater.UpdateFrames)
hooksecurefunc('SetBindingMacro', BindingsUpdater.UpdateFrames)
hooksecurefunc('SetBindingSpell', BindingsUpdater.UpdateFrames)
hooksecurefunc('LoadBindings', BindingsUpdater.UpdateFrames)
Jump to Line
Something went wrong with that request. Please try again.