comparison Options.lua @ 211:97949dbe987f

Demodularize HideBlizzard - added framework for updating profile database - removed unused profile.defaultBars[]
author Flick <flickerstreak@gmail.com>
date Thu, 18 Nov 2010 12:59:00 -0800
parents 55af1ebbec65
children 8ba8ab8bf6dd
comparison
equal deleted inserted replaced
207:c24ac8ee1e45 211:97949dbe987f
38 }, 38 },
39 hide = { 39 hide = {
40 type = "toggle", 40 type = "toggle",
41 name = L["Hide Blizzard Action Bars"], 41 name = L["Hide Blizzard Action Bars"],
42 desc = L["Hide the default main bar and extra action bars"], 42 desc = L["Hide the default main bar and extra action bars"],
43 handler = self:GetModule("HideBlizzard"), 43 get = "OptionGetHideBlizzardBars",
44 get = "IsHidden", 44 set = "OptionSetHideBlizzardBars",
45 set = "SetHidden", 45 disabled = InCombatLockdown,
46 disabled = "OptionDisabled",
47 width = "full", 46 width = "full",
48 order = 3, 47 order = 3,
49 }, 48 },
50 hideVehicle = { 49 hideVehicle = {
51 type = "toggle", 50 type = "toggle",
52 name = L["Hide Blizzard Vehicle Bar"], 51 name = L["Hide Blizzard Vehicle Bar"],
53 desc = L["Hide the default vechicle action bar"], 52 desc = L["Hide the default vechicle action bar"],
54 handler = self:GetModule("HideBlizzard"), 53 get = "OptionGetHideBlizzardVehicleBar",
55 get = "IsHidden", 54 set = "OptionSetHideBlizzardVehicleBar",
56 set = "SetHidden", 55 disabled = function() return InCombatLockdown() or ReAction:OptionGetHideBlizzardBars() == false end,
57 disabled = "OptionDisabled",
58 width = "full", 56 width = "full",
59 order = 4, 57 order = 4,
60 }, 58 },
61 edit = { 59 edit = {
62 type = "execute", 60 type = "execute",
137 enterClicksFirstButton = true, 135 enterClicksFirstButton = true,
138 timeout = 0, 136 timeout = 0,
139 showAlert = true, 137 showAlert = true,
140 whileDead = true, 138 whileDead = true,
141 } 139 }
140
141 -- reroute blizzard action bar config to ReAction config window
142 InterfaceOptionsActionBarsPanel:HookScript("OnShow",
143 function()
144 if ReAction:OptionGetHideBlizzardBars() then
145 ReAction:ShowOptions()
146 end
147 end )
142 end 148 end
143 149
144 150
145 function ReAction:ShowOptions() 151 function ReAction:ShowOptions()
146 InterfaceOptionsFrame_OpenToCategory(configID) 152 InterfaceOptionsFrame_OpenToCategory(configID)
176 end 182 end
177 183
178 184
179 function ReAction:OptionSetSkipKeybindWarning(info, value) 185 function ReAction:OptionSetSkipKeybindWarning(info, value)
180 self.db.global.skipKeybindWarning = value 186 self.db.global.skipKeybindWarning = value
187 end
188
189
190 function ReAction:OptionSetHideBlizzardBars( info, hide )
191 self.db.profile.options.hideBlizzardBars = hide
192 self:ManageBlizzardBars()
193 end
194
195 function ReAction:OptionGetHideBlizzardBars()
196 return self.db.profile.options.hideBlizzardBars
197 end
198
199 function ReAction:OptionSetHideBlizzardVehicleBar( info, hide )
200 self.db.profile.options.hideBlizzardVehicleBar = hide
201 self:ManageBlizzardBars()
202 end
203
204 function ReAction:OptionGetHideBlizzardVehicleBar()
205 return self.db.profile.options.hideBlizzardVehicleBar
181 end 206 end
182 207
183 208
184 -- export to LDB 209 -- export to LDB
185 local LDB = LibStub:GetLibrary("LibDataBroker-1.1") 210 local LDB = LibStub:GetLibrary("LibDataBroker-1.1")