Mercurial > wow > reaction
comparison modules/ReAction_HideBlizzard/ReAction_HideBlizzard.lua @ 60:44649a10378d
Fixed options handling to create a separate table for each bar instead of a shared table with proxy handler.
Also simplified options registration and moved some options around.
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Sat, 10 May 2008 00:08:01 +0000 |
| parents | 8b81d4b3e73d |
| children | da8ba8783924 |
comparison
equal
deleted
inserted
replaced
| 59:7430a8dd4e90 | 60:44649a10378d |
|---|---|
| 27 self.db.RegisterCallback(self,"OnProfileChanged") | 27 self.db.RegisterCallback(self,"OnProfileChanged") |
| 28 self.db.RegisterCallback(self,"OnProfileReset","OnProfileChanged") | 28 self.db.RegisterCallback(self,"OnProfileReset","OnProfileChanged") |
| 29 | 29 |
| 30 self.hiddenFrame = CreateFrame("Frame") | 30 self.hiddenFrame = CreateFrame("Frame") |
| 31 self.hiddenFrame:Hide() | 31 self.hiddenFrame:Hide() |
| 32 | |
| 33 ReAction:RegisterOptions(self, { | |
| 34 hideBlizzard = { | |
| 35 type = "toggle", | |
| 36 handler = self, | |
| 37 name = L["Hide Blizzard Action Bars"], | |
| 38 desc = L["Hide the default main bar and extra action bars"], | |
| 39 get = "IsHidden", | |
| 40 set = function(info,value) self:SetHidden(value) end, | |
| 41 disabled = InCombatLockdown | |
| 42 }, | |
| 43 }, true) -- global | |
| 44 | |
| 32 end | 45 end |
| 33 | 46 |
| 34 function module:OnEnable() | 47 function module:OnEnable() |
| 35 if self.db.profile.hide then | 48 if self.db.profile.hide then |
| 36 self:HideAll(true) | 49 self:HideAll(true) |
| 37 end | 50 end |
| 38 ReAction:RegisterOptions("global", self, { | |
| 39 hideBlizzard = { | |
| 40 type = "toggle", | |
| 41 handler = self, | |
| 42 name = L["Hide Blizzard Action Bars"], | |
| 43 desc = L["Hide the default main bar and extra action bars"], | |
| 44 get = "IsHidden", | |
| 45 set = function(info,value) self:SetHidden(value) end, | |
| 46 disabled = InCombatLockdown | |
| 47 } | |
| 48 }) | |
| 49 | 51 |
| 50 -- reroute blizzard action bar config to ReAction config window | 52 -- reroute blizzard action bar config to ReAction config window |
| 51 InterfaceOptionsActionBarsPanel:HookScript("OnShow", | 53 InterfaceOptionsActionBarsPanel:HookScript("OnShow", |
| 52 function() | 54 function() |
| 53 if module:IsEnabled() and module:IsHidden() then | 55 if module:IsEnabled() and module:IsHidden() then |
