Mercurial > wow > reaction
view ReAction.lua @ 27:f1e838841ce1
Rearranged file tree, removed unused code for 1.x start-point
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 11 Mar 2008 21:39:34 +0000 |
parents | bf997ea151ca |
children | 21bcaf8215ff |
line wrap: on
line source
--[[ ReAction Add-On main file. Performs add-on and library initialization and setup. --]] ------ LOCALIZATION ---------- local L = AceLibrary("AceLocale-2.2"):new("ReAction") ------ GLOBAL VARIABLES ------ -- 'ReAction' is exported as a global. ReAction = AceLibrary("AceAddon-2.0"):new( "AceModuleCore-2.0", "AceEvent-2.0", "AceDB-2.0" ) -- global variable strings for integration with WoW keybindings dialog (see bindings.xml) BINDING_HEADER_REACTION = L["ReAction"] BINDING_NAME_REACTION_TOGGLELOCK = L["Toggle ReAction Bar Lock"] BINDING_NAME_REACTION_TOGGLEKEYBIND = L["ReAction Keybinding Mode"] ------ CORE ------ local ReAction = ReAction ReAction.revision = tonumber(("$Revision: 1 $"):match("%d+")) ReAction.L = L -- from AceAddon-2.0 function ReAction:OnInitialize() self:RegisterDB("ReActionDB") end -- from AceAddon-2.0 function ReAction:OnEnable() end -- from AceAddon-2.0 function ReAction:OnDisable() end -- from AceDB-2.0 function ReAction:OnProfileEnable() end -- from AceDB-2.0 function ReAction:OnProfileDisable() end -- from AceModuleCore-2.0 function ReAction:OnModuleEnable(module) -- this handles initialization ordering issues with ReAction_Bar local barMod = self:GetModule("Bar") if barMod and module.ApplyToBar then for _, b in pairs(barMod.bars) do if b then module:ApplyToBar(b) end end end end -- from AceModuleCore-2.0 function ReAction:OnModuleDisable(module) local barMod = self:GetModule("Bar") if barMod and module.RemoveFromBar then for _, b in pairs(barMod.bars) do if b then module:RemoveFromBar(b) end end end end --[[ Module API (see bar.lua for usage) module:ApplyToBar(bar) module:RemoveFromBar(bar) module:RefreshBar(bar) module:ApplyConfigMode(mode,listOfBars) module:GetBarNameModifier(bar) module:EraseBarConfig(barName) ]]-- -- debugging ReAction.debug = true if ReAction.debug then ReAction.print = function(msg) DEFAULT_CHAT_FRAME:AddMessage(msg) end --seterrorhandler(ReAction.print) else ReAction.print = function() end end