Add option to change the Pet Color.

This commit is contained in:
Xinhuan
2008-11-03 07:21:14 +08:00
parent dbe3740447
commit c6d780f9df
9 changed files with 43 additions and 16 deletions
+2
View File
@@ -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"
+2
View File
@@ -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
+2
View File
@@ -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
+2
View File
@@ -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"
+2
View File
@@ -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"] = "항상 자신 표시"
+2
View File
@@ -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"] = "Всегда показ себя"
+2
View File
@@ -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"] = "总是显示自己"
+2
View File
@@ -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
+27 -16
View File
@@ -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["<Unknown>"] 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,