diff --git a/api/config.lua b/api/config.lua index 67bfad3b..099a19e9 100644 --- a/api/config.lua +++ b/api/config.lua @@ -752,7 +752,11 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1") pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0") + pfUI:UpdateConfig("castbar", "player", "width", "-1") + pfUI:UpdateConfig("castbar", "player", "height", "-1") pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0") + pfUI:UpdateConfig("castbar", "target", "width", "-1") + pfUI:UpdateConfig("castbar", "target", "height", "-1") pfUI:UpdateConfig("castbar", nil, "use_unitfonts", "0") pfUI:UpdateConfig("tooltip", nil, "position", "chat") diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index 92eae164..71a5eb54 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -71,6 +71,7 @@ pfUI_translation["deDE"] = { ["Cache"] = nil, ["Castbar"] = nil, ["Castbar Height"] = nil, + ["Castbar Width"] = nil, ["Casting Color"] = nil, ["Center"] = nil, ["Center Text"] = nil, @@ -155,10 +156,10 @@ pfUI_translation["deDE"] = { ["Disable Item Quality Color For \"Common\" Items"] = nil, ["Disable Loot Confirmation Dialog (Without Group)"] = nil, ["Disable Module"] = nil, - ["Disable pfUI Player Castbar"] = nil, - ["Disable pfUI Target Castbar"] = nil, ["Disable pfUI Unit Frames"] = nil, + ["Disable Player Castbar"] = nil, ["Disable Skin"] = nil, + ["Disable Target Castbar"] = nil, ["Disenchanter"] = nil, ["Display Class Buffs"] = nil, ["Display Debuff Durations"] = nil, @@ -401,6 +402,7 @@ pfUI_translation["deDE"] = { ["Pet-Target"] = nil, ["Player"] = nil, ["Player Buff Bar"] = nil, + ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Please enter a name for the new profile."] = nil, ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = nil, @@ -518,6 +520,7 @@ pfUI_translation["deDE"] = { ["Switch Pages On Meta Key Press"] = nil, ["Systeminfo"] = nil, ["Target"] = nil, + ["Target Castbar"] = nil, ["Target Debuff Bar"] = nil, ["Target-Target"] = nil, ["Text Color"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index e5a9ef43..fd60208b 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -71,6 +71,7 @@ pfUI_translation["enUS"] = { ["Cache"] = nil, ["Castbar"] = nil, ["Castbar Height"] = nil, + ["Castbar Width"] = nil, ["Casting Color"] = nil, ["Center"] = nil, ["Center Text"] = nil, @@ -155,10 +156,10 @@ pfUI_translation["enUS"] = { ["Disable Item Quality Color For \"Common\" Items"] = nil, ["Disable Loot Confirmation Dialog (Without Group)"] = nil, ["Disable Module"] = nil, - ["Disable pfUI Player Castbar"] = nil, - ["Disable pfUI Target Castbar"] = nil, ["Disable pfUI Unit Frames"] = nil, + ["Disable Player Castbar"] = nil, ["Disable Skin"] = nil, + ["Disable Target Castbar"] = nil, ["Disenchanter"] = nil, ["Display Class Buffs"] = nil, ["Display Debuff Durations"] = nil, @@ -401,6 +402,7 @@ pfUI_translation["enUS"] = { ["Pet-Target"] = nil, ["Player"] = nil, ["Player Buff Bar"] = nil, + ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Please enter a name for the new profile."] = nil, ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = nil, @@ -518,6 +520,7 @@ pfUI_translation["enUS"] = { ["Switch Pages On Meta Key Press"] = nil, ["Systeminfo"] = nil, ["Target"] = nil, + ["Target Castbar"] = nil, ["Target Debuff Bar"] = nil, ["Target-Target"] = nil, ["Text Color"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index 9dbe7674..67123f15 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -71,6 +71,7 @@ pfUI_translation["esES"] = { ["Cache"] = "Caché", ["Castbar"] = "Barra de lanzamiento", ["Castbar Height"] = "Altura de la barra de lanzamiento", + ["Castbar Width"] = nil, ["Casting Color"] = "Color de lanzamiento", ["Center"] = "Centro", ["Center Text"] = "Centrar texto", @@ -155,10 +156,10 @@ pfUI_translation["esES"] = { ["Disable Item Quality Color For \"Common\" Items"] = "Desactivar color de calidad para objetos \"comunes\"", ["Disable Loot Confirmation Dialog (Without Group)"] = "Desactivar diálogo de confirmación del botín (sin grupo)", ["Disable Module"] = "Desactivar módulo", - ["Disable pfUI Player Castbar"] = "Desactivar la barra de lanzamiento del jugador de pfUI", - ["Disable pfUI Target Castbar"] = "Desactivar la barra de lanzamiento del objetivo de pfUI", ["Disable pfUI Unit Frames"] = "Desactivar marcos de unidad de pfUI", + ["Disable Player Castbar"] = nil, ["Disable Skin"] = "Desactivar skin", + ["Disable Target Castbar"] = nil, ["Disenchanter"] = "Desencantador", ["Display Class Buffs"] = "Mostrar buffs de clase", ["Display Debuff Durations"] = "Mostrar duración de los debuffs", @@ -401,6 +402,7 @@ pfUI_translation["esES"] = { ["Pet-Target"] = "Mascota-Objetivo", ["Player"] = "Jugador", ["Player Buff Bar"] = nil, + ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Please enter a name for the new profile."] = "Introduce un nombre para el nuevo perfil.", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "Introduce un nombre para el nuevo perfil.\nSi ya existe un perfil con el mismo nombre, este será sobreescrito.", @@ -518,6 +520,7 @@ pfUI_translation["esES"] = { ["Switch Pages On Meta Key Press"] = nil, ["Systeminfo"] = "Información del sistema", ["Target"] = "Objetivo", + ["Target Castbar"] = nil, ["Target Debuff Bar"] = nil, ["Target-Target"] = "Objetivo-Objetivo", ["Text Color"] = "Color del texto", diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index 2649a5cf..c3e62a7b 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -71,6 +71,7 @@ pfUI_translation["frFR"] = { ["Cache"] = "Cache", ["Castbar"] = "Barre d'incantation", ["Castbar Height"] = "Hauteur de la barre d'incantation", + ["Castbar Width"] = nil, ["Casting Color"] = "Couleur de l'incantation", ["Center"] = nil, ["Center Text"] = "Centrer le texte", @@ -155,10 +156,10 @@ pfUI_translation["frFR"] = { ["Disable Item Quality Color For \"Common\" Items"] = "Désactiver la couleur de qualité pour les objets de type\"Commun\"", ["Disable Loot Confirmation Dialog (Without Group)"] = "Désactiver la boîte de dialogue de confirmation du butin (hors groupe)", ["Disable Module"] = "Désactiver le module", - ["Disable pfUI Player Castbar"] = "Désactiver la barre d'incantation pfUI", - ["Disable pfUI Target Castbar"] = "Désactiver la barre d'incantation de la cible pfUI", ["Disable pfUI Unit Frames"] = "Désactiver les cadres d'unité pfUI", + ["Disable Player Castbar"] = nil, ["Disable Skin"] = nil, + ["Disable Target Castbar"] = nil, ["Disenchanter"] = nil, ["Display Class Buffs"] = nil, ["Display Debuff Durations"] = "Afficher la durée des débuff", @@ -401,6 +402,7 @@ pfUI_translation["frFR"] = { ["Pet-Target"] = nil, ["Player"] = "Joueur", ["Player Buff Bar"] = nil, + ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Please enter a name for the new profile."] = nil, ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "Entrez un nom pour le nouveau profil.\nUn profil existant du même nom sera écrasé.", @@ -518,6 +520,7 @@ pfUI_translation["frFR"] = { ["Switch Pages On Meta Key Press"] = nil, ["Systeminfo"] = "Info Système", ["Target"] = "Cible", + ["Target Castbar"] = nil, ["Target Debuff Bar"] = nil, ["Target-Target"] = "Cible de la cible", ["Text Color"] = nil, diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index b5c491ee..07348ebd 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -71,6 +71,7 @@ pfUI_translation["koKR"] = { ["Cache"] = "캐쉬", ["Castbar"] = "캐스트바", ["Castbar Height"] = "캐스트바 높이", + ["Castbar Width"] = nil, ["Casting Color"] = "캐스트바 색상", ["Center"] = nil, ["Center Text"] = "가운데 텍스트", @@ -155,10 +156,10 @@ pfUI_translation["koKR"] = { ["Disable Item Quality Color For \"Common\" Items"] = "\"공통\" 아이템의 경우 아이템품질 색상 비활성화", ["Disable Loot Confirmation Dialog (Without Group)"] = "룻팅확인 대화상자 비활성화(파티 제외)", ["Disable Module"] = "모듈 비활성화", - ["Disable pfUI Player Castbar"] = "pfUI 플레이어 캐스트바 비활성화", - ["Disable pfUI Target Castbar"] = "pfUI 대상 캐스트바 비활성화", ["Disable pfUI Unit Frames"] = "pfUI 유닛프레임 비활성화", + ["Disable Player Castbar"] = nil, ["Disable Skin"] = nil, + ["Disable Target Castbar"] = nil, ["Disenchanter"] = nil, ["Display Class Buffs"] = nil, ["Display Debuff Durations"] = "디버프 지속 시간 표시", @@ -401,6 +402,7 @@ pfUI_translation["koKR"] = { ["Pet-Target"] = nil, ["Player"] = "플레이어", ["Player Buff Bar"] = nil, + ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Please enter a name for the new profile."] = nil, ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "새 프로필의 이름을 입력하십시오.\n동일한 이름을 작성하면 기존 프로파일을 덮어 씁니다.", @@ -518,6 +520,7 @@ pfUI_translation["koKR"] = { ["Switch Pages On Meta Key Press"] = nil, ["Systeminfo"] = "시스템 정보", ["Target"] = "대상", + ["Target Castbar"] = nil, ["Target Debuff Bar"] = nil, ["Target-Target"] = "대상-대상", ["Text Color"] = nil, diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index 87ac7c1d..0cd28ea4 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -71,6 +71,7 @@ pfUI_translation["ruRU"] = { ["Cache"] = "Кэш", ["Castbar"] = "Панель применения", ["Castbar Height"] = "Высота панели применения", + ["Castbar Width"] = nil, ["Casting Color"] = "Цвет произнесения", ["Center"] = "По центру", ["Center Text"] = "Текст по центру", @@ -155,10 +156,10 @@ pfUI_translation["ruRU"] = { ["Disable Item Quality Color For \"Common\" Items"] = "Отключить цвет качества для \"|cff1eff00Необычных|r\" предметов", ["Disable Loot Confirmation Dialog (Without Group)"] = "Отключить диалог подтверждения добычи (вне группы)", ["Disable Module"] = "Отключить модуль", - ["Disable pfUI Player Castbar"] = "Отключить панель применения pfUI игрока", - ["Disable pfUI Target Castbar"] = "Отключить панель применения pfUI цели", ["Disable pfUI Unit Frames"] = "Отключить окна юнита pfUI", + ["Disable Player Castbar"] = nil, ["Disable Skin"] = "Отключить оболочку", + ["Disable Target Castbar"] = nil, ["Disenchanter"] = "Распылитель", ["Display Class Buffs"] = "Отобразить классовые баффы", ["Display Debuff Durations"] = "Отобразить длительность дебаффов", @@ -401,6 +402,7 @@ pfUI_translation["ruRU"] = { ["Pet-Target"] = "Цель питомца", ["Player"] = "Игрок", ["Player Buff Bar"] = "Панель баффов игрока", + ["Player Castbar"] = nil, ["Player Debuff Bar"] = "Панель дебаффов игрока", ["Please enter a name for the new profile."] = "Пожалуйста введите имя для нового профиля.", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "Пожалуйста введите имя для нового профиля. Существующие профили, имеющие одно и то же имя, будут перезаписаны.", @@ -518,6 +520,7 @@ pfUI_translation["ruRU"] = { ["Switch Pages On Meta Key Press"] = "Переключение страниц по нажатию мета-клавиш (Alt, Shift, Ctrl)", ["Systeminfo"] = "Системная информация", ["Target"] = "Цель", + ["Target Castbar"] = nil, ["Target Debuff Bar"] = "Панель дебаффов цели", ["Target-Target"] = "Цель цели", ["Text Color"] = "Цвет текста", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index d14b59a3..38753bb8 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -71,6 +71,7 @@ pfUI_translation["zhCN"] = { ["Cache"] = "缓存", ["Castbar"] = "施法条设置", ["Castbar Height"] = "敌对施法条高度", + ["Castbar Width"] = nil, ["Casting Color"] = "吟唱施法读条颜色", ["Center"] = "居中", ["Center Text"] = "中间文字", @@ -155,10 +156,10 @@ pfUI_translation["zhCN"] = { ["Disable Item Quality Color For \"Common\" Items"] = "仅在普通品质以上物品显示品质颜色", ["Disable Loot Confirmation Dialog (Without Group)"] = "禁用拾取确认对话框[无组队]", ["Disable Module"] = "禁用", - ["Disable pfUI Player Castbar"] = "隐藏玩家施法条", - ["Disable pfUI Target Castbar"] = "隐藏目标施法条", ["Disable pfUI Unit Frames"] = "禁用头像框架", + ["Disable Player Castbar"] = nil, ["Disable Skin"] = "禁用皮肤", + ["Disable Target Castbar"] = nil, ["Disenchanter"] = "附魔分解师", ["Display Class Buffs"] = "显示职业Buff", ["Display Debuff Durations"] = "显示Debuff持续时间", @@ -401,6 +402,7 @@ pfUI_translation["zhCN"] = { ["Pet-Target"] = "宠物-目标", ["Player"] = "玩家", ["Player Buff Bar"] = "玩家Buffs条", + ["Player Castbar"] = nil, ["Player Debuff Bar"] = "玩家Debuffs条", ["Please enter a name for the new profile."] = "请输入新配置文件的名称", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "请输入新配置文件的名称。\n如果你创建具有相同名称的配置文件将覆盖现有的配置文件。", @@ -518,6 +520,7 @@ pfUI_translation["zhCN"] = { ["Switch Pages On Meta Key Press"] = "Ctrl/Alt/Shift 触发分页", ["Systeminfo"] = "系统信息", ["Target"] = "目标", + ["Target Castbar"] = nil, ["Target Debuff Bar"] = "目标Debuffs条", ["Target-Target"] = "目标的目标", ["Text Color"] = "文体颜色", diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index 0be24fb6..193a4700 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -71,6 +71,7 @@ pfUI_translation["zhTW"] = { ["Cache"] = "緩存", ["Castbar"] = "施法條設置", ["Castbar Height"] = "敵對施法條高度", + ["Castbar Width"] = nil, ["Casting Color"] = "吟唱施法讀條顏色", ["Center"] = "居中", ["Center Text"] = "中間文字", @@ -155,10 +156,10 @@ pfUI_translation["zhTW"] = { ["Disable Item Quality Color For \"Common\" Items"] = "僅在普通品質以上物品顯示品質顏色", ["Disable Loot Confirmation Dialog (Without Group)"] = "禁用拾取確認對話方塊[無組隊]", ["Disable Module"] = "禁用", - ["Disable pfUI Player Castbar"] = "隱藏玩家施法條", - ["Disable pfUI Target Castbar"] = "隱藏目標施法條", ["Disable pfUI Unit Frames"] = "禁用頭像框架", + ["Disable Player Castbar"] = nil, ["Disable Skin"] = "禁用皮膚", + ["Disable Target Castbar"] = nil, ["Disenchanter"] = "附魔分解師", ["Display Class Buffs"] = "顯示職業Buff", ["Display Debuff Durations"] = "顯示Debuff持續時間", @@ -401,6 +402,7 @@ pfUI_translation["zhTW"] = { ["Pet-Target"] = "寵物-目標", ["Player"] = "玩家", ["Player Buff Bar"] = nil, + ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, ["Please enter a name for the new profile."] = "請輸入新設定檔的名稱", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "請輸入新設定檔的名稱。\n如果你創建具有相同名稱的設定檔將覆蓋現有的設定檔。", @@ -518,6 +520,7 @@ pfUI_translation["zhTW"] = { ["Switch Pages On Meta Key Press"] = nil, ["Systeminfo"] = "系統資訊", ["Target"] = "目標", + ["Target Castbar"] = nil, ["Target Debuff Bar"] = nil, ["Target-Target"] = "目標的目標", ["Text Color"] = "文體顏色", diff --git a/modules/castbar.lua b/modules/castbar.lua index 756b1f65..eb02afe8 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -149,13 +149,21 @@ pfUI:RegisterModule("castbar", function () if C.castbar.player.hide_pfui == "0" then pfUI.castbar.player = CreateCastbar("pfPlayerCastbar", UIParent, "player") + local width = C.castbar.player.width ~= "0" and C.castbar.player.width + if pfUI.uf.player then local pspace = tonumber(C.unitframes.player.pspace) + local width = C.castbar.player.width ~= "-1" and C.castbar.player.width or pfUI.uf.player:GetWidth() pfUI.castbar.player:SetPoint("TOPLEFT", pfUI.uf.player, "BOTTOMLEFT", 0, -default_border * 2 - pspace) - pfUI.castbar.player:SetWidth(pfUI.uf.player:GetWidth()) + pfUI.castbar.player:SetWidth(width) else + local width = C.castbar.player.width ~= "-1" and C.castbar.player.width or 200 pfUI.castbar.player:SetPoint("CENTER", 0, -200) - pfUI.castbar.player:SetWidth(200) + pfUI.castbar.player:SetWidth(width) + end + + if C.castbar.player.height ~= "-1" then + pfUI.castbar.player:SetHeight(C.castbar.player.height) end UpdateMovable(pfUI.castbar.player) @@ -167,11 +175,17 @@ pfUI:RegisterModule("castbar", function () if pfUI.uf.target then local pspace = tonumber(C.unitframes.target.pspace) + local width = C.castbar.target.width ~= "-1" and C.castbar.target.width or pfUI.uf.target:GetWidth() pfUI.castbar.target:SetPoint("TOPLEFT", pfUI.uf.target, "BOTTOMLEFT", 0, -default_border * 2 - pspace) - pfUI.castbar.target:SetWidth(pfUI.uf.target:GetWidth()) + pfUI.castbar.target:SetWidth(width) else + local width = C.castbar.target.width ~= "-1" and C.castbar.target.width or 200 pfUI.castbar.target:SetPoint("CENTER", 0, -225) - pfUI.castbar.target:SetWidth(200) + pfUI.castbar.target:SetWidth(width) + end + + if C.castbar.target.height ~= "-1" then + pfUI.castbar.target:SetHeight(C.castbar.target.height) end UpdateMovable(pfUI.castbar.target) diff --git a/modules/gui.lua b/modules/gui.lua index eae6a805..b0a46e5c 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1759,8 +1759,16 @@ pfUI:RegisterModule("gui", function () CreateConfig(nil, T["Casting Color"], C.appearance.castbar, "castbarcolor", "color") CreateConfig(nil, T["Channeling Color"], C.appearance.castbar, "channelcolor", "color") CreateConfig(nil, T["Disable Blizzard Castbar"], C.castbar.player, "hide_blizz", "checkbox") - CreateConfig(nil, T["Disable pfUI Player Castbar"], C.castbar.player, "hide_pfui", "checkbox") - CreateConfig(nil, T["Disable pfUI Target Castbar"], C.castbar.target, "hide_pfui", "checkbox") + + CreateConfig(nil, T["Player Castbar"], nil, nil, "header") + CreateConfig(nil, T["Castbar Width"], C.castbar.player, "width") + CreateConfig(nil, T["Castbar Height"], C.castbar.player, "height") + CreateConfig(nil, T["Disable Player Castbar"], C.castbar.player, "hide_pfui", "checkbox") + + CreateConfig(nil, T["Target Castbar"], nil, nil, "header") + CreateConfig(nil, T["Castbar Width"], C.castbar.target, "width") + CreateConfig(nil, T["Castbar Height"], C.castbar.target, "height") + CreateConfig(nil, T["Disable Target Castbar"], C.castbar.target, "hide_pfui", "checkbox") end) CreateGUIEntry(T["Chat"], nil, function()