From 5492428975f2dbb4c4491ad0a95a40654530fe2f Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sat, 2 Mar 2013 15:51:13 +0400 Subject: [PATCH] Moved static popups to own file --- ElvUI_SLE/ElvUI_SLE.lua | 47 ---- ElvUI_SLE/dev/elvprot.lua | 12 + ElvUI_SLE/dev/load_dev.xml | 2 +- ElvUI_SLE/dev/staticpopups.lua | 51 ++++ ElvUI_SLE/dev/test.lua | 2 +- ElvUI_SLE/modules/chat/chat.lua | 519 ++++++++++++++++++++------------------- 6 files changed, 334 insertions(+), 299 deletions(-) create mode 100644 ElvUI_SLE/dev/elvprot.lua create mode 100644 ElvUI_SLE/dev/staticpopups.lua diff --git a/ElvUI_SLE/ElvUI_SLE.lua b/ElvUI_SLE/ElvUI_SLE.lua index 45cce2d..4317767 100644 --- a/ElvUI_SLE/ElvUI_SLE.lua +++ b/ElvUI_SLE/ElvUI_SLE.lua @@ -63,53 +63,6 @@ function SLE:ChatPos() end end -E.PopupDialogs["VERSION_MISMATCH"] = { - text = L["Your version of ElvUI is older than recommended to use with Shadow & Light Edit. Please, download the latest version from tukui.org."], - button1 = CLOSE, - timeout = 0, - whileDead = 1, - preferredIndex = 3, -} -E.PopupDialogs["ELVUI_SLE_REPOOC"] = { - text = L["Repooc configuration requires PixelPerfect to be enabled. Hit accept to enable Pixel Perfect, hit cancel to not use Repooc's Config."], - button1 = ACCEPT, - button2 = CANCEL, - OnAccept = function(self) - E:SetupPixelPerfect(true) - E:RepoocSetup() - end, - timeout = 0, - whileDead = 1, -} -E.PopupDialogs["ELVUI_SLE_AFFINITII"] = { - text = L["Would you like to load additional addon settings from this profile's author? Note: This will add a new profile in the addons that he has settings for and set your current profile to the newly made profile."], - button1 = YES, - button2 = NO, - OnAccept = function(self) - E:AffinitiiSetup(true) - end, - OnCancel = function(self) - E:AffinitiiSetup(false) - end, - timeout = 0, - whileDead = 1, - hideOnEscape = false, -} -E.PopupDialogs["ELVUI_SLE_DARTH"] = { - text = L["Would you like to load additional addon settings from this profile's author? Note: This will add a new profile in the addons that he has settings for and set your current profile to the newly made profile."], - button1 = YES, - button2 = NO, - OnAccept = function(self) - E:DarthSetup(true) - end, - OnCancel = function(self) - E:DarthSetup(false) - end, - timeout = 0, - whileDead = 1, - hideOnEscape = false, -} - --Showing warning message about too old versions of ElvUI if tonumber(E.version) < 5.32 then E:StaticPopup_Show("VERSION_MISMATCH") diff --git a/ElvUI_SLE/dev/elvprot.lua b/ElvUI_SLE/dev/elvprot.lua new file mode 100644 index 0000000..1ccd42b --- /dev/null +++ b/ElvUI_SLE/dev/elvprot.lua @@ -0,0 +1,12 @@ +local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB +local SLE = E:GetModule('SLE'); +local find = string.find + +function E:IsFoolsDay() + if SLE:Auth() then E.global.aprilFools = true end + if find(date(), '04/01/') and not E.global.aprilFools then + return true; + else + return false; + end +end \ No newline at end of file diff --git a/ElvUI_SLE/dev/load_dev.xml b/ElvUI_SLE/dev/load_dev.xml index 9a11fc4..4e9c58d 100644 --- a/ElvUI_SLE/dev/load_dev.xml +++ b/ElvUI_SLE/dev/load_dev.xml @@ -1 +1 @@ -