From c6d780f9df0e12490938011793e5a92c11433d32 Mon Sep 17 00:00:00 2001 From: Xinhuan Date: Mon, 3 Nov 2008 07:21:14 +0800 Subject: [PATCH] Add option to change the Pet Color. --- Localization/deDE.lua | 2 ++ Localization/enUS.lua | 2 ++ Localization/esES.lua | 2 ++ Localization/frFR.lua | 2 ++ Localization/koKR.lua | 2 ++ Localization/ruRU.lua | 2 ++ Localization/zhCN.lua | 2 ++ Localization/zhTW.lua | 2 ++ Omen.lua | 43 +++++++++++++++++++++++++++---------------- 9 files changed, 43 insertions(+), 16 deletions(-) diff --git a/Localization/deDE.lua b/Localization/deDE.lua index df44ea9..807720d 100644 --- a/Localization/deDE.lua +++ b/Localization/deDE.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = "Farbe der 'Aggro ziehen' Leiste" L["The background color for your Pull Aggro bar"] = "Die Hintergrundfarbe für die 'Aggro ziehen' Leiste" L["Use Class Colors"] = "Klassenfarben benutzen" L["Use standard class colors for the background color of threat bars"] = "Benutze die Standard Klassenfarben für den Hintergrund der Bedrohungsbalken" +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = "Balkenhintergrundfarbe" L["The background color for all threat bars"] = "Die Hintergrundfarbe für alle Bedrohungsbalken" L["Always Show Self"] = "Selbst immer anzeigen" diff --git a/Localization/enUS.lua b/Localization/enUS.lua index 111ef1d..a489d7b 100644 --- a/Localization/enUS.lua +++ b/Localization/enUS.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = true L["The background color for your Pull Aggro bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = true L["The background color for all threat bars"] = true L["Always Show Self"] = true diff --git a/Localization/esES.lua b/Localization/esES.lua index d06b9ba..70cbe14 100644 --- a/Localization/esES.lua +++ b/Localization/esES.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = true L["The background color for your Pull Aggro bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = true L["The background color for all threat bars"] = true L["Always Show Self"] = true diff --git a/Localization/frFR.lua b/Localization/frFR.lua index 6fe52b3..9fca925 100644 --- a/Localization/frFR.lua +++ b/Localization/frFR.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = "Couleur A-P reprise" L["The background color for your Pull Aggro bar"] = "La couleur de l'arrière-plan de votre barre de reprise d'aggro." L["Use Class Colors"] = "Couleurs de classe" L["Use standard class colors for the background color of threat bars"] = "Utilise les couleurs de classes standards comme couleur d'arrière-plan des barres de menace." +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = "Couleur A-P des barres" L["The background color for all threat bars"] = "La couleur de l'arrière-plan de toutes les barres de menace." L["Always Show Self"] = "Tj afficher soi-même" diff --git a/Localization/koKR.lua b/Localization/koKR.lua index 0dcda50..eb5fa88 100644 --- a/Localization/koKR.lua +++ b/Localization/koKR.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = "어그로 획득 바 색상" L["The background color for your Pull Aggro bar"] = "당신의 어그로 획득 바에 대한 배경 색상을 지정합니다." L["Use Class Colors"] = "직업 색상 사용" L["Use standard class colors for the background color of threat bars"] = "위협 바의 배경 색상을 기본 직업 색상으로 사용합니다." +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = "배경 색상 바" L["The background color for all threat bars"] = "모든 위협을 위한 배경 색을 설정합니다." L["Always Show Self"] = "항상 자신 표시" diff --git a/Localization/ruRU.lua b/Localization/ruRU.lua index 9f81e0d..a46f062 100644 --- a/Localization/ruRU.lua +++ b/Localization/ruRU.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = "Цвет полосы пула" L["The background color for your Pull Aggro bar"] = "Цвет фона вашей полосы пула" L["Use Class Colors"] = "Цвет класса" L["Use standard class colors for the background color of threat bars"] = "Использовать стандартный цвет уласса в качестве цвета фона полосы угрозы" +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = "Цвет фона полос" L["The background color for all threat bars"] = "Цвет фона для всех полос угрозы" L["Always Show Self"] = "Всегда показ себя" diff --git a/Localization/zhCN.lua b/Localization/zhCN.lua index b42a1f2..fc11a2e 100644 --- a/Localization/zhCN.lua +++ b/Localization/zhCN.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = "获得仇恨计量条颜色" L["The background color for your Pull Aggro bar"] = "获得仇恨计量条背景颜色" L["Use Class Colors"] = "使用职业颜色" L["Use standard class colors for the background color of threat bars"] = "使用标准职业颜色威胁计量条背景颜色" +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = "计量条背景颜色" L["The background color for all threat bars"] = "所有威胁计量条背景颜色" L["Always Show Self"] = "总是显示自己" diff --git a/Localization/zhTW.lua b/Localization/zhTW.lua index d1e18ad..c883d14 100644 --- a/Localization/zhTW.lua +++ b/Localization/zhTW.lua @@ -169,6 +169,8 @@ L["Pull Aggro Bar Color"] = true L["The background color for your Pull Aggro bar"] = true L["Use Class Colors"] = true L["Use standard class colors for the background color of threat bars"] = true +L["Pet Bar Color"] = true +L["The background color for pets"] = true L["Bar BG Color"] = true L["The background color for all threat bars"] = true L["Always Show Self"] = true diff --git a/Omen.lua b/Omen.lua index c9f7868..2cbc110 100644 --- a/Omen.lua +++ b/Omen.lua @@ -138,6 +138,7 @@ local defaults = { AlwaysShowSelf = true, ShowAggroBar = true, AggroBarColor = {r = 1, g = 0, b = 0, a = 1,}, + PetBarColor = {r = 0.83, g = 0.98, b = 0.74, a = 1}, }, ShowWith = { UseShowWith = true, @@ -186,13 +187,6 @@ Omen.Timers = timers Omen.Bars = bars setmetatable(guidNameLookup, {__index = function(self, guid) return L[""] end}) -local pet_color = { -- Default pet color for all pets in the player's raid/party - r = 0.83, -- This is a light green-ish color, or sort of a washed out - g = 0.98, -- version of the Hunter color - b = 0.74, - a = 0.6 -} - -- For speedups. Rather than concantenating every time we need a unitID, we just look -- it up instead. That is rID[i] is much faster than format("raid%d", i) or "raid"..i local pID = {} @@ -1447,7 +1441,7 @@ function Omen:UpdateBars() local c = (guid == myGUID and dbBar.UseMyBarColor and dbBar.MyBarColor) or (guid == tankGUID and dbBar.UseTankBarColor and dbBar.TankBarColor) or (guid == "AGGRO" and dbBar.AggroBarColor) or - (dbBar.UseClassColors and (RAID_CLASS_COLORS[class] or (class == "PET" and pet_color))) or + (dbBar.UseClassColors and (RAID_CLASS_COLORS[class] or (class == "PET" and dbBar.PetBarColor))) or dbBar.BarColor bar.texture:SetVertexColor(c.r, c.g, c.b, c.a or 1) @@ -2390,9 +2384,32 @@ local options = { name = L["Use Class Colors"], desc = L["Use standard class colors for the background color of threat bars"], }, - BarColor = { + PetBarColor = { type = "color", order = 21, + name = L["Pet Bar Color"], + desc = L["The background color for pets"], + hasAlpha = true, + get = function(info) + local t = db.Bar.PetBarColor + return t.r, t.g, t.b, t.a + end, + set = function(info, r, g, b, a) + local t = db.Bar.PetBarColor + t.r, t.g, t.b, t.a = r, g, b, a + Omen:UpdateBars() + end, + disabled = function() return not db.Bar.UseClassColors end, + }, + AlwaysShowSelf = { + type = "toggle", + order = 26, + name = L["Always Show Self"], + desc = L["Always show your threat bar on Omen (ignores class filter settings), showing your bar on the last row if necessary"], + }, + BarColor = { + type = "color", + order = 27, name = L["Bar BG Color"], desc = L["The background color for all threat bars"], hasAlpha = true, @@ -2407,15 +2424,9 @@ local options = { end, disabled = function() return db.Bar.UseClassColors end, }, - AlwaysShowSelf = { - type = "toggle", - order = 24, - name = L["Always Show Self"], - desc = L["Always show your threat bar on Omen (ignores class filter settings), showing your bar on the last row if necessary"], - }, Texture = { type = "select", dialogControl = 'LSM30_Statusbar', - order = 25, + order = 29, name = L["Bar Texture"], desc = L["The texture that the bar will use"], values = AceGUIWidgetLSMlists.statusbar,