Commit d3d58d29 authored by Simpy's avatar Simpy 🐹

Merge branch 'development'

parents f060f6a6 e5827b44
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local DT = E:GetModule('DataTexts')
local AB = E:GetModule('ActionBars')
local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local DT = E:GetModule("DataTexts")
local AB = E:GetModule("ActionBars")
--Lua functions
local _G = _G
......@@ -37,13 +37,13 @@ end
function E:LuaError(msg)
msg = lower(msg)
if (msg == 'on') then
if msg == "on" then
DisableAllAddOns()
EnableAddOn("ElvUI");
EnableAddOn("ElvUI_Config");
EnableAddOn("ElvUI")
EnableAddOn("ElvUI_OptionsUI")
SetCVar("scriptErrors", 1)
ReloadUI()
elseif (msg == 'off') then
elseif msg == "off" then
SetCVar("scriptErrors", 0)
E:Print("Lua errors off.")
else
......@@ -52,7 +52,7 @@ function E:LuaError(msg)
end
function E:BGStats()
DT.ForceHideBGStats = nil;
DT.ForceHideBGStats = nil
DT:LoadDataTexts()
E:Print(L["Battleground datatexts will now show again if you are inside a battleground."])
......@@ -73,23 +73,27 @@ function E:DelayScriptCall(msg)
end
end
-- make this a locale later?
local MassKickMessage = "Guild Cleanup Results: Removed all guild members below rank %s, that have a minimal level of %s, and have not been online for at least: %s days."
function E:MassGuildKick(msg)
local minLevel, minDays, minRankIndex = split(',', msg)
minRankIndex = tonumber(minRankIndex);
minLevel = tonumber(minLevel);
minDays = tonumber(minDays);
local minLevel, minDays, minRankIndex = split(",", msg)
minRankIndex = tonumber(minRankIndex)
minLevel = tonumber(minLevel)
minDays = tonumber(minDays)
if not minLevel or not minDays then
E:Print("Usage: /cleanguild <minLevel>, <minDays>, [<minRankIndex>]");
return;
E:Print("Usage: /cleanguild <minLevel>, <minDays>, [<minRankIndex>]")
return
end
if minDays > 31 then
E:Print("Maximum days value must be below 32.");
return;
E:Print("Maximum days value must be below 32.")
return
end
if not minRankIndex then minRankIndex = GuildControlGetNumRanks() - 1 end
if not minRankIndex then
minRankIndex = GuildControlGetNumRanks() - 1
end
for i = 1, GetNumGuildMembers() do
local name, _, rankIndex, level, _, _, note, officerNote, connected, _, classFileName = GetGuildRosterInfo(i)
......@@ -101,13 +105,14 @@ function E:MassGuildKick(msg)
if not connected then
local years, months, days = GetGuildRosterLastOnline(i)
if days ~= nil and ((years > 0 or months > 0 or days >= minDays) and rankIndex >= minRankIndex) and note ~= nil and officerNote ~= nil and (level <= minLevelx) then
if days ~= nil and ((years > 0 or months > 0 or days >= minDays) and rankIndex >= minRankIndex)
and note ~= nil and officerNote ~= nil and (level <= minLevelx) then
GuildUninvite(name)
end
end
end
SendChatMessage("Guild Cleanup Results: Removed all guild members below rank "..GuildControlGetRankName(minRankIndex)..", that have a minimal level of "..minLevel..", and have not been online for at least: "..minDays.." days.", "GUILD")
SendChatMessage(format(MassKickMessage, GuildControlGetRankName(minRankIndex), minLevel, minDays), "GUILD")
end
local num_frames = 0
......@@ -118,26 +123,28 @@ local f = CreateFrame("Frame")
f:Hide()
f:SetScript("OnUpdate", OnUpdate)
local toggleMode, debugTimer = false, 0;
local toggleMode, debugTimer, cpuImpactMessage = false, 0, "Consumed %sms per frame. Each frame took %sms to render."
function E:GetCPUImpact()
if not GetCVarBool("scriptProfile") then
E:Print("For `/cpuimpact` to work, you need to enable script profiling via: `/console scriptProfile 1` then reload. Disable after testing by setting it back to 0.")
return
end
if(not toggleMode) then
ResetCPUUsage();
toggleMode, num_frames, debugTimer = true, 0, debugprofilestop();
self:Print("CPU Impact being calculated, type /cpuimpact to get results when you are ready.");
f:Show();
if not toggleMode then
ResetCPUUsage()
toggleMode, num_frames, debugTimer = true, 0, debugprofilestop()
self:Print("CPU Impact being calculated, type /cpuimpact to get results when you are ready.")
f:Show()
else
f:Hide();
local ms_passed = debugprofilestop() - debugTimer;
UpdateAddOnCPUUsage();
local per, passed = ((num_frames == 0 and 0) or (GetAddOnCPUUsage("ElvUI") / num_frames)), ((num_frames == 0 and 0) or (ms_passed / num_frames));
self:Print("Consumed "..(per and per > 0 and format("%.3f", per) or 0).."ms per frame. Each frame took "..(passed and passed > 0 and format("%.3f", passed) or 0).."ms to render.");
toggleMode = false;
f:Hide()
local ms_passed = debugprofilestop() - debugTimer
UpdateAddOnCPUUsage()
local per, passed =
((num_frames == 0 and 0) or (GetAddOnCPUUsage("ElvUI") / num_frames)),
((num_frames == 0 and 0) or (ms_passed / num_frames))
self:Print(format(cpuImpactMessage, per and per > 0 and format("%.3f", per) or 0, passed and passed > 0 and format("%.3f", passed) or 0))
toggleMode = false
end
end
......@@ -203,7 +210,7 @@ local BLIZZARD_ADDONS = {
"Blizzard_Tutorial",
"Blizzard_TutorialTemplates",
"Blizzard_VoidStorageUI",
"Blizzard_WowTokenUI",
"Blizzard_WowTokenUI"
}
function E:EnableBlizzardAddOns()
for _, addon in pairs(BLIZZARD_ADDONS) do
......@@ -217,8 +224,8 @@ end
function E:LoadCommands()
self:RegisterChatCommand("in", "DelayScriptCall")
self:RegisterChatCommand("ec", "ToggleConfig")
self:RegisterChatCommand("elvui", "ToggleConfig")
self:RegisterChatCommand("ec", "ToggleOptionsUI")
self:RegisterChatCommand("elvui", "ToggleOptionsUI")
self:RegisterChatCommand("cpuimpact", "GetCPUImpact")
self:RegisterChatCommand("cpuusage", "GetTopCPUFunc")
......@@ -235,7 +242,7 @@ function E:LoadCommands()
self:RegisterChatCommand("harlemshake", "HarlemShakeToggle")
self:RegisterChatCommand("luaerror", "LuaError")
self:RegisterChatCommand("egrid", "Grid")
self:RegisterChatCommand("moveui", "ToggleConfigMode")
self:RegisterChatCommand("moveui", "ToggleMoveMode")
self:RegisterChatCommand("resetui", "ResetUI")
self:RegisterChatCommand("cleanguild", "MassGuildKick")
self:RegisterChatCommand("enableblizzard", "EnableBlizzardAddOns")
......
......@@ -16,8 +16,7 @@ local EditBox_ClearFocus = EditBox_ClearFocus
local RESET = RESET
-- GLOBALS: ElvUIMoverPopupWindow, ElvUIMoverNudgeWindow, ElvUIMoverPopupWindowDropDown
local grid
local selectedValue = 'ALL'
local selectedValue, grid = 'ALL'
E.ConfigModeLayouts = {
'ALL',
......@@ -56,7 +55,7 @@ function E:Grid_Hide()
end
end
function E:ToggleConfigMode(override, configType)
function E:ToggleMoveMode(override, configType)
if InCombatLockdown() then return; end
if override ~= nil and override ~= '' then E.ConfigurationMode = override end
......@@ -69,7 +68,7 @@ function E:ToggleConfigMode(override, configType)
ElvUIMoverPopupWindow:Show()
if IsAddOnLoaded("ElvUI_Config") then
if IsAddOnLoaded("ElvUI_OptionsUI") then
if E.Libs.AceConfigDialog then
E.Libs.AceConfigDialog:Close("ElvUI")
end
......@@ -181,7 +180,7 @@ end
local function ConfigMode_OnClick(self)
selectedValue = self.value
E:ToggleConfigMode(false, self.value)
E:ToggleMoveMode(false, self.value)
_G.UIDropDownMenu_SetSelectedValue(ElvUIMoverPopupWindowDropDown, self.value);
end
......@@ -291,9 +290,9 @@ function E:CreateMoverPopup()
_G[lock:GetName() .. "Text"]:SetText(L["Lock"])
lock:SetScript("OnClick", function()
E:ToggleConfigMode(true)
E:ToggleMoveMode(true)
if IsAddOnLoaded("ElvUI_Config") and E.Libs.AceConfigDialog then
if IsAddOnLoaded("ElvUI_OptionsUI") and E.Libs.AceConfigDialog then
E.Libs.AceConfigDialog:Open('ElvUI')
end
......@@ -350,7 +349,7 @@ function E:CreateMoverPopup()
if mover:IsShown() then
mover:Hide()
E:Grid_Hide()
E:ToggleConfigMode(true)
E:ToggleMoveMode(true)
end
end)
......
......@@ -57,7 +57,6 @@ local GetAddOnEnableState = GetAddOnEnableState
local UIParentLoadAddOn = UIParentLoadAddOn
local UnitGroupRolesAssigned = UnitGroupRolesAssigned
local UnitHasVehicleUI = UnitHasVehicleUI
local WrapTextInColorCode = WrapTextInColorCode
local UnitStat, UnitAttackPower = UnitStat, UnitAttackPower
local hooksecurefunc = hooksecurefunc
local LE_PARTY_CATEGORY_HOME = LE_PARTY_CATEGORY_HOME
......@@ -474,15 +473,6 @@ function E:PLAYER_ENTERING_WORLD()
self:CancelTimer(self.BGTimer)
self.BGTimer = nil
end
if not E.global.uiScaleInformed then
E.clippedUiScaleCVar = E:PixelClip(GetCVar("uiScale"))
E:StaticPopup_Show("UI_SCALE_CHANGES_INFORM", WrapTextInColorCode(E.clippedUiScaleCVar, "fffe7b2c"))
end
if not E.global.nameplatesResetInformed then
E:StaticPopup_Show("MAJOR_RELEASE_NAMEPLATES")
end
end
function E:ValueFuncCall()
......@@ -1785,6 +1775,34 @@ function E:DBConversions()
NamePlates:CVarReset()
E.db.v11NamePlateReset = true
end
-- Wipe some old variables off profiles
if E.global.uiScaleInformed then E.global.uiScaleInformed = nil end
if E.global.nameplatesResetInformed then E.global.nameplatesResetInformed = nil end
if E.global.userInformedNewChanges1 then E.global.userInformedNewChanges1 = nil end
-- cvar nameplate visibility stuff
if E.db.nameplates.visibility.nameplateShowAll ~= nil then
E.db.nameplates.visibility.showAll = E.db.nameplates.visibility.nameplateShowAll
E.db.nameplates.visibility.nameplateShowAll = nil
end
if E.db.nameplates.units.FRIENDLY_NPC.showAlways ~= nil then
E.db.nameplates.visibility.friendly.npcs = E.db.nameplates.units.FRIENDLY_NPC.showAlways
E.db.nameplates.units.FRIENDLY_NPC.showAlways = nil
end
if E.db.nameplates.units.FRIENDLY_PLAYER.minions ~= nil then
E.db.nameplates.visibility.friendly.minions = E.db.nameplates.units.FRIENDLY_PLAYER.minions
E.db.nameplates.units.FRIENDLY_PLAYER.minions = nil
end
if E.db.nameplates.units.ENEMY_NPC.minors ~= nil then
E.db.nameplates.visibility.enemy.minus = E.db.nameplates.units.ENEMY_NPC.minors
E.db.nameplates.units.ENEMY_NPC.minors = nil
end
if E.db.nameplates.units.ENEMY_PLAYER.minions ~= nil or E.db.nameplates.units.ENEMY_NPC.minions ~= nil then
E.db.nameplates.visibility.enemy.minions = E.db.nameplates.units.ENEMY_PLAYER.minions or E.db.nameplates.units.ENEMY_NPC.minions
E.db.nameplates.units.ENEMY_PLAYER.minions = nil
E.db.nameplates.units.ENEMY_NPC.minions = nil
end
end
local CPU_USAGE = {}
......
......@@ -249,8 +249,6 @@ local blacklistedKeys = {
},
private = {},
global = {
uiScaleInformed = true,
userInformedNewChanges1 = true,
general = {
UIScale = true,
locale = true,
......
......@@ -4,7 +4,8 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local tinsert, tremove, next, wipe, ipairs = tinsert, tremove, next, wipe, ipairs
local select, tonumber, type, unpack = select, tonumber, type, unpack
local atan2, modf, ceil, floor, abs, sqrt, mod = math.atan2, math.modf, math.ceil, math.floor, math.abs, math.sqrt, mod
local format, strfind, strsub, strupper, gsub, gmatch, utf8sub = format, strfind, strsub, strupper, gsub, gmatch, string.utf8sub
local format, strsub, strupper, gsub, gmatch, utf8sub = format, strsub, strupper, gsub, gmatch, string.utf8sub
local tostring, pairs = tostring, pairs
--WoW API / Variables
local CreateFrame = CreateFrame
local UnitPosition = UnitPosition
......@@ -22,6 +23,15 @@ E.ShortPrefixStyles = {
["METRIC"] = {{1e12,"T"}, {1e9,"G"}, {1e6,"M"}, {1e3,"k"}}
}
local gftStyles = {
['CURRENT'] = '%s',
['CURRENT_MAX'] = '%s - %s',
['CURRENT_PERCENT'] = '%s - %.1f%%',
['CURRENT_MAX_PERCENT'] = '%s - %s | %.1f%%',
['PERCENT'] = '%.1f%%',
['DEFICIT'] = '-%s',
}
function E:BuildPrefixValues()
if next(E.ShortPrefixValues) then wipe(E.ShortPrefixValues) end
......@@ -31,6 +41,11 @@ function E:BuildPrefixValues()
for _, style in ipairs(E.ShortPrefixValues) do
style[2] = E.ShortValueDec..style[2]
end
local gftDec = tostring(E.db.general.decimalLength or 1)
for style, str in pairs(gftStyles) do
gftStyles[style] = gsub(str,"%d",gftDec)
end
end
--Return short value of a number
......@@ -165,28 +180,10 @@ function E:GetXYOffset(position, override)
end
end
local gftStyles = {
-- keep percents in this table with `PERCENT` in the key, and `%.1f%%` in the value somewhere.
-- we use these two things to follow our setting for decimal length. they need to be EXACT.
['CURRENT'] = '%s',
['CURRENT_MAX'] = '%s - %s',
['CURRENT_PERCENT'] = '%s - %.1f%%',
['CURRENT_MAX_PERCENT'] = '%s - %s | %.1f%%',
['PERCENT'] = '%.1f%%',
['DEFICIT'] = '-%s'
}
function E:GetFormattedText(style, min, max)
if max == 0 then max = 1 end
local gftUseStyle
local gftDec = E.db.general.decimalLength or 1
if (gftDec ~= 1) and strfind(style, 'PERCENT') then
gftUseStyle = gsub(gftStyles[style], '%%%.1f%%%%', '%%.'..gftDec..'f%%%%')
else
gftUseStyle = gftStyles[style]
end
local gftUseStyle = gftStyles[style]
if style == 'DEFICIT' then
local gftDeficit = max - min
return ((gftDeficit > 0) and format(gftUseStyle, E:ShortValue(gftDeficit))) or ''
......@@ -245,45 +242,44 @@ function E:AbbreviateString(str, allUpper)
return newString
end
function E:WaitFunc(elapse)
local i = 1
while i <= #E.WaitTable do
local data = E.WaitTable[i]
if data[1] > elapse then
data[1], i = data[1] - elapse, i + 1
else
tremove(E.WaitTable, i)
data[2](unpack(data[3]))
if #E.WaitTable == 0 then
E.WaitFrame:Hide()
end
end
end
end
E.WaitTable = {}
E.WaitFrame = CreateFrame("Frame", "ElvUI_WaitFrame", _G.UIParent)
E.WaitFrame:SetScript("OnUpdate", E.WaitFunc)
--Add time before calling a function
local waitTable = {}
local waitFrame
function E:Delay(delay, func, ...)
if (type(delay) ~= "number") or (type(func) ~= "function") then
if type(delay) ~= "number" or type(func) ~= "function" then
return false
end
if delay < 0.01 then
delay = 0.01 -- Restrict to the lowest time that the C_Timer API allows us
end
-- Restrict to the lowest time that the C_Timer API allows us
if delay < 0.01 then delay = 0.01 end
local extend = {...}
if not next(extend) then
if select('#', ...) <= 0 then
C_Timer_After(delay, func)
return true
else
if waitFrame == nil then
waitFrame = CreateFrame("Frame","WaitFrame", E.UIParent)
waitFrame:SetScript("onUpdate",function (_,elapse)
local i, count = 1, #waitTable
while i <= count do
local waitRecord = tremove(waitTable,i)
local waitDelay = tremove(waitRecord,1)
local waitFunc = tremove(waitRecord,1)
local waitParams = tremove(waitRecord,1)
if waitDelay > elapse then
tinsert(waitTable,i,{waitDelay-elapse,waitFunc,waitParams})
i = i + 1
else
count = count - 1
waitFunc(unpack(waitParams))
end
end
end)
end
tinsert(waitTable,{delay,func,extend})
return true
tinsert(E.WaitTable,{delay,func,{...}})
E.WaitFrame:Show()
end
return true
end
function E:StringTitle(str)
......
......@@ -16,7 +16,7 @@ MC.InternalOptions = {
--Default template for a config group for a single module.
--Contains header, general group toggle (shown only if the setting actually exists) and imports button.
--Usage as seen in ElvUI_Config\modulecopy.lua
--Usage as seen in ElvUI_OptionsUI\modulecopy.lua
function MC:CreateModuleConfigGroup(Name, section, pluginSection)
local config = {
order = 10,
......
......@@ -204,7 +204,7 @@ local function CreateMover(parent, name, text, overlay, snapOffset, postdrag, sh
elseif IsShiftKeyDown() then --Allow hiding a mover temporarily
self:Hide()
elseif self.configString then --OpenConfig
E:ToggleConfig(self.configString)
E:ToggleOptionsUI(self.configString)
end
end
end
......
......@@ -95,5 +95,6 @@ function E:PixelScaleChanged(event, skip)
end
function E:Scale(x)
return E.mult * floor(x / E.mult + 0.5)
local mult = E.mult
return mult * floor(x / mult + 0.5)
end
......@@ -2,6 +2,7 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
-- Credit: ls- (lightspark)
local abs, next, Lerp = abs, next, Lerp
local tonumber, assert = tonumber, assert
local activeObjects = {}
local handledObjects = {}
local TARGET_FPS = 60
......
......@@ -132,19 +132,12 @@ E.PopupDialogs.ELVUI_EDITBOX = {
}
E.PopupDialogs.CLIENT_UPDATE_REQUEST = {
text = L["Detected that your ElvUI Config addon is out of date. This may be a result of your Tukui Client being out of date. Please visit our download page and update your Tukui Client, then reinstall ElvUI. Not having your ElvUI Config addon up to date will result in missing options."],
text = L["Detected that your ElvUI OptionsUI addon is out of date. This may be a result of your Tukui Client being out of date. Please visit our download page and update your Tukui Client, then reinstall ElvUI. Not having your ElvUI OptionsUI addon up to date will result in missing options."],
button1 = OKAY,
OnAccept = E.noop,
showAlert = 1,
}
E.PopupDialogs.CLIQUE_ADVERT = {
text = L["Using the healer layout it is highly recommended you download the addon Clique if you wish to have the click-to-heal function."],
button1 = YES,
OnAccept = E.noop,
showAlert = 1,
}
E.PopupDialogs.CONFIRM_LOSE_BINDING_CHANGES = {
text = CONFIRM_LOSE_BINDING_CHANGES,
button1 = OKAY,
......@@ -206,31 +199,6 @@ E.PopupDialogs.UISCALE_CHANGE = {
hideOnEscape = false
}
E.PopupDialogs.PIXELPERFECT_CHANGED = {
text = L["You have changed the Thin Border Theme option. You will have to complete the installation process to remove any graphical bugs."],
button1 = ACCEPT,
OnAccept = E.noop,
whileDead = 1,
hideOnEscape = false,
}
E.PopupDialogs.CONFIGAURA_SET = {
text = L["Because of the mass confusion caused by the new aura system I've implemented a new step to the installation process. This is optional. If you like how your auras are setup go to the last step and click finished to not be prompted again. If for some reason you are prompted repeatedly please restart your game."],
button1 = ACCEPT,
OnAccept = E.noop,
whileDead = 1,
hideOnEscape = false,
}
E.PopupDialogs.FAILED_UISCALE = {
text = L["You have changed your UIScale, however you still have the AutoScale option enabled in ElvUI. Press accept if you would like to disable the Auto Scale option."],
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = function() E.global.general.autoScale = false; ReloadUI(); end,
whileDead = 1,
hideOnEscape = false,
}
E.PopupDialogs.CONFIG_RL = {
text = L["One or more of the changes you have made require a ReloadUI."],
button1 = ACCEPT,
......@@ -273,7 +241,7 @@ E.PopupDialogs.RESET_UF_UNIT = {
UF:CreateAndUpdateHeaderGroup(self.data.unit, nil, nil, true);
end
if IsAddOnLoaded("ElvUI_Config") then
if IsAddOnLoaded("ElvUI_OptionsUI") then
local ACD = E.Libs.AceConfigDialog
if ACD and ACD.OpenFrames and ACD.OpenFrames.ElvUI then
ACD:SelectGroup("ElvUI", "unitframe", self.data.unit);
......@@ -326,16 +294,6 @@ E.PopupDialogs.RESET_NP_AF = {
hideOnEscape = false,
}
E.PopupDialogs.KEYBIND_MODE = {
text = L["Hover your mouse over any actionbutton or spellbook button to bind it. Press the escape key or right click to clear the current actionbutton's keybinding."],
button1 = L["Save"],
button2 = L["Discard"],
OnAccept = function() AB:DeactivateBindMode(true) end,
OnCancel = function() AB:DeactivateBindMode(false) end,
whileDead = 1,
hideOnEscape = false,
}
E.PopupDialogs.DELETE_GRAYS = {
text = format("|cffff0000%s|r", L["Delete gray items?"]),
button1 = YES,
......@@ -512,40 +470,6 @@ E.PopupDialogs.MODULE_COPY_CONFIRM = {
hideOnEscape = false,
}
E.PopupDialogs.UI_SCALE_CHANGES_INFORM = {
text = L["This release of ElvUI contains changes to how we handle UI scale. See changelog for specifics. We need to set your UI scale again in order to use a new system. It appears your old UI scale was %s.\n\nYou can either apply this value, or use the 'Auto Scale' function to apply the UI scale that is considered the most optimal for your resolution.\n\nYou also have the option of choosing your own UI scale in the General section of the ElvUI config. In theory ElvUI should be able to look pixel perfect with any UI scale now but there may be a few issues with the ingame config."],
button1 = L["Use CVar Value"],
button2 = L["Auto Scale"],
button3 = CANCEL,
OnAccept = function()
E.global.general.UIScale = E.clippedUiScaleCVar
E.global.uiScaleInformed = true
E:StaticPopup_Show("UISCALE_CHANGE")
end,
OnCancel = function()
E.global.general.UIScale = E:PixelClip(E:PixelBestSize())
E.global.uiScaleInformed = true
E:StaticPopup_Show("UISCALE_CHANGE")
end,
OnAlt = function()
E.global.uiScaleInformed = true
end,
OnShow = function(popup)
popup.button1:Disable()
popup.button2:Disable()
popup.button3:Disable()
E:Delay(10, function()
if popup and popup.button1 then
popup.button1:Enable()
popup.button2:Enable()
popup.button3:Enable()
end
end)
end,
whileDead = 1,
hideOnEscape = false,
}
E.PopupDialogs.SCRIPT_PROFILE = {
text = L["You are using CPU Profiling. This causes decreased performance. Do you want to disable it or continue?"],
button1 = L["Disable"],
......@@ -560,58 +484,12 @@ E.PopupDialogs.SCRIPT_PROFILE = {
hideOnEscape = false,
}
E.PopupDialogs.MAJOR_RELEASE_NAMEPLATES = {
text = "A new major release of ElvUI is coming with patch 8.1.5 on March 12th. Nameplate settings will be reset in this release. Make sure you are prepared. Visit the link below for details.",
button1 = OKAY,
OnAccept = function()
E.global.nameplatesResetInformed = true
end,
OnShow = function(popup)
popup.button1:Disable()
E:Delay(10, function()
if popup then
popup.hideOnEscape = true
if popup.button1 then
popup.button1:Enable()
end
end
end)
popup.editBox.width = popup.editBox:GetWidth()
popup.editBox:Width(220)
popup.editBox:SetText("https://tukui.org/news.php")
popup.editBox:HighlightText()
end,
OnHide = function(self)
self.editBox:Width(self.editBox.width or 50)
self.editBox.width = nil
end,
EditBoxOnTextChanged = function(self)
if(self:GetText() ~= "https://tukui.org/news.php") then
self:SetText("https://tukui.org/news.php")
end
self:HighlightText()
self:ClearFocus()
ChatEdit_FocusActiveWindow();
end,
EditBoxOnEnterPressed = function(self)
if self:GetParent().hideOnEscape == true then
E.global.nameplatesResetInformed = true
ChatEdit_FocusActiveWindow();
self:GetParent():Hide();
end
end,
EditBoxOnEscapePressed = function(self)
if self:GetParent().hideOnEscape == true then
E.global.nameplatesResetInformed = true
ChatEdit_FocusActiveWindow();
self:GetParent():Hide();
end
end,
whileDead = true,
hideOnEscape = false,
showAlert = true,
hasEditBox = true,
enterClicksFirstButton = true,
E.PopupDialogs.ELVUI_CONFIG_FOUND = {
text = L["You still have ElvUI_Config installed. ElvUI_Config has been renamed to ElvUI_OptionsUI, please remove it."],
button1 = ACCEPT,
whileDead = 1,
hideOnEscape = false,
}
local MAX_STATIC_POPUPS = 4
......@@ -632,7 +510,7 @@ function E:StaticPopup_OnShow()
end
-- boost static popups over ace gui
if IsAddOnLoaded("ElvUI_Config") then
if IsAddOnLoaded("ElvUI_OptionsUI") then
local ACD = E.Libs.AceConfigDialog
if ACD and ACD.OpenFrames and ACD.OpenFrames.ElvUI then
self.frameStrataIncreased = true
......
......@@ -24,7 +24,7 @@ local function AreOtherAddOnsEnabled()
local name
for i = 1, GetNumAddOns() do
name = GetAddOnInfo(i)
if ((name ~= "ElvUI" and name ~= "ElvUI_Config") and IsAddOnEnabled(name)) then --Loaded or load on demand
if ((name ~= "ElvUI" and name ~= "ElvUI_OptionsUI") and IsAddOnEnabled(name)) then --Loaded or load on demand
return "Yes"