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