xpbar: add option to not overlap the xpbars

This commit is contained in:
DennisWG
2020-07-28 16:57:45 +02:00
committed by shagu
parent 5372d75918
commit 09498bc6cb
11 changed files with 20 additions and 2 deletions
+1
View File
@@ -545,6 +545,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("panel", "xp", "rep_mode", "VERTICAL")
pfUI:UpdateConfig("panel", "xp", "rep_anchor", "pfChatRight")
pfUI:UpdateConfig("panel", "xp", "rep_position", "LEFT")
pfUI:UpdateConfig("panel", "xp", "dont_overlap", "0")
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["deDE"] = {
["Standard Text Font Size"] = nil,
["Status"] = nil,
["Status Bar Texture"] = nil,
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = nil,
["Switch Pages On Meta Key Press"] = nil,
["Systeminfo"] = nil,
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["enUS"] = {
["Standard Text Font Size"] = nil,
["Status"] = nil,
["Status Bar Texture"] = nil,
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = nil,
["Switch Pages On Meta Key Press"] = nil,
["Systeminfo"] = nil,
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["esES"] = {
["Standard Text Font Size"] = "Tamaño de la fuente de texto estándar",
["Status"] = "Estado",
["Status Bar Texture"] = "Textura de la barra de estado",
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = "Alternar páginas en el modo sigilo del druida",
["Switch Pages On Meta Key Press"] = "Cambiar página por presionar la tecla meta",
["Systeminfo"] = "Información del sistema",
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["frFR"] = {
["Standard Text Font Size"] = "Taille de la police standard du texte",
["Status"] = "Statut",
["Status Bar Texture"] = "Texture de la barre d'état",
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = "Changer de page sur le camouflage du Druide",
["Switch Pages On Meta Key Press"] = "Basculer les pages sur la touche Meta",
["Systeminfo"] = "Info Système",
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["koKR"] = {
["Standard Text Font Size"] = "기본 텍스트 폰트크기",
["Status"] = "상태",
["Status Bar Texture"] = nil,
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = nil,
["Switch Pages On Meta Key Press"] = nil,
["Systeminfo"] = "시스템 정보",
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["ruRU"] = {
["Standard Text Font Size"] = "Размер шрифта стандартного текста",
["Status"] = "Статус",
["Status Bar Texture"] = "Текстура статус панели",
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = "Перекл страниц при невидимости друида",
["Switch Pages On Meta Key Press"] = "Перекл страниц по нажатию мета-клавиш (Alt, Shift, Ctrl)",
["Systeminfo"] = "Системная информация",
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["zhCN"] = {
["Standard Text Font Size"] = "标准字体字号",
["Status"] = "当前状态",
["Status Bar Texture"] = "状态条纹理材质",
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = nil,
["Switch Pages On Meta Key Press"] = "Ctrl/Alt/Shift 触发分页",
["Systeminfo"] = "系统信息",
+1
View File
@@ -643,6 +643,7 @@ pfUI_translation["zhTW"] = {
["Standard Text Font Size"] = "標準字體字型大小",
["Status"] = "當前狀態",
["Status Bar Texture"] = "狀態條紋理材質",
["Don't overlap rested"] = nil,
["Switch Pages On Druid Stealth"] = nil,
["Switch Pages On Meta Key Press"] = nil,
["Systeminfo"] = "系統資訊",
+1
View File
@@ -1980,6 +1980,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(U["xpbar"], T["Orientation"], C.panel.xp, "xp_mode", "dropdown", pfUI.gui.dropdowns.orientation)
CreateConfig(U["xpbar"], T["Frame Anchor"], C.panel.xp, "xp_anchor", "dropdown", pfUI.gui.dropdowns.xpanchors)
CreateConfig(U["xpbar"], T["Aligned Position"], C.panel.xp, "xp_position", "dropdown", pfUI.gui.dropdowns.xp_position)
CreateConfig(U["xpbar"], T["Don't overlap rested"], C.panel.xp, "dont_overlap", "checkbox")
CreateConfig(nil, T["Colors"], nil, nil, "header")
CreateConfig(U["xpbar"], T["Experience Color"], C.panel.xp, "xp_color", "color")
+10 -2
View File
@@ -199,6 +199,14 @@ end
b.position = t == "XP" and C.panel.xp.xp_position or C.panel.xp.rep_position
b.display = t == "XP" and C.panel.xp.xp_display or C.panel.xp.rep_display
local barStrata = "LOW"
local restedStrata = "MEDIUM"
if C.panel.xp.dont_overlap == "1" then
barStrata = "MEDIUM"
restedStrata = "LOW"
end
if t == "XP" and C.panel.xp.xp_always == "1" then
b.always = true
elseif t == "REP" and C.panel.xp.rep_always == "1" then
@@ -220,7 +228,7 @@ end
b.bar:SetStatusBarTexture(pfUI.media["img:bar"])
b.bar:ClearAllPoints()
b.bar:SetAllPoints(b)
b.bar:SetFrameStrata("LOW")
b.bar:SetFrameStrata(barStrata)
local cr, cg, cb, ca = pfUI.api.GetStringColor(b.xp_color)
b.bar:SetStatusBarColor(cr,cg,cb,ca)
@@ -230,7 +238,7 @@ end
b.restedbar:SetStatusBarTexture(pfUI.media["img:bar"])
b.restedbar:ClearAllPoints()
b.restedbar:SetAllPoints(b)
b.restedbar:SetFrameStrata("MEDIUM")
b.restedbar:SetFrameStrata(restedStrata)
local cr, cg, cb, ca = pfUI.api.GetStringColor(b.rest_color)
b.restedbar:SetStatusBarColor(cr,cg,cb,ca)
b.restedbar:SetOrientation(b.mode)