Commit 5d32e948 authored by Simpy's avatar Simpy 🐹

11.45

parent f95f9370
......@@ -311,7 +311,6 @@ function E:UpdateMedia()
--Value Color
local value = E.db.general.valuecolor
if E:CheckClassColor(value.r, value.g, value.b) then
value = E:ClassColor(E.myclass, true)
E.db.general.valuecolor.r = value.r
......@@ -319,9 +318,19 @@ function E:UpdateMedia()
E.db.general.valuecolor.b = value.b
end
--Chat Tab Selector Color
local selectorColor = E.db.chat.tabSelectorColor
if E:CheckClassColor(selectorColor.r, selectorColor.g, selectorColor.b) then
selectorColor = E:ClassColor(E.myclass, true)
E.db.chat.tabSelectorColor.r = selectorColor.r
E.db.chat.tabSelectorColor.g = selectorColor.g
E.db.chat.tabSelectorColor.b = selectorColor.b
end
E.media.hexvaluecolor = E:RGBToHex(value.r, value.g, value.b)
E.media.rgbvaluecolor = {value.r, value.g, value.b}
-- Chat Panel Background Texture
local LeftChatPanel, RightChatPanel = _G.LeftChatPanel, _G.RightChatPanel
if LeftChatPanel and LeftChatPanel.tex and RightChatPanel and RightChatPanel.tex then
LeftChatPanel.tex:SetTexture(E.db.chat.panelBackdropNameLeft)
......@@ -528,6 +537,9 @@ function E:CheckIncompatible()
if E:IsAddOnEnabled('Plater') then
E:IncompatibleAddOn('Plater', 'NamePlates')
end
if E:IsAddOnEnabled('Kui_Nameplates') then
E:IncompatibleAddOn('Kui_Nameplates', 'NamePlates')
end
end
if E.private.actionbar.enable then
......@@ -537,20 +549,18 @@ function E:CheckIncompatible()
end
end
function E:CopyTable(currentTable, defaultTable)
if type(currentTable) ~= 'table' then currentTable = {} end
if type(defaultTable) == 'table' then
for option, value in pairs(defaultTable) do
if type(value) == 'table' then
value = E:CopyTable(currentTable[option], value)
end
function E:CopyTable(current, default)
if type(current) ~= 'table' then
current = {}
end
currentTable[option] = value
if type(default) == 'table' then
for option, value in pairs(default) do
current[option] = (type(value) == 'table' and E:CopyTable(current[option], value)) or value
end
end
return currentTable
return current
end
function E:RemoveEmptySubTables(tbl)
......@@ -1649,6 +1659,7 @@ function E:Initialize()
E.data.RegisterCallback(E, 'OnProfileReset', 'OnProfileReset')
E.charSettings = E.Libs.AceDB:New('ElvPrivateDB', E.privateVars)
E.charSettings.RegisterCallback(E, 'OnProfileChanged', ReloadUI)
E.charSettings.RegisterCallback(E, 'OnProfileCopied', ReloadUI)
E.charSettings.RegisterCallback(E, 'OnProfileReset', 'OnPrivateProfileReset')
E.private = E.charSettings.profile
E.global = E.data.global
......
......@@ -289,6 +289,9 @@ D.GeneratedKeys = {
nameplates = { -- this is supposed to have an 's' because yeah, oh well
filters = true
},
datatexts = {
panels = true,
},
unitframe = {
units = {} -- required for the scope below for customTexts
}
......
......@@ -543,7 +543,7 @@ function E:SetPage(PageNum)
f.SubTitle:SetText(L["CVars"])
f.Desc1:SetText(L["This part of the installation process sets up your World of Warcraft default options it is recommended you should do this step for everything to behave properly."])
f.Desc2:SetText(L["Please click the button below to setup your CVars."])
f.Desc3:SetText(L["Importance: |cff07D400High|r"])
f.Desc3:SetText(L["Importance: |cffFF3333High|r"])
InstallOption1Button:Show()
InstallOption1Button:SetScript('OnClick', function() E:SetupCVars() end)
InstallOption1Button:SetText(L["Setup CVars"])
......@@ -590,7 +590,7 @@ function E:SetPage(PageNum)
f.SubTitle:SetText(L["Theme Setup"])
f.Desc1:SetText(L["Choose a theme layout you wish to use for your initial setup."])
f.Desc2:SetText(L["You can always change fonts and colors of any element of ElvUI from the in-game configuration."])
f.Desc3:SetText(L["Importance: |cffFF0000Low|r"])
f.Desc3:SetText(L["Importance: |cFF33FF33Low|r"])
InstallOption1Button:Show()
InstallOption1Button:SetScript('OnClick', function() E:SetupTheme('classic') end)
InstallOption1Button:SetText(L["Classic"])
......@@ -636,7 +636,7 @@ function E:SetPage(PageNum)
InstallOption2Button:SetScript('OnClick', E.PixelScaleChanged)
InstallOption2Button:SetText(L["Preview"])
f.Desc3:SetText(L["Importance: |cff07D400High|r"])
f.Desc3:SetText(L["Importance: |cffFF3333High|r"])
elseif PageNum == 8 then
f.SubTitle:SetText(L["Layout"])
f.Desc1:SetText(L["You can now choose what layout you wish to use based on your combat role."])
......
......@@ -351,17 +351,15 @@ for textFormat in pairs(E.GetFormattedTextStyles) do
ElvUF.Tags.Events[format('power:%s', tagTextFormat)] = 'UNIT_DISPLAYPOWER UNIT_POWER_FREQUENT UNIT_MAXPOWER'
ElvUF.Tags.Methods[format('power:%s', tagTextFormat)] = function(unit)
if UnitIsPlayer(unit) then
local powerType = UnitPowerType(unit)
local min = UnitPower(unit, powerType)
if min ~= 0 and tagTextFormat ~= 'deficit' then
return E:GetFormattedText(textFormat, min, UnitPowerMax(unit, powerType))
end
local powerType = UnitPowerType(unit)
local min = UnitPower(unit, powerType)
if min ~= 0 and tagTextFormat ~= 'deficit' then
return E:GetFormattedText(textFormat, min, UnitPowerMax(unit, powerType))
end
end
ElvUF.Tags.Events[format('mana:%s', tagTextFormat)] = 'UNIT_POWER_FREQUENT UNIT_MAXPOWER UNIT_DISPLAYPOWER'
ElvUF.Tags.Methods[format('mana:%s', tagTextFormat)] = function(unit)
ElvUF.Tags.Events[format('additionalmana:%s', tagTextFormat)] = 'UNIT_POWER_FREQUENT UNIT_MAXPOWER UNIT_DISPLAYPOWER'
ElvUF.Tags.Methods[format('additionalmana:%s', tagTextFormat)] = function(unit)
local barIndex = _G.ADDITIONAL_POWER_BAR_INDEX == 0 and _G.ALT_MANA_BAR_PAIR_DISPLAY_INFO[E.myclass]
if barIndex and barIndex[UnitPowerType(unit)] then
local min = UnitPower(unit, SPELL_POWER_MANA)
......@@ -371,6 +369,14 @@ for textFormat in pairs(E.GetFormattedTextStyles) do
end
end
ElvUF.Tags.Events[format('mana:%s', tagTextFormat)] = 'UNIT_POWER_FREQUENT UNIT_MAXPOWER UNIT_DISPLAYPOWER'
ElvUF.Tags.Methods[format('mana:%s', tagTextFormat)] = function(unit)
local min = UnitPower(unit, SPELL_POWER_MANA)
if min ~= 0 and tagTextFormat ~= 'deficit' then
return E:GetFormattedText(textFormat, min, UnitPowerMax(unit, SPELL_POWER_MANA))
end
end
ElvUF.Tags.Events[format('classpower:%s', tagTextFormat)] = (E.myclass == 'MONK' and 'UNIT_AURA ' or E.myclass == 'DEATHKNIGHT' and 'RUNE_POWER_UPDATE ' or '') .. 'UNIT_POWER_FREQUENT UNIT_DISPLAYPOWER'
ElvUF.Tags.Methods[format('classpower:%s', tagTextFormat)] = function()
local min, max = GetClassPower(E.myclass)
......@@ -522,19 +528,15 @@ end
ElvUF.Tags.Events['namecolor'] = 'UNIT_NAME_UPDATE UNIT_FACTION INSTANCE_ENCOUNTER_ENGAGE_UNIT'
ElvUF.Tags.Methods['namecolor'] = function(unit)
local unitReaction = UnitReaction(unit, 'player')
local unitPlayer = UnitIsPlayer(unit)
if unitPlayer then
if UnitIsPlayer(unit) then
local _, unitClass = UnitClass(unit)
local class = ElvUF.colors.class[unitClass]
if not class then return end
return Hex(class[1], class[2], class[3])
elseif unitReaction then
local reaction = ElvUF.colors.reaction[unitReaction]
return Hex(reaction[1], reaction[2], reaction[3])
if class then
return Hex(class[1], class[2], class[3])
end
else
return '|cFFC2C2C2'
local color = ElvUF.colors.reaction[UnitReaction(unit, 'player')]
return (color and Hex(color[1], color[2], color[3])) or '|cFFC2C2C2'
end
end
......@@ -1207,6 +1209,12 @@ E.TagInfo = {
--Mana
['curmana'] = { category = 'Mana', description = "Displays the current mana without decimals" },
['maxmana'] = { category = 'Mana', description = "Displays the max amount of mana the unit can have" },
['additionalmana:current'] = { category = 'Mana', description = "Displays the unit's current additional mana" },
['additionalmana:current-max'] = { category = 'Mana', description = "Displays the unit's current and maximum additional mana, separated by a dash" },
['additionalmana:current-max-percent'] = { category = 'Mana', description = "Displays the current and max additional mana of the unit, separated by a dash (% when not full)" },
['additionalmana:current-percent'] = { category = 'Mana', description = "Displays the current additional mana of the unit and % when not full" },
['additionalmana:deficit'] = { category = 'Mana', description = "Displays the player's additional mana as a deficit" },
['additionalmana:percent'] = { category = 'Mana', description = "Displays the player's additional mana as a percentage" },
['mana:current'] = { category = 'Mana', description = "Displays the unit's current mana" },
['mana:current-max'] = { category = 'Mana', description = "Displays the unit's current and maximum mana, separated by a dash" },
['mana:current-max-percent'] = { category = 'Mana', description = "Displays the current and max mana of the unit, separated by a dash (% when not full)" },
......
## Interface: 80300
## Author: Elv, Simpy
## Version: 11.44
## Version: 11.45
## Title: |cff1784d1ElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -208,8 +208,9 @@ local function Update(self, event, unit)
end
local cur, max = UnitPower(unit, displayType), UnitPowerMax(unit, displayType)
if not min then min = 0 end
element:SetMinMaxValues(min or 0, max)
element:SetMinMaxValues(min, max)
if not UnitIsConnected(unit) then
element:SetValue(max)
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "Nur Symbole"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "Wenn du ausversehen das Chatfenster entfernen solltest, kannst du ganz einfach in die Ingame-Konfiguration gehen und den Installationsprozess erneut aufrufen. Drücke Installieren und gehe zu den Chateinstellungen und setze diese zurück."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "Wenn du Probleme mit ElvUI hast, deaktiviere alle Addons außer ElvUI. Denke auch daran, dass ElvUI die komplette Benutzeroberfläche ersetzt, d.h. du kannst kein Addon verwenden, welches die gleichen Funktionen wie ElvUI nutzt."
L["IL"] = "IL"
L["Importance: |cff07D400High|r"] = "Bedeutung: |cff07D400Hoch|r"
L["Importance: |cffFF3333High|r"] = "Bedeutung: |cffFF3333Hoch|r"
L["Importance: |cffD3CF00Medium|r"] = "Bedeutung: |cffD3CF00Mittel|r"
L["Importance: |cffFF0000Low|r"] = "Bedeutung: |cffD3CF00Niedrig|r"
L["Importance: |cFF33FF33Low|r"] = "Bedeutung: |cffD3CF00Niedrig|r"
L["In Progress"] = "In Bearbeitung"
L["INCOMPATIBLE_ADDON"] = "Das Addon %s ist nicht mit dem ElvUI %s Modul kompatibel. Bitte deaktiviere entweder das Addon oder deaktiviere das ElvUI Modul."
L["Installation Complete"] = "Installation komplett"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = true
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = true
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = true
L["IL"] = true
L["Importance: |cff07D400High|r"] = true
L["Importance: |cffFF3333High|r"] = true
L["Importance: |cffD3CF00Medium|r"] = true
L["Importance: |cffFF0000Low|r"] = true
L["Importance: |cFF33FF33Low|r"] = true
L["In Progress"] = true
L["INCOMPATIBLE_ADDON"] = "The addon %s is not compatible with ElvUI's %s module. Please select either the addon or the ElvUI module to disable."
L["Installation Complete"] = true
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "Sólo Iconos"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "Si eliminas un marco de chat accidentalmente, siempre puedes ir a la configuración, pulsar instalar, ir a la parte del chat, y restaurarlo."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "Si has experimentado errores con ElvUI prueba a desactivar todos tus addons excepto ElvUI, recuerda que ElvUI remplaza por completo la interfaz, no puede haber addons que hagan lo mismo."
L["IL"] = "LI"
L["Importance: |cff07D400High|r"] = "Importancia: |cff07D400Alta|r"
L["Importance: |cffFF3333High|r"] = "Importancia: |cffFF3333Alta|r"
L["Importance: |cffD3CF00Medium|r"] = "Importancia: |cffD3CF00Media|r"
L["Importance: |cffFF0000Low|r"] = "Importancia: |cffFF0000Baja|r"
L["Importance: |cFF33FF33Low|r"] = "Importancia: |cFF33FF33Baja|r"
L["In Progress"] = "En Progreso"
L["INCOMPATIBLE_ADDON"] = "The addon %s is not compatible with ElvUI's %s module. Please select either the addon or the ElvUI module to disable."
L["Installation Complete"] = "Instalación Completa"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "Icônes seulement"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "Si vous supprimez accidentellement un cadre de discussion, vous pouvez toujours aller dans le menu de configuration d'ElvUI. Cliquez ensuite sur Installation puis passez à l'étape concernant les fenêtres de discussion pour remettre à zéro les paramètres."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "Si vous rencontrez des problèmes avec ElvUI, essayez de désactiver tous vos addons sauf ElvUI. Rappelez-vous qu'ElvUi est une interface utilisateur complète et que vous ne pouvez pas exécuter deux addons qui font la même chose."
L["IL"] = "IL"
L["Importance: |cff07D400High|r"] = "Importance : |cff07D400Haute|r"
L["Importance: |cffFF3333High|r"] = "Importance : |cffFF3333Haute|r"
L["Importance: |cffD3CF00Medium|r"] = "Importance : |cffD3CF00Moyenne|r"
L["Importance: |cffFF0000Low|r"] = "Importance : |cffFF0000Faible|r"
L["Importance: |cFF33FF33Low|r"] = "Importance : |cFF33FF33Faible|r"
L["In Progress"] = "En cours"
L["INCOMPATIBLE_ADDON"] = "L'addon %s n'est pas compatible avec le module %s d'ElvUI. Merci de sélectionner soit l'addon, soit le module d'ElvUI, pour le désactiver."
L["Installation Complete"] = "Installation terminée"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = true
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "Se rimuovi accidentalmente un frame di chat, puoi sempre accedere al menu di configurazione in-game, premere installa, andare alla sezione chat e ripristinarli."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "Se riscontri problemi con ElvUI, prova a disabilitare tutti i componenti aggiuntivi tranne ElvUI, ricordati che ElvUI è un componente aggiuntivo di sostituzione dell'interfaccia utente completo, non è possibile eseguire due componenti aggiuntivi che fanno la stessa cosa."
L["IL"] = true
L["Importance: |cff07D400High|r"] = true
L["Importance: |cffFF3333High|r"] = true
L["Importance: |cffD3CF00Medium|r"] = true
L["Importance: |cffFF0000Low|r"] = true
L["Importance: |cFF33FF33Low|r"] = true
L["In Progress"] = true
L["INCOMPATIBLE_ADDON"] = "The addon %s is not compatible with ElvUI's %s module. Please select either the addon or the ElvUI module to disable."
L["Installation Complete"] = "Installazione Completata"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "아이콘만 표시"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "ElvUI 에서 지원하는 대부분의 기능은 |cff2eb7e4/ec|r 에서 조정이 가능합니다. 하고 싶은 조절 기능이 없다면 직접 lua수정으로 고쳐야 합니다."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "ElvUI에서 지원하는 기능과 겹치는 다른 애드온을 쓰고 싶으면 ElvUI 설정에서 해당 기능을 사용 체크해제 해야합니다. (예: Bartender, Dominos)"
L["IL"] = "인스장"
L["Importance: |cff07D400High|r"] = "중요도: |cff07D400높음|r"
L["Importance: |cffFF3333High|r"] = "중요도: |cffFF3333높음|r"
L["Importance: |cffD3CF00Medium|r"] = "중요도: |cffD3CF00보통|r"
L["Importance: |cffFF0000Low|r"] = "중요도 : |cffFF0000낮음|r"
L["Importance: |cFF33FF33Low|r"] = "중요도 : |cFF33FF33낮음|r"
L["In Progress"] = "진행 중"
L["INCOMPATIBLE_ADDON"] = "%s 애드온의 기능이 ElvUI의 %s 모듈과 상충됩니다. 그 애드온을 쓰지 않거나 ElvUI의 기능을 사용해제하세요."
L["Installation Complete"] = "설치 완료"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "Apenas Ícones"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "Se acidentalmente remover um quadro de conversação você pode sempre ir ao menu de configuração em jogo, pressionar instalar, ir até a etapa de bate-papo e os restaurar."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "Se estiver a ter problemas com a ElvUI tente desativar todos os addons exceto a ElvUI, lembre-se que a ElvUI é um addon de substituição de interface completo, e não se consegue executar dois addons que fazem a mesma coisa."
L["IL"] = "IL"
L["Importance: |cff07D400High|r"] = "Importância: |cff07D400Alta|r"
L["Importance: |cffFF3333High|r"] = "Importância: |cffFF3333Alta|r"
L["Importance: |cffD3CF00Medium|r"] = "Importância: |cffD3CF00Média|r"
L["Importance: |cffFF0000Low|r"] = "Importância: |cffFF0000Baixa|r"
L["Importance: |cFF33FF33Low|r"] = "Importância: |cFF33FF33Baixa|r"
L["In Progress"] = true
L["INCOMPATIBLE_ADDON"] = "The addon %s is not compatible with ElvUI's %s module. Please select either the addon or the ElvUI module to disable."
L["Installation Complete"] = "Instalação Completa"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "Только иконки"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "Если Вы случайно удалили вкладку чата, всегда можно сделать следующее: зайти в конфигурацию, запустить установку, дойти до шага настроек чата и сбросить их."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "Если Вы испытываете проблемы с ElvUI, попробуйте отключить все аддоны, кроме самого ElvUI. Помните, ElvUI это аддон, полностью заменяющий интерфейс, Вы не можете одновременно использовать два аддона, выполняющих одинаковые функции."
L["IL"] = "ЛП"
L["Importance: |cff07D400High|r"] = "Важность: |cff07D400Высокая|r"
L["Importance: |cffFF3333High|r"] = "Важность: |cffFF3333Высокая|r"
L["Importance: |cffD3CF00Medium|r"] = "Важность: |cffD3CF00Средняя|r"
L["Importance: |cffFF0000Low|r"] = "Важность: |cffFF0000Низкая|r"
L["Importance: |cFF33FF33Low|r"] = "Важность: |cFF33FF33Низкая|r"
L["In Progress"] = "В процессе"
L["INCOMPATIBLE_ADDON"] = "Аддон %s не совместим с модулем %s ElvUI. Пожалуйста, выберите отключить ли несовместимый аддон или модуль."
L["Installation Complete"] = "Установка завершена"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "图标"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "如果你不慎移除了对话框, 你可以重新安装一次重置他们."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "如果你遇到问题, ElvUI会尝试禁用你除了ElvUI之外的插件. 请记住你不能用不同的插件实现同一功能."
L["IL"] = "副本领袖"
L["Importance: |cff07D400High|r"] = "重要度: |cff07D400高|r"
L["Importance: |cffFF3333High|r"] = "重要度: |cffFF3333高|r"
L["Importance: |cffD3CF00Medium|r"] = "重要性: |cffD3CF00中|r"
L["Importance: |cffFF0000Low|r"] = "重要性:|cffFF0000低|r"
L["Importance: |cFF33FF33Low|r"] = "重要性:|cFF33FF33低|r"
L["In Progress"] = "正在进行中"
L["INCOMPATIBLE_ADDON"] = "插件 %s 不相容于 ElvUI 的 %s 模组, 请停用不相容的插件, 或停用模组."
L["Installation Complete"] = "安装完成"
......
......@@ -157,9 +157,9 @@ L["Icons Only"] = "圖示"
L["If you accidently remove a chat frame you can always go the in-game configuration menu, press install, go to the chat portion and reset them."] = "如果你不慎移除了對話框, 你可以重新安裝一次重置他們."
L["If you are experiencing issues with ElvUI try disabling all your addons except ElvUI, remember ElvUI is a full UI replacement addon, you cannot run two addons that do the same thing."] = "如果你使用 ElvUI 時遇到問題, 請嘗試停用除了ElvUI之外的插件. 請記住ElvUI是一套全套的UI替換插件, 你不能同時使用不同的插件來完成同一件事."
L["IL"] = "副本隊長"
L["Importance: |cff07D400High|r"] = "重要性: |cff07D400高|r"
L["Importance: |cffFF3333High|r"] = "重要性: |cffFF3333高|r"
L["Importance: |cffD3CF00Medium|r"] = "重要性: |cffD3CF00中|r"
L["Importance: |cffFF0000Low|r"] = "重要性: |cffFF0000低|r"
L["Importance: |cFF33FF33Low|r"] = "重要性: |cFF33FF33低|r"
L["In Progress"] = "進行中"
L["INCOMPATIBLE_ADDON"] = "插件 %s 與 ElvUI 的 %s 模組不相容。請停用不相容的插件, 或停用相關的模組."
L["Installation Complete"] = "安裝完畢"
......
......@@ -63,6 +63,8 @@ function B:PositionAltPowerBar()
_G.PlayerPowerBarAlt:ClearAllPoints()
_G.PlayerPowerBarAlt:Point('CENTER', holder, 'CENTER')
_G.PlayerPowerBarAlt:SetParent(holder)
_G.PlayerPowerBarAlt:SetMovable(true)
_G.PlayerPowerBarAlt:SetUserPlaced(true)
_G.UIPARENT_MANAGED_FRAME_POSITIONS.PlayerPowerBarAlt = nil
E:CreateMover(holder, 'AltPowerBarMover', L["Alternative Power"], nil, nil, nil, nil, nil, 'general,alternativePowerGroup')
......
......@@ -980,8 +980,8 @@ function CH:UpdateChatTab(chat)
local fadeLeft, fadeRight
if CH.db.fadeTabsNoBackdrop then
local both = CH.db.panelBackdrop == 'HIDEBOTH'
fadeLeft = (both or CH.db.panelBackdrop == 'LEFT')
fadeRight = (both or CH.db.panelBackdrop == 'RIGHT')
fadeLeft = (both or CH.db.panelBackdrop == 'RIGHT')
fadeRight = (both or CH.db.panelBackdrop == 'LEFT')
end
if chat == CH.LeftChatWindow then
......
......@@ -18,9 +18,7 @@ end
local function ValueColorUpdate(hex)
displayString = strjoin("", "%s: ", hex, "%.f|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if lastPanel then OnEvent(lastPanel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
......
......@@ -44,9 +44,7 @@ end
local function ValueColorUpdate(hex)
displayString = strjoin("", "%s", hex, "%d|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if lastPanel then OnEvent(lastPanel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
......
......@@ -89,34 +89,24 @@ end
local function OnEnter(self)
DT:SetupTooltip(self)
if targetlv > 1 then
DT.tooltip:AddDoubleLine(L["Avoidance Breakdown"], strjoin("", " (", L["lvl"], " ", targetlv, ")"))
elseif targetlv == -1 then
DT.tooltip:AddDoubleLine(L["Avoidance Breakdown"], strjoin("", " (", BOSS, ")"))
else
DT.tooltip:AddDoubleLine(L["Avoidance Breakdown"], strjoin("", " (", L["lvl"], " ", playerlv, ")"))
end
DT.tooltip:AddLine' '
DT.tooltip:AddDoubleLine(DODGE_CHANCE, format(chanceString, dodge),1,1,1)
DT.tooltip:AddDoubleLine(PARRY_CHANCE, format(chanceString, parry),1,1,1)
DT.tooltip:AddDoubleLine(BLOCK_CHANCE, format(chanceString, block),1,1,1)
DT.tooltip:AddDoubleLine(MISS_CHANCE, format(chanceString, basemisschance),1,1,1)
local rightString = targetlv > 1 and strjoin('', ' (', L['lvl'], ' ', targetlv, ')') or targetlv == -1 and strjoin('', ' (', BOSS, ')') or strjoin('', ' (', L['lvl'], ' ', playerlv, ')')
DT.tooltip:AddDoubleLine(L["Avoidance Breakdown"], rightString)
DT.tooltip:AddLine(' ')
if unhittable > 0 then
DT.tooltip:AddDoubleLine(L["Unhittable:"], '+'..format(chanceString, unhittable), 1, 1, 1, 0, 1, 0)
else
DT.tooltip:AddDoubleLine(L["Unhittable:"], format(chanceString, unhittable), 1, 1, 1, 1, 0, 0)
end
DT.tooltip:AddDoubleLine(DODGE_CHANCE, format(chanceString, dodge), 1, 1, 1)
DT.tooltip:AddDoubleLine(PARRY_CHANCE, format(chanceString, parry), 1, 1, 1)
DT.tooltip:AddDoubleLine(BLOCK_CHANCE, format(chanceString, block), 1, 1, 1)
DT.tooltip:AddDoubleLine(MISS_CHANCE, format(chanceString, basemisschance), 1, 1, 1)
DT.tooltip:AddLine(' ')
DT.tooltip:AddDoubleLine(L["Unhittable:"], (unhittable > 0 and '+' or '')..format(chanceString, unhittable), 1, 1, 1, (unhittable < 0 and 1 or 0), (unhittable > 0 and 1 or 0), 0)
DT.tooltip:Show()
end
local function ValueColorUpdate(hex)
displayString = strjoin("", "%s", hex, "%.2f%%|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if lastPanel then OnEvent(lastPanel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
......
......@@ -69,9 +69,7 @@ end
local function ValueColorUpdate(hex)
displayString = strjoin("", "%s", hex, "%d/%d|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if lastPanel then OnEvent(lastPanel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
......
......@@ -78,9 +78,7 @@ end
local function ValueColorUpdate(hex)
NOBONUSREWARDS = BATTLEGROUND_HOLIDAY..": "..hex.."N/A|r"
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if lastPanel then OnEvent(lastPanel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
......
......@@ -51,9 +51,7 @@ end
local function ValueColorUpdate(hex)
displayString = strjoin("", "%s: ", hex, "%s|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if lastPanel then OnEvent(lastPanel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
......
......@@ -2,31 +2,19 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local DT = E:GetModule('DataTexts')
local _G = _G
local pairs, strfind, strjoin = pairs, strfind, strjoin
local GetAddOnInfo = GetAddOnInfo
local GetAddOnMetadata = GetAddOnMetadata
local GetNumAddOns = GetNumAddOns
local pairs, strjoin = pairs, strjoin
local IsShiftKeyDown = IsShiftKeyDown
local ReloadUI = ReloadUI
local InCombatLockdown = InCombatLockdown
local displayString = ""
local configText = "ElvUI"
local displayString = ''
local configText = 'ElvUI'
local reloadText = RELOADUI
local plugins, lastPanel
local lastPanel
local function OnEvent(self)
lastPanel = self
for i = 1, GetNumAddOns() do
local name, _, _, enabled = GetAddOnInfo(i)
if enabled and strfind(name, "ElvUI") and not (name == "ElvUI") then
plugins = plugins or {}
local version = GetAddOnMetadata(i, "version")
plugins[name] = version
end
end
self.text:SetFormattedText(displayString, configText)
end
......@@ -35,11 +23,16 @@ local function OnEnter(self)
DT.tooltip:AddDoubleLine(L["Left Click:"], L["Toggle Configuration"], 1, 1, 1)
DT.tooltip:AddDoubleLine(L["Hold Shift + Right Click:"], reloadText, 1, 1, 1)
if plugins then
DT.tooltip:AddLine(" ")
DT.tooltip:AddDoubleLine("Plugins:", "Version:")
for plugin, version in pairs(plugins) do
DT.tooltip:AddDoubleLine(plugin, version, 1, 1, 1, 1, 1, 1)
if E.Libs.EP.registeredPrefix then
DT.tooltip:AddLine(' ')
DT.tooltip:AddDoubleLine('Plugins:', 'Version:')
for _, plugin in pairs(E.Libs.EP.plugins) do
if not plugin.isLib then
local r, g, b = E:HexToRGB(plugin.old and 'ff3333' or '33ff33')
DT.tooltip:AddDoubleLine(plugin.title, plugin.version, 1, 1, 1, r/255, g/255, b/255)
end
end
end
......@@ -48,17 +41,17 @@ end
local function Click(_, button)
if InCombatLockdown() then _G.UIErrorsFrame:AddMessage(E.InfoColor.._G.ERR_NOT_IN_COMBAT) return end
if button == "LeftButton" or (button == "RightButton" and not IsShiftKeyDown()) then
if button == 'LeftButton' or (button == 'RightButton' and not IsShiftKeyDown()) then
E:ToggleOptionsUI()
elseif button == "RightButton" and IsShiftKeyDown() then
elseif button == 'RightButton' and IsShiftKeyDown() then
ReloadUI()
end
end
local function ValueColorUpdate(hex)
displayString = strjoin("", hex, "%s|r")
displayString = strjoin('', hex, '%s|r')
if lastPanel ~= nil then
if lastPanel then
OnEvent(lastPanel, 'ELVUI_COLOR_UPDATE')
end
end
......
......@@ -67,9 +67,7 @@ end
local function ValueColorUpdate(hex)
displayString = strjoin("", "%s: ", hex, "%.2f%%|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
if lastPanel then OnEvent(lastPanel) end
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
......
......@@ -2,6 +2,7 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local DT = E:GetModule('DataTexts')
local _G = _G
local type = type
local format, pairs, tonumber = format, pairs, tonumber
local BreakUpLargeNumbers = BreakUpLargeNumbers
local GetBackpackCurrencyInfo = GetBackpackCurrencyInfo
......@@ -12,61 +13,68 @@ local BONUS_ROLL_REWARD_MONEY = BONUS_ROLL_REWARD_MONEY
local EXPANSION_NAME7 = EXPANSION_NAME7
local OTHER = OTHER
local iconString = "|T%s:16:16:0:0:64:64:4:60:4:60|t"
local iconString = '|T%s:16:16:0:0:64:64:4:60:4:60|t'
DT.CurrencyList = { GOLD = BONUS_ROLL_REWARD_MONEY, BACKPACK = 'Backpack' }
local function OnClick()
_G.ToggleCharacter("TokenFrame")
_G.ToggleCharacter('TokenFrame')
end
local function GetInfo(id)
local name, num, icon = GetCurrencyInfo(id)
return num, name, (icon and format(iconString, icon)) or '136012'
return name, num, (icon and format(iconString, icon)) or '136012'
end
local function AddInfo(id)
local num, name, icon = GetInfo(id)
DT.tooltip:AddDoubleLine(format('%s %s', icon, name), BreakUpLargeNumbers(num), 1, 1, 1, 1, 1, 1)
local name, num, icon = GetInfo(id)
if name then
DT.tooltip:AddDoubleLine(format('%s %s', icon, name), BreakUpLargeNumbers(num), 1, 1, 1, 1, 1, 1)
end
end
local goldText
local function OnEvent(self)
goldText = E:FormatMoney(GetMoney(), E.db.datatexts.goldFormat or "BLIZZARD", not E.db.datatexts.goldCoins)
goldText = E:FormatMoney(GetMoney(), E.db.datatexts.goldFormat or 'BLIZZARD', not E.db.datatexts.goldCoins)