comparison modules/ReAction_State/ReAction_State.lua @ 25:bf997ea151ca

yet another attempt to add missing files
author Flick <flickerstreak@gmail.com>
date Fri, 07 Mar 2008 22:19:03 +0000
parents
children f1e838841ce1
comparison
equal deleted inserted replaced
24:9e1984088124 25:bf997ea151ca
1 --[[
2 ReAction bar state machine
3
4 --]]
5
6 -- local imports
7 local ReAction = ReAction
8 local L = ReAction.L
9 local _G = _G
10 local InCombatLockdown = InCombatLockdown
11
12 -- module declaration
13 local moduleID = "State"
14 local module = ReAction:NewModule( moduleID )
15
16 -- module methods
17 function module:OnInitialize()
18 self.db = ReAction:AcquireDBNamespace(moduleID)
19 ReAction:RegisterDefaults(moduleID,"profile",
20 {
21
22 }
23 )
24 end
25
26 function module:OnEnable()
27
28 end
29
30 function module:OnDisable()
31
32 end
33
34 function module:OnProfileEnable()
35
36 end
37
38 function module:OnProfileDisable()
39
40 end
41
42 function module:GetGlobalOptions( configModule )
43
44 end
45
46 function module:GetGlobalBarOptions( configModule )
47
48 end
49
50 function module:GetModuleOptions( configModule )
51
52 end
53
54 function module:GetBarConfigOptions( bar, configModule )
55 if not bar.modConfigOpts[moduleID] then
56 local IsEnabled = function()
57 return false
58 end
59
60 bar.modConfigOpts[moduleID] = {
61 state = {
62 type = "group",
63 name = L["Dynamic Behavior"],
64 desc = L["Dynamic Behavior"],
65 args = {
66 enable = {
67 type = "toggle",
68 name = L["Enable dynamic behavior"],
69 desc = L["Toggles dynamic behavior for this bar"],
70 get = function() return false end,
71 set = function(x) end,
72 disabled = InCombatLockdown,
73 order = 1
74 },
75
76 default = {
77 type = "text",
78 name = L["Default State"],
79 desc = L["State when no conditions apply"],
80 get = function() return false end,
81 set = function(x) end,
82 disabled = IsEnabled,
83 order = 2
84 },
85
86 stealth = {
87 type = "text",
88 name = L["Behavior when Stealthed"],
89 desc = L["Change bar state when stealthed"],
90 get = function() return false end,
91 set = function(x) end,
92 disabled = IsEnabled,
93 validate = { },
94 },
95
96 }
97 }
98 }
99 end
100 return bar.modConfigOpts[moduleID]
101 end
102
103 function module:GetBarMenuOptions( bar, configModule )
104
105 end
106