Mercurial > wow > reaction
changeset 183:1696ff2c80cc
minor library rename/storage/cleanup
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 22 Oct 2010 15:56:08 +0000 |
parents | 55c2fc0c8d55 |
children | 1ee86bbb05a0 |
files | classes/Bar.lua classes/Button.lua classes/Overlay.lua modules/LBF.lua |
diffstat | 4 files changed, 12 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/classes/Bar.lua Thu Oct 21 22:07:11 2010 +0000 +++ b/classes/Bar.lua Fri Oct 22 15:56:08 2010 +0000 @@ -1,13 +1,13 @@ local addonName, addonTable = ... local ReAction = addonTable.ReAction local L = ReAction.L +local LKB = ReAction.LKB local _G = _G local CreateFrame = CreateFrame local floor = math.floor local fmod = math.fmod local format = string.format -local LKB = LibStub("LibKeyBound-1.0") local LSG = LibStub("LibShowGrid-1.0") ---- Secure snippets ----
--- a/classes/Button.lua Thu Oct 21 22:07:11 2010 +0000 +++ b/classes/Button.lua Fri Oct 22 15:56:08 2010 +0000 @@ -6,13 +6,13 @@ local addonName, addonTable = ... local ReAction = addonTable.ReAction local L = ReAction.L +local LKB = ReAction.LKB local _G = _G local CreateFrame = CreateFrame local GetBindingKey = GetBindingKey local format = string.format -- libraries -local KB = LibStub("LibKeyBound-1.0") local LBF = LibStub("LibButtonFacade",true) -- optional -- private @@ -21,7 +21,7 @@ local idPools = { } local function kb_onEnter( frame ) - KB:Set(frame) + LKB:Set(frame) end -- Button class @@ -79,7 +79,7 @@ local clickBinding = format("CLICK %s:LeftButton", name) function f:GetHotkey() - return KB:ToShortKey(GetBindingKey(clickBinding)) + return LKB:ToShortKey(GetBindingKey(clickBinding)) end return self @@ -205,7 +205,7 @@ local border = self.frames.border or _G[format("%sBorder",tostring(self:GetName()))] if border then if mode then - border:SetVertexColor(KB:GetColorKeyBoundMode()) + border:SetVertexColor(LKB:GetColorKeyBoundMode()) border:Show() else border:Hide()
--- a/classes/Overlay.lua Thu Oct 21 22:07:11 2010 +0000 +++ b/classes/Overlay.lua Fri Oct 22 15:56:08 2010 +0000 @@ -1,6 +1,7 @@ local addonName, addonTable = ... local ReAction = addonTable.ReAction local L = ReAction.L +local LKB = ReAction.LKB local CreateFrame = CreateFrame local InCombatLockdown = InCombatLockdown local floor = math.floor @@ -19,8 +20,6 @@ local GameTooltipTextRight2 = GameTooltipTextRight2 local GameTooltipTextRight3 = GameTooltipTextRight3 -local KB = LibStub("LibKeyBound-1.0") - -- -- Wrap some of the bar manipulators to make them state-aware -- @@ -719,8 +718,8 @@ overlay:SetScript("OnShow", overlay.RefreshControls) - KB.RegisterCallback(overlay,"LIBKEYBOUND_ENABLED") - KB.RegisterCallback(overlay,"LIBKEYBOUND_DISABLED") + LKB.RegisterCallback(overlay,"LIBKEYBOUND_ENABLED") + LKB.RegisterCallback(overlay,"LIBKEYBOUND_DISABLED") if ReAction:GetKeybindMode() then overlay:SetFrameLevel(1)
--- a/modules/LBF.lua Thu Oct 21 22:07:11 2010 +0000 +++ b/modules/LBF.lua Fri Oct 22 15:56:08 2010 +0000 @@ -18,15 +18,14 @@ } ) - local LBF = LibStub("LibButtonFacade",true) + self.groups = { } - if not LBF then -- no more initialization + self.LBF = LibStub("LibButtonFacade",true) + + if not self.LBF then -- no more initialization return end - self.LBF = LBF - self.groups = { } - -- override a method of ReAction.Bar -- note that 'self' in this context refers to the bar function ReAction.Bar:SkinButton( button, data )