comparison Bar.lua @ 291:54d7865baae9 stable

Merge 1.1 beta 9 to stable
author Flick
date Fri, 01 Jul 2011 14:35:48 -0700
parents d931fa418e17
children 0cb6a9944497
comparison
equal deleted inserted replaced
286:77609bfa804e 291:54d7865baae9
190 f:Show() 190 f:Show()
191 f:EnableMouse(false) 191 f:EnableMouse(false)
192 f:SetClampedToScreen(true) 192 f:SetClampedToScreen(true)
193 LSG:AddFrame(f) 193 LSG:AddFrame(f)
194 194
195 -- secure handlers
196 f:Execute(_reaction_init)
197 f:SetAttribute("_onstate-reaction", _onstate_reaction)
198 f:SetAttribute("_onstate-showgrid", _onstate_showgrid)
199 f:SetAttribute("_onstate-unitexists", _onstate_unitexists)
200 f:SetAttribute("_onclick", _onclick)
201
202 -- secure handler CallMethod()s
203 f.UpdateShowGrid = function() self:UpdateShowGrid() end
204 f.StateRefresh = function() self:RefreshControls() end
205 f.UpdateHiddenLabel = function(f,hidden) self:SetLabelSubtext(hidden and L["Hidden"]) end
206
207 -- Override the default frame accessor to provide strict read-only access
208 function self:GetFrame()
209 return f
210 end
211
212 self:ApplyAnchor()
213 self:SetConfigMode(ReAction:GetConfigMode())
214 self:SetKeybindMode(ReAction:GetKeybindMode())
215
216 if ReAction.LBF then 195 if ReAction.LBF then
217 local g = ReAction.LBF:Group(L["ReAction"], self.name) 196 local g = ReAction.LBF:Group(L["ReAction"], self.name)
218 self.config.ButtonFacade = self.config.ButtonFacade or { 197 self.config.ButtonFacade = self.config.ButtonFacade or {
219 skinID = "Blizzard", 198 skinID = "Blizzard",
220 backdrop = true, 199 backdrop = true,
224 local c = self.config.ButtonFacade 203 local c = self.config.ButtonFacade
225 g:Skin(c.skinID, c.gloss, c.backdrop, c.colors) 204 g:Skin(c.skinID, c.gloss, c.backdrop, c.colors)
226 self.LBFGroup = g 205 self.LBFGroup = g
227 end 206 end
228 207
208 -- secure handlers
209 f:Execute(_reaction_init)
210 f:SetAttribute("_onstate-reaction", _onstate_reaction)
211 f:SetAttribute("_onstate-showgrid", _onstate_showgrid)
212 f:SetAttribute("_onstate-unitexists", _onstate_unitexists)
213 f:SetAttribute("_onclick", _onclick)
214
215 -- secure handler CallMethod()s
216 f.UpdateShowGrid = function() self:UpdateShowGrid() end
217 f.StateRefresh = function() self:RefreshControls() end
218 f.UpdateHiddenLabel = function(f,hidden) self:SetLabelSubtext(hidden and L["Hidden"]) end
219
220 -- Override the default frame accessor to provide strict read-only access
221 function self:GetFrame()
222 return f
223 end
224
225 self:ApplyAnchor()
226 if ReAction:GetConfigMode() then
227 self:SetConfigMode(true)
228 end
229 ReAction.RegisterCallback(self, "OnConfigModeChanged") 229 ReAction.RegisterCallback(self, "OnConfigModeChanged")
230 if ReAction:GetKeybindMode() then
231 self:SetKeybindMode(true)
232 end
230 233
231 buttonClass:SetupBar(self) 234 buttonClass:SetupBar(self)
232 self:ApplyStates() 235 self:ApplyStates()
233 236
234 return self 237 return self