Commit f060f6a6 authored by Simpy's avatar Simpy 🐹

Merge branch 'development'

parents a2b4e0c4 6075cbbe
This diff is collapsed.
......@@ -200,7 +200,7 @@ end
function E:ToggleBlizzardCooldownText(cd, timer, request)
-- we should hide the blizzard cooldown text when ours are enabled
if timer and cd and cd.SetHideCountdownNumbers then
local forceHide = (timer.timerOptions and timer.timerOptions.hideBlizzard) or (E.db and E.db.cooldown and E.db.cooldown.hideBlizzard)
local forceHide = cd.hideText or (timer.timerOptions and timer.timerOptions.hideBlizzard) or (E.db and E.db.cooldown and E.db.cooldown.hideBlizzard)
if request then
return forceHide or E:Cooldown_IsEnabled(timer)
else
......
local ElvUI = select(2, ...)
ElvUI[2] = ElvUI[1].Libs.ACL:GetLocale('ElvUI', false) -- Locale doesn't exist yet, make it exist.
local gameLocale
do -- Locale doesn't exist yet, make it exist.
local convert = {['enGB'] = 'enUS', ['esES'] = 'esMX', ['itIT'] = 'enUS'}
local lang = GetLocale()
gameLocale = convert[lang] or lang or 'enUS'
ElvUI[2] = ElvUI[1].Libs.ACL:GetLocale('ElvUI', gameLocale)
end
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local ActionBars = E:GetModule('ActionBars')
......@@ -26,17 +35,15 @@ local _G = _G
local tonumber, pairs, ipairs, error, unpack, select, tostring = tonumber, pairs, ipairs, error, unpack, select, tostring
local assert, type, pcall, date, print = assert, type, pcall, date, print
local twipe, tinsert, tremove, next = wipe, tinsert, tremove, next
local gsub, strmatch, strjoin = gsub, match, strjoin
local gsub, strmatch, strjoin = gsub, strmatch, strjoin
local format, find, strrep, len, sub = format, strfind, strrep, strlen, strsub
--WoW API / Variables
local CreateFrame = CreateFrame
local GetCVar, SetCVar, GetCVarBool = GetCVar, SetCVar, GetCVarBool
local GetChannelName = GetChannelName
local GetCombatRatingBonus = GetCombatRatingBonus
local GetDodgeChance, GetParryChance = GetDodgeChance, GetParryChance
local GetFunctionCPUUsage = GetFunctionCPUUsage
local GetNumGroupMembers = GetNumGroupMembers
local GetSpecialization, GetActiveSpecGroup = GetSpecialization, GetActiveSpecGroup
local GetSpecialization = GetSpecialization
local GetSpecializationRole = GetSpecializationRole
local InCombatLockdown = InCombatLockdown
local IsAddOnLoaded = IsAddOnLoaded
......@@ -51,12 +58,10 @@ local UIParentLoadAddOn = UIParentLoadAddOn
local UnitGroupRolesAssigned = UnitGroupRolesAssigned
local UnitHasVehicleUI = UnitHasVehicleUI
local WrapTextInColorCode = WrapTextInColorCode
local UnitLevel, UnitStat, UnitAttackPower = UnitLevel, UnitStat, UnitAttackPower
local UnitStat, UnitAttackPower = UnitStat, UnitAttackPower
local hooksecurefunc = hooksecurefunc
local COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN = COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN
local LE_PARTY_CATEGORY_HOME = LE_PARTY_CATEGORY_HOME
local LE_PARTY_CATEGORY_INSTANCE = LE_PARTY_CATEGORY_INSTANCE
local MAX_PLAYER_LEVEL = MAX_PLAYER_LEVEL
local MAX_WOW_CHAT_CHANNELS = MAX_WOW_CHAT_CHANNELS
local ERR_NOT_IN_COMBAT = ERR_NOT_IN_COMBAT
local C_ChatInfo_GetNumActiveChannels = C_ChatInfo.GetNumActiveChannels
......@@ -141,14 +146,6 @@ E.DispelClasses = {
}
}
E.HealingClasses = {
PALADIN = 1,
SHAMAN = 3,
DRUID = 4,
MONK = 2,
PRIEST = {1, 2}
}
E.ClassRole = {
PALADIN = {
[1] = 'Caster',
......@@ -607,23 +604,6 @@ E.snapBars[#E.snapBars + 1] = E.UIParent
E.HiddenFrame = CreateFrame('Frame')
E.HiddenFrame:Hide()
function E:CheckTalentTree(tree)
local activeSpec = GetActiveSpecGroup()
local currentSpec = activeSpec and GetSpecialization(false, false, activeSpec)
if currentSpec and type(tree) == 'number' then
return tree == currentSpec
elseif currentSpec and type(tree) == 'table' then
for _, index in pairs(tree) do
if index == currentSpec then
return true
end
end
end
return false
end
function E:IsDispellableByMe(debuffType)
if not self.DispelClasses[self.myclass] then return end
......@@ -633,25 +613,17 @@ function E:IsDispellableByMe(debuffType)
end
function E:CheckRole()
local talentTree = GetSpecialization()
self.myspec = talentTree
self.myspec = GetSpecialization()
self.myrole = E:GetPlayerRole()
local IsInPvPGear, role = false
local resilperc = GetCombatRatingBonus(COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN)
if resilperc > GetDodgeChance() and resilperc > GetParryChance() and UnitLevel('player') == MAX_PLAYER_LEVEL then
IsInPvPGear = true
end
-- myrole = group role; TANK, HEALER, DAMAGER
-- role = class role; Tank, Melee, Caster
local role
if type(self.ClassRole[self.myclass]) == 'string' then
role = self.ClassRole[self.myclass]
elseif talentTree then
role = self.ClassRole[self.myclass][talentTree]
end
--Check for PvP gear
if role == 'Tank' and IsInPvPGear then
role = 'Melee'
elseif self.myspec then
role = self.ClassRole[self.myclass][self.myspec]
end
if not role then
......@@ -672,12 +644,8 @@ function E:CheckRole()
self.callbacks:Fire('RoleChanged')
end
if self.HealingClasses[self.myclass] ~= nil and self.myclass ~= 'PRIEST' then
if self:CheckTalentTree(self.HealingClasses[self.myclass]) then
self.DispelClasses[self.myclass].Magic = true
else
self.DispelClasses[self.myclass].Magic = false
end
if self.myrole and self.DispelClasses[self.myclass] ~= nil then
self.DispelClasses[self.myclass].Magic = (self.myrole == 'HEALER')
end
end
......@@ -1672,6 +1640,18 @@ function E:InitializeModules()
end
function E:DBConversions()
--Fix issue where UIScale was incorrectly stored as string
E.global.general.UIScale = tonumber(E.global.general.UIScale)
--Not sure how this one happens, but prevent it in any case
if E.global.general.UIScale <= 0 then
E.global.general.UIScale = G.general.UIScale
end
if gameLocale and E.global.general.locale == 'auto' then
E.global.general.locale = gameLocale
end
--Combat & Resting Icon options update
if E.db.unitframe.units.player.combatIcon ~= nil then
E.db.unitframe.units.player.CombatIcon.enable = E.db.unitframe.units.player.combatIcon
......@@ -1739,6 +1719,20 @@ function E:DBConversions()
E.db.nameplates.durationFontOutline = nil
end
if E.db.nameplates.lowHealthThreshold > 0.8 then
E.db.nameplates.lowHealthThreshold = 0.8
end
if E.db.nameplates.units.TARGET.nonTargetTransparency ~= nil then
E.global.nameplate.filters.ElvUI_NonTarget.actions.alpha = E.db.nameplates.units.TARGET.nonTargetTransparency * 100
E.db.nameplates.units.TARGET.nonTargetTransparency = nil
end
if E.db.nameplates.units.TARGET.scale ~= nil then
E.global.nameplate.filters.ElvUI_Target.actions.scale = E.db.nameplates.units.TARGET.scale
E.db.nameplates.units.TARGET.scale = nil
end
if not E.db.chat.panelColorConverted then
local color = E.db.general.backdropfadecolor
E.db.chat.panelColor = {r = color.r, g = color.g, b = color.b, a = color.a}
......@@ -1762,6 +1756,17 @@ function E:DBConversions()
end
end
--Health Backdrop Multiplier
if E.db.unitframe.colors.healthmultiplier ~= nil then
if E.db.unitframe.colors.healthmultiplier > 0.75 then
E.db.unitframe.colors.healthMultiplier = 0.75
else
E.db.unitframe.colors.healthMultiplier = E.db.unitframe.colors.healthmultiplier
end
E.db.unitframe.colors.healthmultiplier = nil
end
--Tooltip FactionColors Setting
for i=1, 8 do
local oldTable = E.db.tooltip.factionColors[''..i]
......@@ -1772,14 +1777,6 @@ function E:DBConversions()
end
end
--Fix issue where UIScale was incorrectly stored as string
E.global.general.UIScale = tonumber(E.global.general.UIScale)
--Not sure how this one happens, but prevent it in any case
if E.global.general.UIScale <= 0 then
E.global.general.UIScale = G.general.UIScale
end
--v11 Nameplates Reset
if not E.db.v11NamePlateReset and E.private.nameplates.enable then
local styleFilters = E:CopyTable({}, E.db.nameplates.filters)
......@@ -1793,7 +1790,7 @@ end
local CPU_USAGE = {}
local function CompareCPUDiff(showall, minCalls)
local greatestUsage, greatestCalls, greatestName, newName, newFunc
local greatestDiff, lastModule, mod, newUsage, calls, differance = 0
local greatestDiff, lastModule, mod, usage, calls, diff = 0
for name, oldUsage in pairs(CPU_USAGE) do
newName, newFunc = strmatch(name, '^([^:]+):(.+)$')
......@@ -1804,19 +1801,19 @@ local function CompareCPUDiff(showall, minCalls)
mod = E:GetModule(newName, true) or E
lastModule = newName
end
newUsage, calls = GetFunctionCPUUsage(mod[newFunc], true)
differance = newUsage - oldUsage
usage, calls = GetFunctionCPUUsage(mod[newFunc], true)
diff = usage - oldUsage
if showall and (calls > minCalls) then
E:Print('Name('..name..') Calls('..calls..') Diff('..(differance > 0 and format('%.3f', differance) or 0)..')')
E:Print('Name('..name..') Calls('..calls..') MS('..(usage or 0)..') Diff('..(diff > 0 and format('%.3f', diff) or 0)..')')
end
if (differance > greatestDiff) and calls > minCalls then
greatestName, greatestUsage, greatestCalls, greatestDiff = name, newUsage, calls, differance
if (diff > greatestDiff) and calls > minCalls then
greatestName, greatestUsage, greatestCalls, greatestDiff = name, usage, calls, diff
end
end
end
if greatestName then
E:Print(greatestName.. ' had the CPU usage difference of: '..(greatestUsage > 0 and format('%.3f', greatestUsage) or 0)..'ms. And has been called '.. greatestCalls..' times.')
E:Print(greatestName.. ' had the CPU usage of: '..(greatestUsage > 0 and format('%.3f', greatestUsage) or 0)..'ms. And has been called '.. greatestCalls..' times.')
else
E:Print('CPU Usage: No CPU Usage differences found.')
end
......@@ -1940,9 +1937,8 @@ function E:Initialize()
self:DBConversions()
self:UIScale()
if not E.db.general.cropIcon then
E.TexCoords = {0, 1, 0, 1}
end
if not E.db.general.cropIcon then E.TexCoords = {0, 1, 0, 1} end
self:BuildPrefixValues()
self:LoadCommands() --Load Commands
self:InitializeModules() --Load Modules
......
......@@ -253,6 +253,7 @@ local blacklistedKeys = {
userInformedNewChanges1 = true,
general = {
UIScale = true,
locale = true,
version = true,
eyefinity = true,
ignoreScalePopup = true,
......
......@@ -41,12 +41,12 @@ function E:UpdateBlizzardFonts()
COMBAT = E.Media.Fonts.Invisible
end
--_G.NAMEPLATE_FONT = NAMEFONT
_G.UNIT_NAME_FONT = NAMEFONT
_G.DAMAGE_TEXT_FONT = COMBAT
_G.STANDARD_TEXT_FONT = NORMAL
if E.private.general.replaceBlizzFonts then
--_G.NAMEPLATE_FONT = NAMEFONT
_G.UNIT_NAME_FONT = NAMEFONT
_G.DAMAGE_TEXT_FONT = COMBAT
_G.STANDARD_TEXT_FONT = NORMAL
if self.private.general.replaceBlizzFonts then
--SetFont(_G.NumberFontNormal, LSM:Fetch('font', 'Homespun'), 10, 'MONOCHROMEOUTLINE', 1, 1, 1, 0, 0, 0)
--SetFont(_G.GameFontNormalSmall, NORMAL, 12, nil, nil, nil, nil, nil, nil, nil, unpack(E.media.rgbvaluecolor))
SetFont(_G.AchievementFont_Small, NORMAL, self.db.general.fontSize) -- Achiev dates
......
......@@ -6,6 +6,7 @@ local format = format
local tinsert = tinsert
local select, tonumber = select, tonumber
local next, max, wipe = next, max, wipe
local utf8sub = string.utf8sub
--WoW API / Variables
local UnitIsUnit = UnitIsUnit
local GetCVarBool = GetCVarBool
......@@ -33,7 +34,7 @@ function E:InspectGearSlot(line, lineText, enchantText, enchantColors, iLvl, ite
local itemLevel = lineText and lineText:match(MATCH_ITEM_LEVEL)
local enchant = lineText:match(MATCH_ENCHANT)
if enchant then
enchantText = enchant:sub(1, 18)
enchantText = utf8sub(enchant, 1, 18)
enchantColors = {lr, lg, lb}
end
if itemLevel then
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
--Lua functions
local tinsert, tremove, next = tinsert, tremove, next
local select, tonumber, assert, type, unpack = select, tonumber, assert, type, unpack
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
--WoW API / Variables
......@@ -13,65 +13,36 @@ local BreakUpLargeNumbers = BreakUpLargeNumbers
local GetScreenWidth, GetScreenHeight = GetScreenWidth, GetScreenHeight
local C_Timer_After = C_Timer.After
E.ShortPrefixValues = {}
E.ShortPrefixStyles = {
["CHINESE"] = {{1e8,"Y"}, {1e4,"W"}},
["ENGLISH"] = {{1e12,"T"}, {1e9,"B"}, {1e6,"M"}, {1e3,"K"}},
["GERMAN"] = {{1e12,"Bio"}, {1e9,"Mrd"}, {1e6,"Mio"}, {1e3,"Tsd"}},
["KOREAN"] = {{1e8,"억"}, {1e4,"만"}, {1e3,"천"}},
["METRIC"] = {{1e12,"T"}, {1e9,"G"}, {1e6,"M"}, {1e3,"k"}}
}
function E:BuildPrefixValues()
if next(E.ShortPrefixValues) then wipe(E.ShortPrefixValues) end
E.ShortPrefixValues = E:CopyTable(E.ShortPrefixValues, E.ShortPrefixStyles[E.db.general.numberPrefixStyle])
E.ShortValueDec = format("%%.%df", E.db.general.decimalLength or 1)
for _, style in ipairs(E.ShortPrefixValues) do
style[2] = E.ShortValueDec..style[2]
end
end
--Return short value of a number
function E:ShortValue(v)
local shortValueDec = format("%%.%df", E.db.general.decimalLength or 1)
local shortValue = abs(v)
if E.db.general.numberPrefixStyle == "METRIC" then
if shortValue >= 1e12 then
return format(shortValueDec.."T", v / 1e12)
elseif shortValue >= 1e9 then
return format(shortValueDec.."G", v / 1e9)
elseif shortValue >= 1e6 then
return format(shortValueDec.."M", v / 1e6)
elseif shortValue >= 1e3 then
return format(shortValueDec.."k", v / 1e3)
else
return format("%.0f", v)
end
elseif E.db.general.numberPrefixStyle == "CHINESE" then
if shortValue >= 1e8 then
return format(shortValueDec.."Y", v / 1e8)
elseif shortValue >= 1e4 then
return format(shortValueDec.."W", v / 1e4)
else
return format("%.0f", v)
end
elseif E.db.general.numberPrefixStyle == "KOREAN" then
if shortValue >= 1e8 then
return format(shortValueDec.."억", v / 1e8)
elseif shortValue >= 1e4 then
return format(shortValueDec.."만", v / 1e4)
elseif shortValue >= 1e3 then
return format(shortValueDec.."천", v / 1e3)
else
return format("%.0f", v)
end
elseif E.db.general.numberPrefixStyle == "GERMAN" then
if shortValue >= 1e12 then
return format(shortValueDec.."Bio", v / 1e12)
elseif shortValue >= 1e9 then
return format(shortValueDec.."Mrd", v / 1e9)
elseif shortValue >= 1e6 then
return format(shortValueDec.."Mio", v / 1e6)
elseif shortValue >= 1e3 then
return format(shortValueDec.."Tsd", v / 1e3)
else
return format("%.0f", v)
end
else
if shortValue >= 1e12 then
return format(shortValueDec.."T", v / 1e12)
elseif shortValue >= 1e9 then
return format(shortValueDec.."B", v / 1e9)
elseif shortValue >= 1e6 then
return format(shortValueDec.."M", v / 1e6)
elseif shortValue >= 1e3 then
return format(shortValueDec.."K", v / 1e3)
else
return format("%.0f", v)
local abs_v = v<0 and -v or v
for i=1, #E.ShortPrefixValues do
if abs_v >= E.ShortPrefixValues[i][1] then
return format(E.ShortPrefixValues[i][2], v / E.ShortPrefixValues[i][1])
end
end
return format("%.0f", v)
end
function E:IsEvenNumber(num)
......@@ -206,10 +177,6 @@ local gftStyles = {
}
function E:GetFormattedText(style, min, max)
assert(gftStyles[style], 'Invalid format style: '..style)
assert(min, 'You need to provide a current value. Usage: E:GetFormattedText(style, min, max)')
assert(max, 'You need to provide a maximum value. Usage: E:GetFormattedText(style, min, max)')
if max == 0 then max = 1 end
local gftUseStyle
......
......@@ -50,7 +50,6 @@ E.PopupDialogs.ELVUI_UPDATED_WHILE_RUNNING = {
self.button1:Hide()
end,
timeout = 0,
whileDead = 1,
}
......@@ -127,7 +126,6 @@ E.PopupDialogs.ELVUI_EDITBOX = {
self:ClearFocus()
end,
OnAccept = E.noop,
timeout = 0,
whileDead = 1,
preferredIndex = 3,
hideOnEscape = 1,
......@@ -159,7 +157,6 @@ E.PopupDialogs.CONFIRM_LOSE_BINDING_CHANGES = {
local isChecked = ElvUIBindPopupWindowCheckButton:GetChecked()
ElvUIBindPopupWindowCheckButton:SetChecked(not isChecked)
end,
timeout = 0,
whileDead = 1,
showAlert = 1,
};
......@@ -170,7 +167,6 @@ E.PopupDialogs.TUKUI_ELVUI_INCOMPATIBLE = {
OnCancel = function() DisableAddOn("Tukui"); ReloadUI() end,
button1 = 'ElvUI',
button2 = 'Tukui',
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -181,7 +177,6 @@ E.PopupDialogs.DISABLE_INCOMPATIBLE_ADDON = {
OnCancel = function() E:StaticPopup_Hide('DISABLE_INCOMPATIBLE_ADDON'); E:StaticPopup_Show('INCOMPATIBLE_ADDON', E.PopupDialogs.INCOMPATIBLE_ADDON.addon, E.PopupDialogs.INCOMPATIBLE_ADDON.module) end,
button1 = L["I Swear"],
button2 = DECLINE,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -195,7 +190,6 @@ E.PopupDialogs.INCOMPATIBLE_ADDON = {
E:StaticPopup_Hide('INCOMPATIBLE_ADDON')
E:StaticPopup_Show('DISABLE_INCOMPATIBLE_ADDON');
end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -208,7 +202,6 @@ E.PopupDialogs.UISCALE_CHANGE = {
button2 = CANCEL,
button3 = L["Preview Changes"],
OnAlt = function() E:PixelScaleChanged('UISCALE_CHANGE') end,
timeout = 0,
whileDead = 1,
hideOnEscape = false
}
......@@ -217,7 +210,6 @@ 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,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -226,7 +218,6 @@ 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,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -236,7 +227,6 @@ E.PopupDialogs.FAILED_UISCALE = {
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = function() E.global.general.autoScale = false; ReloadUI(); end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -246,7 +236,6 @@ E.PopupDialogs.CONFIG_RL = {
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = ReloadUI,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -256,7 +245,6 @@ E.PopupDialogs.GLOBAL_RL = {
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = ReloadUI,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -266,7 +254,6 @@ E.PopupDialogs.PRIVATE_RL = {
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = ReloadUI,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -296,7 +283,6 @@ E.PopupDialogs.RESET_UF_UNIT = {
E:Print(L["Error resetting UnitFrame."]);
end
end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -318,7 +304,6 @@ E.PopupDialogs.RESET_UF_AF = {
end
end
end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -337,7 +322,6 @@ E.PopupDialogs.RESET_NP_AF = {
end
end
end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -348,7 +332,6 @@ E.PopupDialogs.KEYBIND_MODE = {
button2 = L["Discard"],
OnAccept = function() AB:DeactivateBindMode(true) end,
OnCancel = function() AB:DeactivateBindMode(false) end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -376,21 +359,18 @@ E.PopupDialogs.BUY_BANK_SLOT = {
MoneyFrame_Update(self.moneyFrame, GetBankSlotCost())
end,
hasMoneyFrame = 1,
timeout = 0,
hideOnEscape = 1,
}
E.PopupDialogs.CANNOT_BUY_BANK_SLOT = {
text = L["Can't buy anymore slots!"],
button1 = ACCEPT,
timeout = 0,
whileDead = 1,
}
E.PopupDialogs.NO_BANK_BAGS = {
text = L["You must purchase a bank slot first!"],
button1 = ACCEPT,
timeout = 0,
whileDead = 1,
}
......@@ -401,7 +381,6 @@ E.PopupDialogs.RESETUI_CHECK = {
OnAccept = function()
E:ResetAllUI()
end,
timeout = 0,
whileDead = 1,
}
......@@ -416,7 +395,6 @@ E.PopupDialogs.HARLEM_SHAKE = {
return true
end
end,
timeout = 0,
whileDead = 1,
}
......@@ -426,7 +404,6 @@ E.PopupDialogs.HELLO_KITTY = {
OnAccept = function()
E:SetupHelloKitty()
end,
timeout = 0,
whileDead = 1,
}
......@@ -446,7 +423,6 @@ E.PopupDialogs.HELLO_KITTY_END = {
SetCVar("Sound_EnableAllSound", E.oldEnableAllSound)
SetCVar("Sound_EnableMusic", E.oldEnableMusic)
end,
timeout = 0,
whileDead = 1,
}
......@@ -455,7 +431,6 @@ E.PopupDialogs.DISBAND_RAID = {
button1 = ACCEPT,
button2 = CANCEL,
OnAccept = function() Misc:DisbandRaidGroup() end,
timeout = 0,
whileDead = 1,
}
......@@ -463,7 +438,6 @@ E.PopupDialogs.CONFIRM_LOOT_DISTRIBUTION = {
text = CONFIRM_LOOT_DISTRIBUTION,
button1 = YES,
button2 = NO,
timeout = 0,
hideOnEscape = 1,
}
......@@ -471,7 +445,6 @@ E.PopupDialogs.RESET_PROFILE_PROMPT = {
text = L["Are you sure you want to reset all the settings on this profile?"],
button1 = YES,
button2 = NO,
timeout = 0,
hideOnEscape = 1,
OnAccept = function() E:ResetProfile() end,
}
......@@ -479,7 +452,6 @@ E.PopupDialogs.RESET_PROFILE_PROMPT = {
E.PopupDialogs.WARNING_BLIZZARD_ADDONS = {
text = L["It appears one of your AddOns have disabled the AddOn Blizzard_CompactRaidFrames. This can cause errors and other issues. The AddOn will now be re-enabled."],
button1 = OKAY,
timeout = 0,
hideOnEscape = false,
OnAccept = function() EnableAddOn("Blizzard_CompactRaidFrames"); ReloadUI(); end,
}
......@@ -529,7 +501,6 @@ E.PopupDialogs.APPLY_FONT_WARNING = {
OnCancel = function() E:StaticPopup_Hide('APPLY_FONT_WARNING'); end,
button1 = YES,
button2 = CANCEL,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -537,7 +508,6 @@ E.PopupDialogs.APPLY_FONT_WARNING = {
E.PopupDialogs.MODULE_COPY_CONFIRM = {
button1 = ACCEPT,
button2 = CANCEL,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -572,7 +542,6 @@ E.PopupDialogs.UI_SCALE_CHANGES_INFORM = {
end
end)
end,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -587,7 +556,6 @@ E.PopupDialogs.SCRIPT_PROFILE = {
end,
OnCancel = E.noop,
showAlert = 1,
timeout = 0,
whileDead = 1,
hideOnEscape = false,
}
......@@ -639,7 +607,6 @@ E.PopupDialogs.MAJOR_RELEASE_NAMEPLATES = {
self:GetParent():Hide();
end
end,
timeout = 0,
whileDead = true,
hideOnEscape = false,
showAlert = true,
......@@ -808,41 +775,43 @@ function E:StaticPopup_OnHide()
end
function E:StaticPopup_OnUpdate(elapsed)
if ( self.timeleft and self.timeleft > 0 ) then
local which = self.which;
local timeleft = self.timeleft - elapsed;
if ( timeleft <= 0 ) then
if ( not E.PopupDialogs[which].timeoutInformationalOnly ) then
self.timeleft = 0;
local OnCancel = E.PopupDialogs[which].OnCancel;
if ( OnCancel ) then
OnCancel(self, self.data, "timeout");
local info = E.PopupDialogs[self.which]
if self.timeleft and self.timeleft > 0 then