Mercurial > wow > reaction
comparison classes/ActionButton.lua @ 140:497936c503a0
Fixed initialization order crashing bars when hideEmpty selected
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Mon, 13 Apr 2009 20:18:11 +0000 |
parents | 8b35239339c5 |
children | 0de0e64a970f |
comparison
equal
deleted
inserted
replaced
139:8b35239339c5 | 140:497936c503a0 |
---|---|
185 f:SetAttribute("bar-idx",idx) | 185 f:SetAttribute("bar-idx",idx) |
186 f:SetAttribute("showgrid-temp",0) | 186 f:SetAttribute("showgrid-temp",0) |
187 f:SetAttribute("showgrid-event",0) | 187 f:SetAttribute("showgrid-event",0) |
188 f:SetAttribute("showgrid",not self:GetBarConfig().hideEmpty) | 188 f:SetAttribute("showgrid",not self:GetBarConfig().hideEmpty) |
189 | 189 |
190 self:Refresh() | |
191 | |
192 -- attach to skinner | |
193 bar:SkinButton(self) | |
194 | |
195 -- initial display | |
196 if ReAction:GetConfigMode() then | |
197 self:ShowGridTemp(true) | |
198 end | |
199 | |
200 -- non secure scripts | 190 -- non secure scripts |
201 f:SetScript("OnEvent", function(frame, ...) self:OnEvent(...) end) | 191 f:SetScript("OnEvent", function(frame, ...) self:OnEvent(...) end) |
202 f:SetScript("OnEnter", function(frame) self:OnEnter() end) | 192 f:SetScript("OnEnter", function(frame) self:OnEnter() end) |
203 f:SetScript("OnLeave", function(frame) self:OnLeave() end) | 193 f:SetScript("OnLeave", function(frame) self:OnLeave() end) |
204 f:SetScript("OnAttributeChanged", function(frame, attr, value) self:OnAttributeChanged(attr, value) end) | 194 f:SetScript("OnAttributeChanged", function(frame, attr, value) self:OnAttributeChanged(attr, value) end) |
218 -- secure handlers | 208 -- secure handlers |
219 f:SetAttribute("_childupdate", _childupdate) | 209 f:SetAttribute("_childupdate", _childupdate) |
220 f:SetAttribute("_childupdate-showgrid",_childupdate_showgrid) | 210 f:SetAttribute("_childupdate-showgrid",_childupdate_showgrid) |
221 barFrame:WrapScript(f, "OnDragStart", _onDragStart) | 211 barFrame:WrapScript(f, "OnDragStart", _onDragStart) |
222 barFrame:WrapScript(f, "OnReceiveDrag", _onReceiveDrag) | 212 barFrame:WrapScript(f, "OnReceiveDrag", _onReceiveDrag) |
213 | |
214 -- attach to skinner | |
215 bar:SkinButton(self) | |
216 | |
217 -- initial display | |
218 if ReAction:GetConfigMode() then | |
219 self:ShowGridTemp(true) | |
220 end | |
221 | |
222 self:Refresh() | |
223 | 223 |
224 return self | 224 return self |
225 end | 225 end |
226 | 226 |
227 function Action:Destroy() | 227 function Action:Destroy() |