Add option to color your own threat bar to a color of your choice.

This commit is contained in:
Xinhuan
2008-10-17 07:31:23 +08:00
parent 3451a1d286
commit 89d02500e6
7 changed files with 57 additions and 5 deletions
+4
View File
@@ -129,6 +129,10 @@ L["Show Headings"] = true
L["Show column headings"] = true
L["Heading BG Color"] = true
L["Heading background color"] = true
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["Bar Label Options"] = true
L["Font"] = true
L["The font that the labels will use"] = true
+4
View File
@@ -129,6 +129,10 @@ L["Show Headings"] = "Mostrar Categorías"
L["Show column headings"] = "Mostrar las categorías sobre de las columnas"
L["Heading BG Color"] = "Color del Fondo de las Categorías"
L["Heading background color"] = "Color del Fondo de las Categorías"
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["Bar Label Options"] = "Opciones de Etiqueta de Barra"
L["Font"] = "Fuente"
L["The font that the labels will use"] = "El fuente que las etiquetas usarán"
+4
View File
@@ -129,6 +129,10 @@ L["Show Headings"] = "Afficher les en-têtes"
L["Show column headings"] = "Affiche les en-têtes des colonnes."
L["Heading BG Color"] = "Couleur A-P en-tête"
L["Heading background color"] = "Couleur de l'arrière-plan de l'en-tête."
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["Bar Label Options"] = "Options des labels des barres"
L["Font"] = "Police d'écriture"
L["The font that the labels will use"] = "La police d'écriture que les labels utiliseront."
+4
View File
@@ -129,6 +129,10 @@ L["Show Headings"] = "제목 표시"
L["Show column headings"] = "컬럼 제목 표시"
L["Heading BG Color"] = "제목 배경 색상"
L["Heading background color"] = "제목 배경 색상을 설정합니다."
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["Bar Label Options"] = "바 라벨 옵션"
L["Font"] = "글꼴"
L["The font that the labels will use"] = "라벨에 사용할 글꼴을 설정합니다."
+4
View File
@@ -129,6 +129,10 @@ L["Show Headings"] = "顯示上標題"
L["Show column headings"] = "顯示專欄的上標題"
L["Heading BG Color"] = "上標題的背景顏色"
L["Heading background color"] = "上標題的背景顏色"
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["Bar Label Options"] = "長條棒標籤選項"
L["Font"] = "字體"
L["The font that the labels will use"] = "標籤字體"
+33 -5
View File
@@ -10,6 +10,8 @@ LoadAddOn("Ace3")
LoadAddOn("LibSharedMedia-3.0")
LoadAddOn("AceGUI-3.0-SharedMediaWidgets")
LoadAddOn("LibSink-2.0")
LoadAddOn("LibRock-1.0")
LoadAddOn("FuBarPlugin-3.0")
-----------------------------------------------------------------------------
@@ -117,6 +119,8 @@ local defaults = {
TPSWindow = 10,
ShowHeadings = true,
HeadingBGColor = {r = 0, g = 0, b = 0, a = 0,},
UseMyBarColor = false,
MyBarColor = {r = 1, g = 0, b = 0, a = 1,},
},
ShowWith = {
Pet = true,
@@ -161,7 +165,7 @@ local default_color = { -- Default bar color for units not in the player's r
r = 1,
g = 0,
b = 0,
a = 0.6
a = 1
}
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
@@ -1272,6 +1276,7 @@ function Omen:UpdateBars()
if topthreat == 0 then topthreat = 1 end
local tankThreat = threatTable[tankGUID or mobTargetGUID or sortTable[1]]
local dbBar = db.Bar
myGUID = UnitGUID("player")
i = 1
if db.Bar.ShowHeadings then
if db.Autocollapse and i <= db.NumBars or i*dbBar.Height + (i-1)*dbBar.Spacing <= h then
@@ -1299,8 +1304,8 @@ function Omen:UpdateBars()
else
bar.Text2:SetFormattedText("%d [%d%%]", threat / 100, tankThreat == 0 and 0 or threat / tankThreat * 100)
end
local c = (class == "PET" and pet_color) or RAID_CLASS_COLORS[class] or default_color
bar.texture:SetVertexColor(c.r, c.g, c.b)
local c = (class == "PET" and pet_color) or (db.Bar.UseMyBarColor and guid == myGUID and db.Bar.MyBarColor) or RAID_CLASS_COLORS[class] or default_color
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
@@ -1965,7 +1970,7 @@ local options = {
order = 7,
name = L["TPS Window"],
desc = L["TPS_WINDOW_DESC"],
min = 5, max = 15, step = 0.1,
min = 3, max = 15, step = 0.1,
disabled = function() return not db.Bar.ShowTPS end,
},
ShowHeadings = {
@@ -1996,9 +2001,32 @@ local options = {
end,
disabled = function() return not db.Bar.ShowHeadings end,
},
UseMyBarColor = {
type = "toggle",
order = 10,
name = L["Use 'My Bar' color"],
desc = L["Use a different colored background for your threat bar in Omen"],
},
MyBarColor = {
type = "color",
order = 11,
name = L["'My Bar' BG Color"],
desc = L["The background color for your threat bar"],
hasAlpha = true,
get = function(info)
local t = db.Bar.MyBarColor
return t.r, t.g, t.b, t.a
end,
set = function(info, r, g, b, a)
local t = db.Bar.MyBarColor
t.r, t.g, t.b, t.a = r, g, b, a
Omen:UpdateBars()
end,
disabled = function() return not db.Bar.UseMyBarColor end,
},
Texture = {
type = "select", dialogControl = 'LSM30_Statusbar',
order = 10,
order = 15,
name = L["Bar Texture"],
desc = L["The texture that the bar will use"],
values = AceGUIWidgetLSMlists.statusbar,
+4
View File
@@ -129,6 +129,10 @@ L["Show Headings"] = "Zeige Überschriften"
L["Show column headings"] = "Zeige die Überschriften der Spalten"
L["Heading BG Color"] = "Überschriftenhintergrundfarbe"
L["Heading background color"] = "Hintergrundfarbe der Überschriften"
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["Bar Label Options"] = "Optionen für die Beschriftung der Balken"
L["Font"] = "Schriftart"
L["The font that the labels will use"] = "Die Schriftart die die Balken benutzen"