Mercurial > wow > reaction
comparison modules/Stance.lua @ 179:bf64e71701e2
Remove support for hunter aspects in stance bar. Remove option to disable DK/paladin auras in stance bar. (drycoded)
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Wed, 20 Oct 2010 23:40:41 +0000 |
parents | df68b5a40490 |
children | e63aefb8a555 |
comparison
equal
deleted
inserted
replaced
178:2e2abdaad2e5 | 179:bf64e71701e2 |
---|---|
28 } | 28 } |
29 ) | 29 ) |
30 | 30 |
31 self.buttons = { } | 31 self.buttons = { } |
32 | 32 |
33 ReAction:RegisterOptions(self, self:GetOptions()) | |
34 | |
35 ReAction.RegisterCallback(self, "OnCreateBar", "OnRefreshBar") | 33 ReAction.RegisterCallback(self, "OnCreateBar", "OnRefreshBar") |
36 ReAction.RegisterCallback(self, "OnDestroyBar") | 34 ReAction.RegisterCallback(self, "OnDestroyBar") |
37 ReAction.RegisterCallback(self, "OnRefreshBar") | 35 ReAction.RegisterCallback(self, "OnRefreshBar") |
38 ReAction.RegisterCallback(self, "OnEraseBar") | 36 ReAction.RegisterCallback(self, "OnEraseBar") |
39 ReAction.RegisterCallback(self, "OnRenameBar") | 37 ReAction.RegisterCallback(self, "OnRenameBar") |
43 ReAction:RegisterBarType(L["Stance Bar"], | 41 ReAction:RegisterBarType(L["Stance Bar"], |
44 { | 42 { |
45 type = moduleID , | 43 type = moduleID , |
46 defaultButtonSize = 36, | 44 defaultButtonSize = 36, |
47 defaultBarRows = 1, | 45 defaultBarRows = 1, |
48 defaultBarCols = 8, | 46 defaultBarCols = 6, |
49 defaultBarSpacing = 3 | 47 defaultBarSpacing = 3 |
50 }) | 48 }) |
51 | 49 |
52 end | 50 end |
53 | 51 |
125 for bar in pairs(self.buttons) do | 123 for bar in pairs(self.buttons) do |
126 self:OnRefreshBar(nil,bar,bar:GetName()) | 124 self:OnRefreshBar(nil,bar,bar:GetName()) |
127 end | 125 end |
128 end | 126 end |
129 | 127 |
130 | |
131 ---- options ---- | |
132 function module:GetOptions() | |
133 return { | |
134 stance = | |
135 { | |
136 name = L["Stance Buttons"], | |
137 type = "group", | |
138 args = { | |
139 showAspects = { | |
140 name = L["Show Aspects"], | |
141 desc = L["Show Hunter aspects as stances"], | |
142 order = 1, | |
143 width = "double", | |
144 type = "toggle", | |
145 set = function(info,value) self.db.profile.showHunterAspects = value; self:RefreshAll() end, | |
146 get = function() return self.db.profile.showHunterAspects end, | |
147 }, | |
148 hideMonkeyHawk = { | |
149 name = L["Auto-hide Monkey/Hawk"], | |
150 desc = L["Hide Aspect of the Monkey and Aspect of the Hawk, only when the hunter knows Aspect of the Dragonhawk"], | |
151 order = 2, | |
152 width = "double", | |
153 type = "toggle", | |
154 set = function(info,value) self.db.profile.hideMonkeyHawk = value; self:RefreshAll() end, | |
155 get = function() return self.db.profile.hideMonkeyHawk end, | |
156 disabled = function() return self.db.profile.showHunterAspects == false end, | |
157 }, | |
158 hidePresences = { | |
159 name = L["Hide Presences"], | |
160 desc = L["Do not show Death Knight Presences as stances"], | |
161 order = 3, | |
162 width = "double", | |
163 type = "toggle", | |
164 set = function(info,value) self.db.profile.hideDKPresences = value; self:RefreshAll() end, | |
165 get = function() return self.db.profile.hideDKPresences end, | |
166 }, | |
167 hideAuras = { | |
168 name = L["Hide Auras"], | |
169 desc = L["Do not show Paladin Auras as stances"], | |
170 order = 4, | |
171 width = "double", | |
172 type = "toggle", | |
173 set = function(info,value) self.db.profile.hidePaladinAuras = value; self:RefreshAll() end, | |
174 get = function() return self.db.profile.hidePaladinAuras end, | |
175 }, | |
176 } | |
177 } | |
178 } | |
179 end |