mirror of
https://github.com/parnic/breakables.git
synced 2025-06-16 17:40:13 -05:00
Add reset button
In case a user has misplaced their Breakable window, this allows it to be reset. It also groups the settings together so that Reset can't be pressed accidentally.
This commit is contained in:
@ -609,6 +609,11 @@ function Breakables:GetOptions()
|
||||
name = L["Welcome"],
|
||||
order = 0,
|
||||
},
|
||||
mainSettings = {
|
||||
name = L["Settings"],
|
||||
type = "group",
|
||||
order = 1,
|
||||
args = {
|
||||
hideAlways = {
|
||||
type = "toggle",
|
||||
name = L["Hide bar"],
|
||||
@ -813,10 +818,30 @@ function Breakables:GetOptions()
|
||||
order = 20,
|
||||
},
|
||||
},
|
||||
},
|
||||
reset = {
|
||||
name = L["Reset"],
|
||||
type = "group",
|
||||
order = 2,
|
||||
args = {
|
||||
resetPlacement = {
|
||||
type = "execute",
|
||||
name = L["Reset placement"],
|
||||
desc = L["Resets where the buttons are placed on the screen to the default location."],
|
||||
func = function()
|
||||
self.settings.buttonFrameLeft = self.defaults.profile.buttonFrameLeft
|
||||
self.settings.buttonFrameTop = self.defaults.profile.buttonFrameTop
|
||||
self:CreateButtonFrame()
|
||||
end,
|
||||
order = 30,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if GetNumEquipmentSets or C_EquipmentSet then
|
||||
opts.args.hideEqManagerItems = {
|
||||
opts.args.mainSettings.args.hideEqManagerItems = {
|
||||
type = "toggle",
|
||||
name = L["Hide Eq. Mgr items"],
|
||||
desc = L["Whether or not to hide items that are part of an equipment set in the game's equipment manager."],
|
||||
@ -838,7 +863,7 @@ function Breakables:GetOptions()
|
||||
end
|
||||
|
||||
if ShouldShowTabardControls then
|
||||
opts.args.hideTabards = {
|
||||
opts.args.mainSettings.args.hideTabards = {
|
||||
type = "toggle",
|
||||
name = L["Hide Tabards"],
|
||||
desc = L["Whether or not to hide tabards from the disenchantable items list."],
|
||||
@ -857,7 +882,7 @@ function Breakables:GetOptions()
|
||||
end
|
||||
|
||||
if not IgnoreEnchantingSkillLevelForDisenchant then
|
||||
opts.args.ignoreEnchantingSkillLevel = {
|
||||
opts.args.mainSettings.args.ignoreEnchantingSkillLevel = {
|
||||
type = "toggle",
|
||||
name = L["Ignore Enchanting skill level"],
|
||||
desc = L["Whether or not items should be shown when Breakables thinks you don't have the appropriate skill level to disenchant it."],
|
||||
@ -876,7 +901,7 @@ function Breakables:GetOptions()
|
||||
end
|
||||
|
||||
if UnitCanPetBattle then
|
||||
opts.args.hideInPetBattle = {
|
||||
opts.args.mainSettings.args.hideInPetBattle = {
|
||||
type = "toggle",
|
||||
name = L["Hide during pet battles"],
|
||||
desc = L["Whether or not to hide the breakables bar when you enter a pet battle."],
|
||||
|
Reference in New Issue
Block a user