diff --git a/ElvUI_SLE/core/install.lua b/ElvUI_SLE/core/install.lua index 77d1a7f..c12f933 100644 --- a/ElvUI_SLE/core/install.lua +++ b/ElvUI_SLE/core/install.lua @@ -621,7 +621,6 @@ function PI:DarthAddons() if SkadaDB and T.IsAddOnLoaded("Skada") then local damage, healing = locale == "ruRU" and "Нанесённый урон" or "Damage", locale == "ruRU" and "Исцеление" or "Healing" local profileName = "Darth "..(locale == "ruRU" and "Ru" or "Eng") - if not SkadaDB["profiles"][profileName] then SkadaDB["profiles"][profileName] = { ["icon"] = { ["hide"] = true, @@ -732,78 +731,75 @@ function PI:DarthAddons() }, -- [2] }, } - end Skada.db:SetProfile(profileName) end if xCTSavedDB and T.IsAddOnLoaded("xCT+") then - if not xCTSavedDB["profiles"]["S&L Darth"] then - xCTSavedDB["profiles"]["S&L Darth"] = { - ["frames"] = { - ["general"] = { - ["fontOutline"] = "2OUTLINE", - ["font"] = "PT Sans Narrow", - ["enabledFrame"] = false, - }, - ["power"] = { - ["fontOutline"] = "2OUTLINE", - ["font"] = "PT Sans Narrow", - ["enabledFrame"] = false, - }, - ["healing"] = { - ["enableRealmNames"] = false, - ["enableClassNames"] = false, - ["fontOutline"] = "2OUTLINE", - ["enableOverHeal"] = false, - ["Width"] = 128, - ["Y"] = 63, - ["X"] = -209, - ["Height"] = 164, - ["showFriendlyHealers"] = false, - ["font"] = "PT Sans Narrow", - }, - ["outgoing"] = { - ["fontOutline"] = "2OUTLINE", - ["Width"] = 142, - ["Y"] = 71, - ["font"] = "PT Sans Narrow", - ["Height"] = 176, - ["X"] = 333, - }, - ["critical"] = { - ["fontOutline"] = "2OUTLINE", - ["Width"] = 150, - ["Y"] = 71, - ["font"] = "PT Sans Narrow", - ["Height"] = 174, - ["X"] = 481, - }, - ["procs"] = { - ["fontOutline"] = "2OUTLINE", - ["Y"] = -68, - ["font"] = "PT Sans Narrow", - ["enabledFrame"] = false, - ["X"] = -248, - }, - ["loot"] = { - ["fontOutline"] = "2OUTLINE", - ["Y"] = -76, - ["font"] = "PT Sans Narrow", - ["X"] = 8, - }, - ["class"] = { - ["font"] = "PT Sans Narrow", - ["fontOutline"] = "2OUTLINE", - ["enabledFrame"] = false, - }, - ["damage"] = { - ["X"] = -339, - ["Y"] = 65, - ["font"] = "PT Sans Narrow", - ["fontOutline"] = "2OUTLINE", - }, + xCTSavedDB["profiles"]["S&L Darth"] = { + ["frames"] = { + ["general"] = { + ["fontOutline"] = "2OUTLINE", + ["font"] = "PT Sans Narrow", + ["enabledFrame"] = false, }, - } - end + ["power"] = { + ["fontOutline"] = "2OUTLINE", + ["font"] = "PT Sans Narrow", + ["enabledFrame"] = false, + }, + ["healing"] = { + ["enableRealmNames"] = false, + ["enableClassNames"] = false, + ["fontOutline"] = "2OUTLINE", + ["enableOverHeal"] = false, + ["Width"] = 128, + ["Y"] = 63, + ["X"] = -209, + ["Height"] = 164, + ["showFriendlyHealers"] = false, + ["font"] = "PT Sans Narrow", + }, + ["outgoing"] = { + ["fontOutline"] = "2OUTLINE", + ["Width"] = 142, + ["Y"] = 71, + ["font"] = "PT Sans Narrow", + ["Height"] = 176, + ["X"] = 333, + }, + ["critical"] = { + ["fontOutline"] = "2OUTLINE", + ["Width"] = 150, + ["Y"] = 71, + ["font"] = "PT Sans Narrow", + ["Height"] = 174, + ["X"] = 481, + }, + ["procs"] = { + ["fontOutline"] = "2OUTLINE", + ["Y"] = -68, + ["font"] = "PT Sans Narrow", + ["enabledFrame"] = false, + ["X"] = -248, + }, + ["loot"] = { + ["fontOutline"] = "2OUTLINE", + ["Y"] = -76, + ["font"] = "PT Sans Narrow", + ["X"] = 8, + }, + ["class"] = { + ["font"] = "PT Sans Narrow", + ["fontOutline"] = "2OUTLINE", + ["enabledFrame"] = false, + }, + ["damage"] = { + ["X"] = -339, + ["Y"] = 65, + ["font"] = "PT Sans Narrow", + ["fontOutline"] = "2OUTLINE", + }, + }, + } xCT_Plus.db:SetProfile("S&L Darth") end @@ -823,6 +819,15 @@ local function SetupCVars() _G["PluginInstallStepComplete"]:Show() end +function PI:RepoocSetup() +end + +function PI:RepoocAddons() +end + +local function AffinitySetup() +end + E.PopupDialogs['SLE_INSTALL_SETTINGS_LAYOUT'] = { text = L["SLE_INSTALL_SETTINGS_LAYOUT_TEXT"], button1 = YES, @@ -835,18 +840,33 @@ E.PopupDialogs['SLE_INSTALL_SETTINGS_LAYOUT'] = { OnCancel = E.noop; } +E.PopupDialogs['SLE_INSTALL_SETTINGS_ADDONS'] = { + text = "", + button1 = YES, + button2 = NO, + OnAccept = function() + if PI.SLE_Auth == "DARTH" then + PI:DarthAddons() + end + end, + OnCancel = E.noop; +} + local function StartSetup() if PI.SLE_Auth == "DARTH" then E:StaticPopup_Show("SLE_INSTALL_SETTINGS_LAYOUT") elseif PI.SLE_Auth == "REPOOC" then - + elseif PI.SLE_Auth == "AFFINITY" then + AffinitySetup() end end local function SetupAddons() if PI.SLE_Auth == "DARTH" then - PI:DarthAddons() + local list = "Skada\nxCT+" + E.PopupDialogs['SLE_INSTALL_SETTINGS_ADDONS'].text = T.format(L["SLE_INSTALL_SETTINGS_ADDONS_TEXT"], list) end + E:StaticPopup_Show("SLE_INSTALL_SETTINGS_ADDONS") end local function InstallComplete() diff --git a/ElvUI_SLE/locales/english.lua b/ElvUI_SLE/locales/english.lua index 2e1ce3b..44bc717 100644 --- a/ElvUI_SLE/locales/english.lua +++ b/ElvUI_SLE/locales/english.lua @@ -57,6 +57,10 @@ L["AFK Mode"] = true L["You have selected to use %s and role %s."] = true L["SLE_INSTALL_SETTINGS_LAYOUT_TEXT"] = [[This action can cause you to loose some of your settings. Continue?]] +L["SLE_INSTALL_SETTINGS_ADDONS_TEXT"] = [[This will create a profile for these addons (if enabled) and switch to it: +%s + +Continue?]] --Config replacements L["This option have been disabled by Shadow & Light. To return it you need to disable S&L's option. Click here to see it's location."] = true diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua index 94c36d1..41ba79b 100644 --- a/ElvUI_SLE/locales/russian.lua +++ b/ElvUI_SLE/locales/russian.lua @@ -54,6 +54,10 @@ L["AFK Mode"] = "Режим АФК" L["You have selected to use %s and role %s."] = "Вы выбрали %s для роли %s." L["SLE_INSTALL_SETTINGS_LAYOUT_TEXT"] = [[Это действие может привести к потере некоторых ваших настроек. Продолжить?]] +L["SLE_INSTALL_SETTINGS_ADDONS_TEXT"] = [[Это действие создаст профили для следующих аддонов (если они включены) и переключится на них: +%s + +Продолжить?]] --Config replacements L["This option have been disabled by Shadow & Light. To return it you need to disable S&L's option. Click here to see it's location."] = "Shadow & Light отключил эту опцию. Для ее возвращения нужно отключить соответственную опцию в S&L. Нажмите для перехода к ней."