-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bindings update work to make things better
- Loading branch information
Tuller
committed
Dec 3, 2010
1 parent
99443b3
commit d020716
Showing
5 changed files
with
50 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
--[[ | |||
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters