diff --git a/Localization/deDE.lua b/Localization/deDE.lua index d866670..54b5d84 100644 --- a/Localization/deDE.lua +++ b/Localization/deDE.lua @@ -136,6 +136,10 @@ L["Use 'My Bar' color"] = true L["Use a different colored background for your threat bar in Omen"] = true L["'My Bar' BG Color"] = true L["The background color for your threat bar"] = true +L["Use Tank Bar color"] = true +L["Use a different colored background for the tank's threat bar in Omen"] = true +L["Tank Bar Color"] = true +L["The background color for your tank's threat bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true L["Bar BG Color"] = true diff --git a/Localization/enUS.lua b/Localization/enUS.lua index a3e0e61..913c3c5 100644 --- a/Localization/enUS.lua +++ b/Localization/enUS.lua @@ -136,6 +136,10 @@ L["Use 'My Bar' color"] = true L["Use a different colored background for your threat bar in Omen"] = true L["'My Bar' BG Color"] = true L["The background color for your threat bar"] = true +L["Use Tank Bar color"] = true +L["Use a different colored background for the tank's threat bar in Omen"] = true +L["Tank Bar Color"] = true +L["The background color for your tank's threat bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true L["Bar BG Color"] = true diff --git a/Localization/esES.lua b/Localization/esES.lua index 81c176d..dd1a2ca 100644 --- a/Localization/esES.lua +++ b/Localization/esES.lua @@ -136,6 +136,10 @@ L["Use 'My Bar' color"] = true L["Use a different colored background for your threat bar in Omen"] = true L["'My Bar' BG Color"] = true L["The background color for your threat bar"] = true +L["Use Tank Bar color"] = true +L["Use a different colored background for the tank's threat bar in Omen"] = true +L["Tank Bar Color"] = true +L["The background color for your tank's threat bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true L["Bar BG Color"] = true diff --git a/Localization/frFR.lua b/Localization/frFR.lua index 24aff5f..dbe1109 100644 --- a/Localization/frFR.lua +++ b/Localization/frFR.lua @@ -136,6 +136,10 @@ L["Use 'My Bar' color"] = true L["Use a different colored background for your threat bar in Omen"] = true L["'My Bar' BG Color"] = true L["The background color for your threat bar"] = true +L["Use Tank Bar color"] = true +L["Use a different colored background for the tank's threat bar in Omen"] = true +L["Tank Bar Color"] = true +L["The background color for your tank's threat bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true L["Bar BG Color"] = true diff --git a/Localization/koKR.lua b/Localization/koKR.lua index e026ad8..5605eee 100644 --- a/Localization/koKR.lua +++ b/Localization/koKR.lua @@ -136,6 +136,10 @@ L["Use 'My Bar' color"] = "'플레이어 바'에 색상 사용" L["Use a different colored background for your threat bar in Omen"] = "Omen에서 플레이어(당신)의 바에 다른 색상을 사용합니다. " L["'My Bar' BG Color"] = "'플레이어 바'의 배경 색상" L["The background color for your threat bar"] = "플레이어(당신)의 바에 대한 배경색을 지정합니다." +L["Use Tank Bar color"] = true +L["Use a different colored background for the tank's threat bar in Omen"] = true +L["Tank Bar Color"] = true +L["The background color for your tank's threat bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true L["Bar BG Color"] = true diff --git a/Localization/zhCN.lua b/Localization/zhCN.lua index bea4f56..51b5861 100644 --- a/Localization/zhCN.lua +++ b/Localization/zhCN.lua @@ -136,6 +136,10 @@ L["Use 'My Bar' color"] = "使用“My Bar”颜色" L["Use a different colored background for your threat bar in Omen"] = "在 Omen 中为仇恨计量条使用不同的背景颜色" L["'My Bar' BG Color"] = "“My Bar”背景颜色" L["The background color for your threat bar"] = "仇恨计量条的背景颜色" +L["Use Tank Bar color"] = true +L["Use a different colored background for the tank's threat bar in Omen"] = true +L["Tank Bar Color"] = true +L["The background color for your tank's threat bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true L["Bar BG Color"] = true diff --git a/Localization/zhTW.lua b/Localization/zhTW.lua index 3b54988..01ac06b 100644 --- a/Localization/zhTW.lua +++ b/Localization/zhTW.lua @@ -136,6 +136,10 @@ L["Use 'My Bar' color"] = "使用'我的長條棒'顏色" L["Use a different colored background for your threat bar in Omen"] = "Omen中自己的仇恨條背景使用不同顏色顯示" L["'My Bar' BG Color"] = "我的長條棒的背景顏色" L["The background color for your threat bar"] = "自己的仇恨條的背景顏色" +L["Use Tank Bar color"] = true +L["Use a different colored background for the tank's threat bar in Omen"] = true +L["Tank Bar Color"] = true +L["The background color for your tank's threat bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true L["Bar BG Color"] = true diff --git a/Omen.lua b/Omen.lua index 4ea59bd..d30f116 100644 --- a/Omen.lua +++ b/Omen.lua @@ -126,6 +126,8 @@ local defaults = { ShowValue = true, UseClassColors = true, BarColor = {r = 1, g = 0, b = 0, a = 1,}, + UseTankBarColor = true, + TankBarColor = {r = 1, g = 0, b = 0, a = 1,}, }, ShowWith = { Pet = true, @@ -1319,13 +1321,11 @@ function Omen:UpdateBars() else bar.Text2:SetFormattedText("%d%%", tankThreat == 0 and 0 or threat / tankThreat * 100) end - if dbBar.UseClassColors then - local c = (class == "PET" and pet_color) or (guid == myGUID and dbBar.UseMyBarColor and dbBar.MyBarColor) or RAID_CLASS_COLORS[class] or dbBar.BarColor - bar.texture:SetVertexColor(c.r, c.g, c.b, c.a or 1) - else - local c = (guid == myGUID and dbBar.UseMyBarColor and dbBar.MyBarColor) or dbBar.BarColor - bar.texture:SetVertexColor(c.r, c.g, c.b, c.a or 1) - end + local c = (guid == myGUID and dbBar.UseMyBarColor and dbBar.MyBarColor) or + (guid == tankGUID and dbBar.UseTankBarColor and dbBar.TankBarColor) or + (dbBar.UseClassColors and (RAID_CLASS_COLORS[class] or (class == "PET" and pet_color))) or + dbBar.BarColor + bar.texture:SetVertexColor(c.r, c.g, c.b, c.a or 1) local width = w * threat / topthreat if width == 0 then width = 1 end if dbBar.AnimateBars and self.Anchor.IsMovingOrSizing ~= 2 then @@ -2077,6 +2077,29 @@ local options = { end, disabled = function() return not db.Bar.UseMyBarColor end, }, + UseTankBarColor = { + type = "toggle", + order = 15, + name = L["Use Tank Bar color"], + desc = L["Use a different colored background for the tank's threat bar in Omen"], + }, + TankBarColor = { + type = "color", + order = 16, + name = L["Tank Bar Color"], + desc = L["The background color for your tank's threat bar"], + hasAlpha = true, + get = function(info) + local t = db.Bar.TankBarColor + return t.r, t.g, t.b, t.a + end, + set = function(info, r, g, b, a) + local t = db.Bar.TankBarColor + t.r, t.g, t.b, t.a = r, g, b, a + Omen:UpdateBars() + end, + disabled = function() return not db.Bar.UseTankBarColor end, + }, UseClassColors = { type = "toggle", order = 17,