From 3ee0a4b2d5e87a96cbb13c5301395dd82239c48e Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sun, 25 Nov 2012 11:27:23 +0400 Subject: [PATCH] Buttons added --- ElvUI_SLE/modules/backgrounds/options.lua | 22 +++++++++++++++++----- ElvUI_SLE/modules/datatexts/options.lua | 16 ++++++++++++++-- ElvUI_SLE/modules/marks/options.lua | 18 +++++++++++++++--- ElvUI_SLE/modules/options.lua | 7 +++++++ ElvUI_SLE/modules/unitframes/options.lua | 7 +++++++ 5 files changed, 60 insertions(+), 10 deletions(-) diff --git a/ElvUI_SLE/modules/backgrounds/options.lua b/ElvUI_SLE/modules/backgrounds/options.lua index b818700..40092eb 100644 --- a/ElvUI_SLE/modules/backgrounds/options.lua +++ b/ElvUI_SLE/modules/backgrounds/options.lua @@ -26,8 +26,20 @@ E.Options.args.sle.args.backgrounds = { type = "description", name = L["BG_DESC"] }, - bottom_enabled = { + Reset = { order = 3, + type = 'execute', + name = L["Reset"], + desc = L["Reset these options to defaults"], + func = function() E:GetModule('SLE'):Reset(nil, nil, nil, true) end, + }, + spacerreset = { + order = 4, + type = 'description', + name = "", + }, + bottom_enabled = { + order = 5, type = "toggle", name = L["Bottom BG"], desc = L["Show/Hide this frame."], @@ -35,7 +47,7 @@ E.Options.args.sle.args.backgrounds = { set = function(info, value) E.db.sle.backgrounds.bottom.enabled = value; BG:FramesVisibility() end }, left_enabled = { - order = 4, + order = 6, type = "toggle", name = L["Left BG"], desc = L["Show/Hide this frame."], @@ -43,12 +55,12 @@ E.Options.args.sle.args.backgrounds = { set = function(info, value) E.db.sle.backgrounds.left.enabled = value; BG:FramesVisibility() end }, spacer = { - order = 5, + order = 7, type = "description", name = "", }, right_enabled = { - order = 6, + order = 8, type = "toggle", name = L["Right BG"], desc = L["Show/Hide this frame."], @@ -56,7 +68,7 @@ E.Options.args.sle.args.backgrounds = { set = function(info, value) E.db.sle.backgrounds.right.enabled = value; BG:FramesVisibility() end }, action_enabled = { - order = 7, + order = 9, type = "toggle", name = L["Actionbar BG"], desc = L["Show/Hide this frame."], diff --git a/ElvUI_SLE/modules/datatexts/options.lua b/ElvUI_SLE/modules/datatexts/options.lua index 2f9c41b..c24e570 100644 --- a/ElvUI_SLE/modules/datatexts/options.lua +++ b/ElvUI_SLE/modules/datatexts/options.lua @@ -80,8 +80,20 @@ E.Options.args.sle.args.datatext = { type = "description", name = L["DP_DESC"] }, - dashboard = { + Reset = { order = 3, + type = 'execute', + name = L["Reset"], + desc = L["Reset these options to defaults"], + func = function() E:GetModule('SLE'):Reset(nil, nil, true) end, + }, + spacer = { + order = 4, + type = 'description', + name = "", + }, + dashboard = { + order = 5, type = "toggle", name = L["Dashboard"], desc = L["Show/Hide dashboard."], @@ -89,7 +101,7 @@ E.Options.args.sle.args.datatext = { set = function(info, value) E.db.sle.datatext.dashboard.enable = value; DTP:DashboardShow() end }, width = { - order = 4, + order = 6, type = "range", name = L["Dashboard Panels Width"], desc = L["Sets size of dashboard panels."], diff --git a/ElvUI_SLE/modules/marks/options.lua b/ElvUI_SLE/modules/marks/options.lua index e5faed0..9de7cce 100644 --- a/ElvUI_SLE/modules/marks/options.lua +++ b/ElvUI_SLE/modules/marks/options.lua @@ -20,8 +20,20 @@ E.Options.args.sle.args.marks = { get = function(info) return E.db.sle.marks.enabled end, set = function(info, value) E.db.sle.marks.enabled = value; RM:UpdateVisibility() end }, - showinside = { + Reset = { order = 3, + type = 'execute', + name = L["Reset"], + desc = L["Reset these options to defaults"], + func = function() E:GetModule('SLE'):Reset(nil, nil, nil, nil, true) end, + }, + spacer = { + order = 4, + type = 'description', + name = "", + }, + showinside = { + order = 5, type = "toggle", name = L["Show only in instances"], desc = L["Selecting this option will have the Raid Markers appear only while in a raid or dungeon."], @@ -29,7 +41,7 @@ E.Options.args.sle.args.marks = { set = function(info, value) E.db.sle.marks.showinside = value; RM:UpdateVisibility() end }, size = { - order = 4, + order = 6, type = "range", name = L['Size'], desc = L["Sets size of buttons"], @@ -38,7 +50,7 @@ E.Options.args.sle.args.marks = { set = function(info, value) E.db.sle.marks.size = value; RM:FrameButtonsGrowth(); RM:FrameButtonsSize() end, }, growth = { - order = 5, + order = 7, type = "select", name = L["Direction"], desc = L["Change the direction of buttons growth from the skull marker"], diff --git a/ElvUI_SLE/modules/options.lua b/ElvUI_SLE/modules/options.lua index ee888b5..52507d4 100644 --- a/ElvUI_SLE/modules/options.lua +++ b/ElvUI_SLE/modules/options.lua @@ -21,6 +21,13 @@ E.Options.args.sle = { type = "description", name = L["SLE_DESC"], }, + Reset = { + order = 3, + type = 'execute', + name = L["Reset All"], + desc = L["Reset all Shadow & Light options and movers to their defaults"], + func = function() SLE:Reset(true) end, + }, general = { order = 3, type = "group", diff --git a/ElvUI_SLE/modules/unitframes/options.lua b/ElvUI_SLE/modules/unitframes/options.lua index a7dc246..5f304bd 100644 --- a/ElvUI_SLE/modules/unitframes/options.lua +++ b/ElvUI_SLE/modules/unitframes/options.lua @@ -43,6 +43,13 @@ E.Options.args.sle.args.unitframes = { type = "description", name = L["Options for customizing unit frames. Please don't change these setting when ElvUI's testing frames for bosses and arena teams are shown. That will make them invisible until retoggling."], }, + Reset = { + order = 3, + type = 'execute', + name = L["Reset"], + desc = L["Reset these options to defaults"], + func = function() E:GetModule('SLE'):Reset(nil, true) end, + }, indicators = { order = 5, type = "group", -- 1.7.9.5