Mercurial > wow > reaction
diff modules/ReAction_HideBlizzard/ReAction_HideBlizzard.lua @ 30:0d95ce7a9ec2
- added Ace3 externs
- converted ReAction_ConfigUI to use blizzard interface addons panel via AceConfigDialog-3.0
- partially converted FuBar module to LibRock, deprecated it (going to remove it entirely later)
- cleaned up a couple other tidbits
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Wed, 02 Apr 2008 23:31:13 +0000 |
parents | 21bcaf8215ff |
children | 27dde2743f43 |
line wrap: on
line diff
--- a/modules/ReAction_HideBlizzard/ReAction_HideBlizzard.lua Wed Apr 02 18:22:02 2008 +0000 +++ b/modules/ReAction_HideBlizzard/ReAction_HideBlizzard.lua Wed Apr 02 23:31:13 2008 +0000 @@ -29,33 +29,23 @@ self.hiddenFrame = CreateFrame("Frame") self.hiddenFrame:Hide() - - -- disable the buttons to hide/show the blizzard multiaction bars - -- see UIOptionsFrame.lua and .xml - -- This is called every time the options panel is shown, after it is set up - local disabledOptionsButtons = { - _G["UIOptionsFrameCheckButton"..UIOptionsFrameCheckButtons["SHOW_MULTIBAR1_TEXT"].index], - _G["UIOptionsFrameCheckButton"..UIOptionsFrameCheckButtons["SHOW_MULTIBAR2_TEXT"].index], - _G["UIOptionsFrameCheckButton"..UIOptionsFrameCheckButtons["SHOW_MULTIBAR3_TEXT"].index], - _G["UIOptionsFrameCheckButton"..UIOptionsFrameCheckButtons["SHOW_MULTIBAR4_TEXT"].index], - _G["UIOptionsFrameCheckButton"..UIOptionsFrameCheckButtons["ALWAYS_SHOW_MULTIBARS_TEXT"].index], - } - hooksecurefunc("UIOptionsFrame_Load", - function() - if self.db.profile.hide then - for _, f in pairs(disabledOptionsButtons) do - f.disabled = true - OptionsFrame_DisableCheckBox(f) - end - end - end - ) end function module:OnEnable() if self.db.profile.hide then self:HideAll(true) end + ReAction:RegisterOptions("global", self, { + hideBlizzard = { + type = "toggle", + handler = self, + name = L["Hide Blizzard Action Bars"], + desc = L["Hide the default main bar and extra action bars"], + get = "IsHidden", + set = function(info,value) self:SetHidden(value) end, + disabled = InCombatLockdown + } + }) end function module:OnDisable() @@ -143,19 +133,3 @@ end end -function module:GetGlobalOptions() - if self.globalOptions == nil then - self.globalOptions = { - hideBlizzard = { - type = "toggle", - handler = self, - name = L["Hide Default Action Bars"], - desc = L["Hide the default main bar and extra action bars"], - get = "IsHidden", - set = "SetHidden", - disabled = function() return InCombatLockdown() end - } - } - end - return self.globalOptions -end