Mercurial > wow > reaction
view modules/FuBar_ReActionFu/FuBar_ReActionFu.lua @ 28:21bcaf8215ff
- converted to Ace3
- rearranged file layout
- configGUI menus not working right now
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Mon, 17 Mar 2008 18:24:53 +0000 |
parents | dba04d85c799 |
children | 0d95ce7a9ec2 |
line wrap: on
line source
--[[ FuBar plugin module for ReAction --]] -- local imports local ReAction = ReAction local L = ReAction.L local _G = _G local Tablet = AceLibrary("Tablet-2.0") local Dewdrop = AceLibrary("Dewdrop-2.0") -- module declaration local moduleID = "ReActionFu" local rmodule = ReAction:NewModule( moduleID ) local module = AceLibrary("AceAddon-2.0"):new("FuBarPlugin-2.0") rmodule.fubar = module module.hasIcon = "Interface\\Icons\\INV_Qiraj_JewelEncased" module.hasNoColor = true module.clickableTooltip = false module.cannotDetachTooltip = true module.hideMenuTitle = true module.independentProfile = true module.defaultPosition = "LEFT" module.defaultMinimapPosition = 240 -- degrees function rmodule:OnInitialize() self.db = ReAction.db:RegisterNamespace(moduleID, { profile = { requireFuBar = false } } ) self.db.RegisterCallback(self,"OnProfileChanged") if self.db.profile.requireFuBar == true then self:Hide() end end function rmodule:OnEnable() end function rmodule:OnDisable() end function rmodule:OnProfileChanged() if self.db.profile.requireFuBar == true then module:Hide() else self:Show() end end function module:OnTooltipUpdate() end function module:OnClick(button) end function module:OnMenuRequest( level, value, inTooltip, valueN_1, valueN_2, valueN_3, valueN_4 ) if not self.aceOptionsTable then local opts = { type = "group", handler = ReAction, args = { } } Dewdrop:InjectAceOptionsTable(ReAction,opts) self.aceOptionsTable = opts end for _, m in ReAction:IterateModules() do if m and type(m.GetGlobalOptions) == "function" then for k,v in pairs(m:GetGlobalOptions()) do self.aceOptionsTable.args[k] = v end end end Dewdrop:FeedAceOptionsTable(self.aceOptionsTable) end