annotate modules/FuBar_ReActionFu/FuBar_ReActionFu.lua @ 26:261f0f6bd68a

rearranged file include XMLs
author Flick <flickerstreak@gmail.com>
date Fri, 07 Mar 2008 22:20:30 +0000
parents dba04d85c799
children 21bcaf8215ff
rev   line source
flickerstreak@23 1 --[[
flickerstreak@23 2 FuBar plugin module for ReAction
flickerstreak@23 3
flickerstreak@23 4 --]]
flickerstreak@23 5
flickerstreak@23 6 -- local imports
flickerstreak@23 7 local ReAction = ReAction
flickerstreak@23 8 local L = ReAction.L
flickerstreak@23 9 local _G = _G
flickerstreak@23 10 local Tablet = AceLibrary("Tablet-2.0")
flickerstreak@23 11 local Dewdrop = AceLibrary("Dewdrop-2.0")
flickerstreak@23 12
flickerstreak@23 13 -- module declaration
flickerstreak@23 14 local moduleID = "ReActionFu"
flickerstreak@23 15 local module = ReAction:NewModule( moduleID,
flickerstreak@23 16 "FuBarPlugin-2.0"
flickerstreak@23 17 )
flickerstreak@23 18
flickerstreak@23 19 module.hasIcon = "Interface\\Icons\\INV_Qiraj_JewelEncased"
flickerstreak@23 20 module.hasNoColor = true
flickerstreak@23 21 module.clickableTooltip = false
flickerstreak@23 22 module.cannotDetachTooltip = true
flickerstreak@23 23 module.hideMenuTitle = true
flickerstreak@23 24 module.independentProfile = true
flickerstreak@23 25 module.defaultPosition = "LEFT"
flickerstreak@23 26 module.defaultMinimapPosition = 240 -- degrees
flickerstreak@23 27
flickerstreak@23 28 function module:OnInitialize()
flickerstreak@23 29 self.db = ReAction:AcquireDBNamespace(moduleID)
flickerstreak@23 30 ReAction:RegisterDefaults(moduleID,"profile",
flickerstreak@23 31 {
flickerstreak@23 32 requireFuBar = false
flickerstreak@23 33 }
flickerstreak@23 34 )
flickerstreak@23 35
flickerstreak@23 36 if self.db.profile.requireFuBar == true then
flickerstreak@23 37 self:Hide()
flickerstreak@23 38 end
flickerstreak@23 39 end
flickerstreak@23 40
flickerstreak@23 41 function module:OnEnable()
flickerstreak@23 42
flickerstreak@23 43 end
flickerstreak@23 44
flickerstreak@23 45 function module:OnDisable()
flickerstreak@23 46
flickerstreak@23 47 end
flickerstreak@23 48
flickerstreak@23 49 function module:OnProfileEnable()
flickerstreak@23 50 if self.db.profile.requireFuBar == true then
flickerstreak@23 51 self:Hide()
flickerstreak@23 52 else
flickerstreak@23 53 self:Show()
flickerstreak@23 54 end
flickerstreak@23 55 end
flickerstreak@23 56
flickerstreak@23 57 function module:OnProfileDisable()
flickerstreak@23 58
flickerstreak@23 59 end
flickerstreak@23 60
flickerstreak@23 61 function module:OnTooltipUpdate()
flickerstreak@23 62
flickerstreak@23 63 end
flickerstreak@23 64
flickerstreak@23 65 function module:OnClick(button)
flickerstreak@23 66
flickerstreak@23 67 end
flickerstreak@23 68
flickerstreak@23 69 function module:OnMenuRequest( level, value, inTooltip, valueN_1, valueN_2, valueN_3, valueN_4 )
flickerstreak@23 70 if not self.aceOptionsTable then
flickerstreak@23 71 local opts = {
flickerstreak@23 72 type = "group",
flickerstreak@23 73 handler = ReAction,
flickerstreak@23 74 args = {
flickerstreak@23 75 }
flickerstreak@23 76 }
flickerstreak@23 77 Dewdrop:InjectAceOptionsTable(ReAction,opts)
flickerstreak@23 78 self.aceOptionsTable = opts
flickerstreak@23 79 end
flickerstreak@23 80 for _, m in ReAction:IterateModulesWithMethod("GetGlobalOptions") do
flickerstreak@23 81 for k,v in pairs(m:GetGlobalOptions()) do
flickerstreak@23 82 self.aceOptionsTable.args[k] = v
flickerstreak@23 83 end
flickerstreak@23 84 end
flickerstreak@23 85 Dewdrop:FeedAceOptionsTable(self.aceOptionsTable)
flickerstreak@23 86 end
flickerstreak@23 87