diff --git a/ElvUI_SLE/config/sle_private.lua b/ElvUI_SLE/config/sle_private.lua index 1dadd26..5c2814b 100644 --- a/ElvUI_SLE/config/sle_private.lua +++ b/ElvUI_SLE/config/sle_private.lua @@ -44,11 +44,12 @@ V['sle'] = { ['seedtrash'] = false, }, - ['specswitch'] = { + ['equip'] = { ['enable'] = false, - ['primary'] = "", - ['secondary'] = "", - ['instance'] = "", - ['pvp'] = "", + ['spam'] = false, + ['primary'] = "NONE", + ['secondary'] = "NONE", + ['instance'] = "NONE", + ['pvp'] = "NONE", }, } diff --git a/ElvUI_SLE/modules/equipmanager/options.lua b/ElvUI_SLE/modules/equipmanager/options.lua index 858185c..2f08f87 100644 --- a/ElvUI_SLE/modules/equipmanager/options.lua +++ b/ElvUI_SLE/modules/equipmanager/options.lua @@ -1,16 +1,87 @@ local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore local EM = E:GetModule('EquipManager') + local function configTable() -E.Options.args.sle.args.specswitch = { +E.Options.args.sle.args.equipmanager = { type = 'group', - order = 7, + order = 2, name = L['Equipment manager'], args = { intro = { order = 1, type = 'description', - name = L["FARM_DESC"], + name = L["EM_DESC"], + }, + enable = { + type = "toggle", + order = 2, + name = L['Enable'], + get = function(info) return E.private.sle.equip.enable end, + set = function(info, value) E.private.sle.equip.enable = value; E:StaticPopup_Show("PRIVATE_RL") end + }, + spam = { + type = "toggle", + order = 3, + name = L['Spam Throttling'], + disabled = function() return not E.private.sle.equip.enable end, + get = function(info) return E.private.sle.equip.spam end, + set = function(info, value) E.private.sle.equip.spam = value; EM:SpamThrottle() end + }, + equipsets = { + type = "group", + name = PAPERDOLL_EQUIPMENTMANAGER, + order = 4, + disabled = function() return not E.private.sle.equip.enable end, + guiInline = true, + args = { + intro = { + order = 1, + type = 'description', + name = L["Here you can choose what equipment sets to use in different situations."], + }, + primary = { + order = 2, + type = "select", + name = SPECIALIZATION_PRIMARY, + desc = L["Equip this set when switching to primary talents."], + get = function(info) return E.private.sle.equip.primary end, + set = function(info, value) E.private.sle.equip.primary = value; end, + values = EM.equipSets + }, + secondary = { + order = 3, + type = "select", + name = SPECIALIZATION_SECONDARY, + desc = L["Equip this set when switching to secondary talents."], + get = function(info) return E.private.sle.equip.secondary end, + set = function(info, value) E.private.sle.equip.secondary = value end, + values = EM.equipSets + }, + spacer = { + type = "description", + order = 4, + name = "", + }, + instance = { + order = 5, + type = "select", + name = DUNGEONS, + desc = L["Equip this set after entering dungeons or raids."], + get = function(info) return E.private.sle.equip.instance end, + set = function(info, value) E.private.sle.equip.instance = value end, + values = EM.equipSets + }, + pvp = { + order = 6, + type = "select", + name = PVP, + desc = L["Equip this set after entering battlegrounds or arens."], + get = function(info) return E.private.sle.equip.pvp end, + set = function(info, value) E.private.sle.equip.pvp = value end, + values = EM.equipSets + }, + }, }, }, }