Add show threat values and % options.

This commit is contained in:
Xinhuan
2008-10-28 23:20:37 +08:00
parent 40fb526d1f
commit 06fab05a7e
8 changed files with 78 additions and 8 deletions
+3
View File
@@ -12,6 +12,7 @@ L["Open Config"] = "Optionen öffnen"
L["Hide Omen"] = "Omen verstecken"
L["Name"] = "Name"
L["Threat [%]"] = "Bedrohung [%]"
L["Threat"] = "Bedrohung"
L["TPS"] = "BPS"
L["Toggle Focus"] = true
@@ -125,6 +126,8 @@ L["Show TPS"] = "Zeige BPS"
L["Show threat per second values"] = "Zeige Bedrohung pro Sekunde Werte"
L["TPS Window"] = "BPS Fenster"
L["TPS_WINDOW_DESC"] = "Die Bedrohung pro Sekunde Berechnung basiert auf einem in Echtzeit gestaffekteb Fenster der letzten X Sekunden"
L["Show Threat Values"] = true
L["Show Threat %"] = true
L["Show Headings"] = "Zeige Überschriften"
L["Show column headings"] = "Zeige die Überschriften der Spalten"
L["Heading BG Color"] = "Überschriftenhintergrundfarbe"
+3
View File
@@ -12,6 +12,7 @@ L["Open Config"] = true
L["Hide Omen"] = true
L["Name"] = true
L["Threat [%]"] = true
L["Threat"] = true
L["TPS"] = true
L["Toggle Focus"] = true
@@ -125,6 +126,8 @@ L["Show TPS"] = true
L["Show threat per second values"] = true
L["TPS Window"] = true
L["TPS_WINDOW_DESC"] = "The threat per second calculation is based on a real time sliding window of the last X seconds."
L["Show Threat Values"] = true
L["Show Threat %"] = true
L["Show Headings"] = true
L["Show column headings"] = true
L["Heading BG Color"] = true
+3
View File
@@ -12,6 +12,7 @@ L["Open Config"] = "Abrir Configuración"
L["Hide Omen"] = "Ocultar Omen"
L["Name"] = "Nombre"
L["Threat [%]"] = "Amenaza [%]"
L["Threat"] = "Amenaza"
L["TPS"] = "APS"
L["Toggle Focus"] = true
@@ -125,6 +126,8 @@ L["Show TPS"] = "Mostrar APS"
L["Show threat per second values"] = "Mostrar los valores de amenaza por segundo"
L["TPS Window"] = "Ventana de APS"
L["TPS_WINDOW_DESC"] = "La calculación de amenaza por segundo se basa en una ventana corredera de tiempo real de los X segundos pasados"
L["Show Threat Values"] = true
L["Show Threat %"] = true
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"
+3
View File
@@ -12,6 +12,7 @@ L["Open Config"] = "Ouvrir la fenêtre de config."
L["Hide Omen"] = "Cacher Omen"
L["Name"] = "Nom"
L["Threat [%]"] = "Menace [%]"
L["Threat"] = "Menace"
L["TPS"] = "MPS"
L["Toggle Focus"] = true
@@ -125,6 +126,8 @@ L["Show TPS"] = "Afficher la MPS"
L["Show threat per second values"] = "Affiche les valeurs de la menace par seconde."
L["TPS Window"] = "Fenêtre MPS"
L["TPS_WINDOW_DESC"] = "Le calcul de la menace par seconde se fait en temps réel sur une fenêtre des X dernières secondes."
L["Show Threat Values"] = true
L["Show Threat %"] = true
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"
+3
View File
@@ -12,6 +12,7 @@ L["Open Config"] = "설정 열기"
L["Hide Omen"] = "Omen 숨김"
L["Name"] = "이름"
L["Threat [%]"] = "위협 수준 [%]"
L["Threat"] = "위협 수준"
L["TPS"] = "TPS"
L["Toggle Focus"] = "주시 대상 켜기/끄기"
@@ -125,6 +126,8 @@ L["Show TPS"] = "TPS 표시"
L["Show threat per second values"] = "초당 위협 수준을 표시합니다."
L["TPS Window"] = "TPS 창"
L["TPS_WINDOW_DESC"] = "초당 위협 수준 계산을 X 초마다 실시간으로 창에 표시합니다."
L["Show Threat Values"] = true
L["Show Threat %"] = true
L["Show Headings"] = "제목 표시"
L["Show column headings"] = "컬럼 제목 표시"
L["Heading BG Color"] = "제목 배경 색상"
+3
View File
@@ -12,6 +12,7 @@ L["Open Config"] = "打开配置"
L["Hide Omen"] = "隐藏 Omen"
L["Name"] = "名字"
L["Threat [%]"] = "仇恨 [%]"
L["Threat"] = "仇恨"
L["TPS"] = "TPS"
L["Toggle Focus"] = "开/关焦点"
@@ -125,6 +126,8 @@ L["Show TPS"] = "显示 TPS"
L["Show threat per second values"] = "显示每秒仇恨量"
L["TPS Window"] = "TPS 窗口"
L["TPS_WINDOW_DESC"] = "每秒仇恨量的计算是根据最后X秒窗口内的变化而决定的。"
L["Show Threat Values"] = true
L["Show Threat %"] = true
L["Show Headings"] = "显示标题"
L["Show column headings"] = "显示主标题栏"
L["Heading BG Color"] = "主标题的背景颜色"
+3
View File
@@ -12,6 +12,7 @@ L["Open Config"] = "開啟設定"
L["Hide Omen"] = "隱藏Omen"
L["Name"] = "名字"
L["Threat [%]"] = "仇恨 [%]"
L["Threat"] = "仇恨"
L["TPS"] = "TPS"
L["Toggle Focus"] = "鎖定Focus"
@@ -125,6 +126,8 @@ L["Show TPS"] = "顯示TPS"
L["Show threat per second values"] = "顯示每秒仇恨量"
L["TPS Window"] = "TP視窗"
L["TPS_WINDOW_DESC"] = "每秒仇恨量的計算是根據最後X秒視窗內的變化而決定的"
L["Show Threat Values"] = true
L["Show Threat %"] = true
L["Show Headings"] = "顯示上標題"
L["Show column headings"] = "顯示專欄的上標題"
L["Heading BG Color"] = "上標題的背景顏色"
+57 -8
View File
@@ -121,6 +121,8 @@ local defaults = {
HeadingBGColor = {r = 0, g = 0, b = 0, a = 0,},
UseMyBarColor = false,
MyBarColor = {r = 1, g = 0, b = 0, a = 1,},
ShowPercent = true,
ShowValue = true,
},
ShowWith = {
Pet = true,
@@ -920,7 +922,11 @@ do
if barID == 0 then
bar.Text1:SetText(L["Name"])
bar.Text2:SetText(L["Threat [%]"])
if db.Bar.ShowValue and db.Bar.ShowPercent then
bar.Text2:SetText(L["Threat [%]"])
else
bar.Text2:SetText(L["Threat"])
end
bar.Text3:SetText(L["TPS"])
color = db.Bar.HeadingBGColor
bar.texture:SetVertexColor(color.r, color.g, color.b, color.a)
@@ -1299,10 +1305,20 @@ function Omen:UpdateBars()
local bar = bars[j]
local threat = threatTable[guid]
bar.Text1:SetText(guidNameLookup[guid])
if dbBar.ShortNumbers and threat > 100000 then
bar.Text2:SetFormattedText("%2.1fk [%d%%]", threat / 100000, tankThreat == 0 and 0 or threat / tankThreat * 100)
if dbBar.ShowPercent and dbBar.ShowValue then
if dbBar.ShortNumbers and threat > 100000 then
bar.Text2:SetFormattedText("%2.1fk [%d%%]", threat / 100000, tankThreat == 0 and 0 or threat / tankThreat * 100)
else
bar.Text2:SetFormattedText("%d [%d%%]", threat / 100, tankThreat == 0 and 0 or threat / tankThreat * 100)
end
elseif dbBar.ShowValue then
if dbBar.ShortNumbers and threat > 100000 then
bar.Text2:SetFormattedText("%2.1fk", threat / 100000)
else
bar.Text2:SetFormattedText("%d", threat / 100)
end
else
bar.Text2:SetFormattedText("%d [%d%%]", threat / 100, tankThreat == 0 and 0 or threat / tankThreat * 100)
bar.Text2:SetFormattedText("%d%%", tankThreat == 0 and 0 or threat / tankThreat * 100)
end
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)
@@ -1920,6 +1936,7 @@ local options = {
order = 3,
name = L["Short Numbers"],
desc = L["Display large numbers in Ks"],
disabled = function() return not db.Bar.ShowValue end
},
Height = {
type = "range",
@@ -1973,9 +1990,41 @@ local options = {
min = 3, max = 15, step = 0.1,
disabled = function() return not db.Bar.ShowTPS end,
},
ShowHeadings = {
ShowValue = {
type = "toggle",
order = 8,
name = L["Show Threat Values"],
desc = L["Show Threat Values"],
set = function(info, value)
db.Bar.ShowValue = value
if not value then
db.Bar.ShowPercent = true
bars[0].Text2:SetText(L["Threat"])
elseif db.Bar.ShowPercent then
bars[0].Text2:SetText(L["Threat [%]"])
end
Omen:UpdateBars()
end,
},
ShowPercent = {
type = "toggle",
order = 9,
name = L["Show Threat %"],
desc = L["Show Threat %"],
set = function(info, value)
db.Bar.ShowPercent = value
if not value then
db.Bar.ShowValue = true
bars[0].Text2:SetText(L["Threat"])
elseif db.Bar.ShowValue then
bars[0].Text2:SetText(L["Threat [%]"])
end
Omen:UpdateBars()
end,
},
ShowHeadings = {
type = "toggle",
order = 11,
name = L["Show Headings"],
desc = L["Show column headings"],
set = function(info, value)
@@ -1986,7 +2035,7 @@ local options = {
},
HeadingBGColor = {
type = "color",
order = 9,
order = 12,
name = L["Heading BG Color"],
desc = L["Heading background color"],
hasAlpha = true,
@@ -2003,13 +2052,13 @@ local options = {
},
UseMyBarColor = {
type = "toggle",
order = 10,
order = 13,
name = L["Use 'My Bar' color"],
desc = L["Use a different colored background for your threat bar in Omen"],
},
MyBarColor = {
type = "color",
order = 11,
order = 14,
name = L["'My Bar' BG Color"],
desc = L["The background color for your threat bar"],
hasAlpha = true,