- Added options to change the brackets and the separator for dps/percent block.
- Added options for show (or hide) totals, dps and percent amount.
This commit is contained in:
@@ -356,6 +356,10 @@
|
||||
|
||||
local percent_script = _detalhes.custom_function_cache [instance.customName .. "Percent"]
|
||||
local total_script = _detalhes.custom_function_cache [instance.customName .. "Total"]
|
||||
|
||||
local bars_show_data = instance.row_info.textR_show_data
|
||||
local bars_brackets = instance:GetBarBracket()
|
||||
local bars_separator = instance:GetBarSeparator()
|
||||
|
||||
if (instance.bars_sort_direction == 1) then --top to bottom
|
||||
|
||||
@@ -382,13 +386,13 @@
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = instance.barraS[1], iter_last, 1 do
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat)
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
else
|
||||
for i = instance.barraS[1], instance.barraS[2], 1 do
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat)
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -418,13 +422,13 @@
|
||||
gump:Fade (row1, "out")
|
||||
|
||||
for i = iter_last, instance.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat)
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
else
|
||||
for i = instance.barraS[2], instance.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat)
|
||||
instance_container._ActorTable[i]:UpdateBar (barras_container, qual_barra, percentage_type, i, total, top, instance, force, percent_script, total_script, combat, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -445,7 +449,7 @@
|
||||
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
function atributo_custom:UpdateBar (row_container, index, percentage_type, rank, total, top, instance, is_forced, percent_script, total_script, combat)
|
||||
function atributo_custom:UpdateBar (row_container, index, percentage_type, rank, total, top, instance, is_forced, percent_script, total_script, combat, bars_show_data, bars_brackets, bars_separator)
|
||||
|
||||
local row = row_container [index]
|
||||
|
||||
@@ -466,20 +470,26 @@
|
||||
percent = _cstr ("%.1f", self.value / top * 100)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (not bars_show_data [3]) then
|
||||
percent = ""
|
||||
else
|
||||
percent = percent .. "%"
|
||||
end
|
||||
|
||||
if (total_script) then
|
||||
local value = total_script (self.value, top, total, combat, instance)
|
||||
if (type (value) == "number") then
|
||||
row.texto_direita:SetText (SelectedToKFunction (_, value) .. " (" .. percent .. "%)")
|
||||
row.texto_direita:SetText (SelectedToKFunction (_, value) .. bars_brackets[1] .. percent .. bars_brackets[2])
|
||||
else
|
||||
row.texto_direita:SetText (value .. " (" .. percent .. "%)")
|
||||
row.texto_direita:SetText (value .. bars_brackets[1] .. percent .. bars_brackets[2])
|
||||
end
|
||||
else
|
||||
local formated_value = SelectedToKFunction (_, self.value)
|
||||
if (UsingCustomRightText) then
|
||||
row.texto_direita:SetText (_string_replace (instance.row_info.textR_custom_text, formated_value, "", percent, self))
|
||||
else
|
||||
row.texto_direita:SetText (formated_value .. " (" .. percent .. "%)")
|
||||
row.texto_direita:SetText (formated_value .. bars_brackets[1] .. percent .. bars_brackets[2])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+133
-41
@@ -282,11 +282,11 @@
|
||||
--[[exported]] function _detalhes:GetBarColor (actor)
|
||||
actor = actor or self
|
||||
|
||||
if (actor.owner) then
|
||||
return _unpack (_detalhes.class_colors [actor.owner.classe])
|
||||
|
||||
elseif (actor.monster) then
|
||||
if (actor.monster) then
|
||||
return _unpack (_detalhes.class_colors.ENEMY)
|
||||
|
||||
elseif (actor.owner) then
|
||||
return _unpack (_detalhes.class_colors [actor.owner.classe])
|
||||
|
||||
elseif (actor.arena_enemy) then
|
||||
return _unpack (_detalhes.class_colors.ARENA_ENEMY)
|
||||
@@ -518,7 +518,21 @@
|
||||
end
|
||||
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. tabela [1])
|
||||
esta_barra.texto_direita:SetText (tabela [2] .. " (" .. porcentagem .. "%)")
|
||||
|
||||
local bars_show_data = instancia.row_info.textR_show_data
|
||||
local bars_brackets = instancia:GetBarBracket()
|
||||
|
||||
local total_frags = tabela [2]
|
||||
if (not bars_show_data [1]) then
|
||||
total_frags = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (total_frags .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
|
||||
|
||||
esta_barra.texto_esquerdo:SetTextColor (1, 1, 1, 1)
|
||||
esta_barra.texto_direita:SetTextColor (1, 1, 1, 1)
|
||||
@@ -728,7 +742,25 @@
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)")
|
||||
|
||||
local bars_show_data = instancia.row_info.textR_show_data
|
||||
local bars_brackets = instancia:GetBarBracket()
|
||||
local bars_separator = instancia:GetBarSeparator()
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_damage = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
formated_dps = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2])
|
||||
|
||||
end
|
||||
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
|
||||
@@ -1124,14 +1156,15 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh
|
||||
end
|
||||
|
||||
--print ("AMOUT: " .. amount)
|
||||
instancia:AtualizarScrollBar (amount)
|
||||
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras --> evita buscar N vezes a key .barras dentro da instância
|
||||
local barras_container = instancia.barras
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
local bars_show_data = instancia.row_info.textR_show_data
|
||||
local bars_brackets = instancia:GetBarBracket()
|
||||
local bars_separator = instancia:GetBarSeparator()
|
||||
local baseframe = instancia.baseframe
|
||||
|
||||
local use_animations = _detalhes.is_using_row_animations and (not baseframe.isStretching and not forcar and not baseframe.isResizing)
|
||||
|
||||
if (total == 0) then
|
||||
@@ -1206,15 +1239,15 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], iter_last-1, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -1222,15 +1255,15 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -1262,31 +1295,31 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = iter_last-1, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
-- /run print (_detalhes:GetInstance(1).barraS[2]) -- vai do 5 ao 1 -- qual barra começa no 1 -- i = 5 até 1 -- player 5 atualiza na barra 1 / player 1 atualiza na barra 5
|
||||
for i = instancia.barraS[2], instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -1320,7 +1353,7 @@ end
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
--self = esta classe de dano
|
||||
function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations)
|
||||
function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
-- instância, container das barras, qual barra, colocação, total?, sub atributo, forçar refresh, key
|
||||
|
||||
local esta_barra = barras_container [qual_barra] --> pega a referência da barra na janela
|
||||
@@ -1393,9 +1426,21 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
if (not bars_show_data [1]) then
|
||||
formated_damage = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
formated_dps = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
esta_barra.texto_direita:SetText (formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 2) then --> mostrando dps
|
||||
|
||||
@@ -1429,12 +1474,30 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
rr, gg, bb = _detalhes:hex (_math_floor (rr*255)), _detalhes:hex (_math_floor (gg*255)), "28"
|
||||
local color_percent = "" .. rr .. gg .. bb .. ""
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_dps .. " (|cFFFF4444-|r|cFF" .. color_percent .. SelectedToKFunction (_, _math_floor (diff_from_topdps)) .. "|r)") --seta o texto da direita
|
||||
if (not bars_show_data [1]) then
|
||||
formated_dps = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
color_percent = ""
|
||||
else
|
||||
color_percent = bars_brackets[1] .. "|cFFFF4444-|r|cFF" .. color_percent .. SelectedToKFunction (_, _math_floor (diff_from_topdps)) .. "|r" .. bars_brackets[2]
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_dps .. color_percent)
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_dps .. " |TInterface\\GROUPFRAME\\UI-Group-LeaderIcon:14:14:0:0:16:16:0:16:0:16|t ") --seta o texto da direita
|
||||
|
||||
local icon = " |TInterface\\GROUPFRAME\\UI-Group-LeaderIcon:14:14:0:0:16:16:0:16:0:16|t "
|
||||
if (not bars_show_data [1]) then
|
||||
formated_dps = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
icon = ""
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_dps .. icon)
|
||||
end
|
||||
end
|
||||
esta_porcentagem = _math_floor ((dps/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((dps/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 3) then --> mostrando damage taken
|
||||
|
||||
@@ -1447,9 +1510,21 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage_taken, formated_dtps, porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage_taken .." (" .. formated_dtps .. ", " .. porcentagem .. "%)") --seta o texto da direita --
|
||||
if (not bars_show_data [1]) then
|
||||
formated_damage_taken = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
formated_dtps = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
esta_barra.texto_direita:SetText (formated_damage_taken .. bars_brackets[1] .. formated_dtps .. bars_separator .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
esta_porcentagem = _math_floor ((self.damage_taken/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 4) then --> mostrando friendly fire
|
||||
|
||||
@@ -1457,10 +1532,20 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_friendly_fire, "", porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_friendly_fire .. " (" .. porcentagem .. "%)") --seta o texto da direita --
|
||||
else
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_friendly_fire = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_friendly_fire .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.friendlyfire_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((self.friendlyfire_total/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 6) then --> mostrando enemies
|
||||
|
||||
@@ -1471,10 +1556,23 @@ function atributo_damage:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_damage, formated_dps, porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_damage .. " (" .. formated_dps .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
else
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_damage = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
formated_dps = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
esta_barra.texto_direita:SetText (formated_damage .. bars_brackets[1] .. formated_dps .. bars_separator .. porcentagem .. bars_brackets[2])
|
||||
|
||||
end
|
||||
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((damage_total/instancia.top) * 100)
|
||||
|
||||
end
|
||||
|
||||
@@ -1585,12 +1683,6 @@ end
|
||||
esta_barra.icone_classe:SetVertexColor (1, 1, 1)
|
||||
|
||||
elseif (self.classe == "UNKNOW") then
|
||||
--esta_barra.icone_classe:SetTexture ("Interface\\LFGFRAME\\LFGROLE")
|
||||
--esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1)
|
||||
|
||||
--esta_barra.icone_classe:SetTexture ([[Interface\TARGETINGFRAME\PetBadge-Undead]])
|
||||
--esta_barra.icone_classe:SetTexCoord (0.09375, 0.90625, 0.09375, 0.90625)
|
||||
|
||||
esta_barra.icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_plus]])
|
||||
esta_barra.icone_classe:SetTexCoord (0.50390625, 0.62890625, 0, 0.125)
|
||||
|
||||
|
||||
+44
-16
@@ -197,7 +197,6 @@ function atributo_energy:AtualizarResources (qual_barra, colocacao, instancia)
|
||||
local rps = _math_floor (self.resource / combat_time)
|
||||
|
||||
local formated_resource = SelectedToKFunction (_, self.resource)
|
||||
--local formated_rps = SelectedToKFunction (_, rps)
|
||||
local formated_rps = _cstr ("%.2f", self.resource / combat_time)
|
||||
|
||||
local porcentagem
|
||||
@@ -211,7 +210,24 @@ function atributo_energy:AtualizarResources (qual_barra, colocacao, instancia)
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_resource, formated_rps, porcentagem, self))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_resource .. " (" .. formated_rps .. ", " .. porcentagem .. "%)")
|
||||
|
||||
local bars_show_data = instancia.row_info.textR_show_data
|
||||
local bars_brackets = instancia:GetBarBracket()
|
||||
local bars_separator = instancia:GetBarSeparator()
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_resource = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
formated_rps = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_resource .. bars_brackets[1] .. formated_rps .. bars_separator .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
|
||||
esta_barra.texto_esquerdo:SetText (colocacao .. ". " .. self.nome)
|
||||
@@ -438,6 +454,9 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
local bars_show_data = instancia.row_info.textR_show_data
|
||||
local bars_brackets = instancia:GetBarBracket()
|
||||
local bars_separator = instancia:GetBarSeparator()
|
||||
local baseframe = instancia.baseframe
|
||||
|
||||
local use_animations = _detalhes.is_using_row_animations and (not baseframe.isStretching and not forcar and not baseframe.isResizing)
|
||||
@@ -502,15 +521,15 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], iter_last-1, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -518,15 +537,15 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -558,30 +577,30 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = iter_last-1, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[2], instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instância, index, total, valor da 1º barra
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -605,7 +624,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
|
||||
end
|
||||
|
||||
function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations)
|
||||
function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
|
||||
local esta_barra = instancia.barras[qual_barra] --> pega a referência da barra na janela
|
||||
|
||||
@@ -639,7 +658,16 @@ function atributo_energy:AtualizaBarra (instancia, barras_container, qual_barra,
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_energy, "", porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_energy .. " (" .. porcentagem .. "%)") --seta o texto da direita
|
||||
if (not bars_show_data [1]) then
|
||||
formated_energy = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_energy .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
|
||||
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
|
||||
|
||||
+106
-36
@@ -359,6 +359,9 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras --> evita buscar N vezes a key .barras dentro da instância
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
local bars_show_data = instancia.row_info.textR_show_data
|
||||
local bars_brackets = instancia:GetBarBracket()
|
||||
local bars_separator = instancia:GetBarSeparator()
|
||||
local baseframe = instancia.baseframe
|
||||
|
||||
local use_animations = _detalhes.is_using_row_animations and (not baseframe.isStretching and not forcar and not baseframe.isResizing)
|
||||
@@ -423,15 +426,15 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], iter_last-1, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -439,15 +442,15 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -479,30 +482,30 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = iter_last-1, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
else
|
||||
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
|
||||
for i = instancia.barraS[2]-1, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
else
|
||||
for i = instancia.barraS[2], instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
end
|
||||
@@ -542,7 +545,7 @@ end
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
--function atributo_heal:AtualizaBarra (instancia, qual_barra, lugar, total, sub_atributo, forcar)
|
||||
function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations)
|
||||
function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
|
||||
local esta_barra = instancia.barras[qual_barra] --> pega a referência da barra na janela
|
||||
|
||||
@@ -603,8 +606,9 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
|
||||
-- >>>>>>>>>>>>>>> texto da direita
|
||||
if (instancia.atributo == 5) then --> custom
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.custom) .. " (" .. porcentagem .. "%)") --seta o texto da direita
|
||||
esta_porcentagem = _math_floor ((self.custom/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_barra.texto_direita:SetText (_detalhes:ToK (self.custom) .. " (" .. porcentagem .. "%)")
|
||||
esta_porcentagem = _math_floor ((self.custom/instancia.top) * 100)
|
||||
|
||||
else
|
||||
if (sub_atributo == 1) then --> mostrando healing done
|
||||
|
||||
@@ -616,9 +620,22 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_heal, formated_hps, porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_heal .." (" .. formated_hps .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_heal = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
formated_hps = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_heal .. bars_brackets[1] .. formated_hps .. bars_separator .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((healing_total/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((healing_total/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 2) then --> mostrando hps
|
||||
|
||||
@@ -629,10 +646,23 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_hps, formated_heal, porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_hps .. " (" .. formated_heal .. ", " .. porcentagem .. "%)") --seta o texto da direita
|
||||
else
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_hps = ""
|
||||
end
|
||||
if (not bars_show_data [2]) then
|
||||
formated_heal = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_hps .. bars_brackets[1] .. formated_heal .. bars_separator .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((hps/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((hps/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 3) then --> mostrando overall
|
||||
|
||||
@@ -648,20 +678,40 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_overheal, "", overheal_percent, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_overheal .." (" .. overheal_percent .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.totalover/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
|
||||
elseif (sub_atributo == 4) then --> mostrando healing take
|
||||
if (not bars_show_data [1]) then
|
||||
formated_overheal = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
overheal_percent = ""
|
||||
else
|
||||
overheal_percent = overheal_percent .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_overheal .. bars_brackets[1] .. overheal_percent .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.totalover/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 4) then --> mostrando healing taken
|
||||
|
||||
local formated_healtaken = SelectedToKFunction (_, self.healing_taken)
|
||||
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_healtaken, "", porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_healtaken .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
else
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_healtaken = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_healtaken .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.healing_taken/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((self.healing_taken/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 5) then --> mostrando enemy heal
|
||||
|
||||
@@ -670,9 +720,19 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_enemyheal, "", porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_enemyheal .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_enemyheal = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_enemyheal .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.heal_enemy_amt/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((self.heal_enemy_amt/instancia.top) * 100)
|
||||
|
||||
elseif (sub_atributo == 6) then --> mostrando damage prevented
|
||||
|
||||
@@ -681,9 +741,19 @@ function atributo_heal:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, formated_absorbs, "", porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (formated_absorbs .. " (" .. porcentagem .. "%)") --seta o texto da direita --_cstr("%.1f", dps) .. " - ".. DPS do damage taken não será possivel correto?
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
formated_absorbs = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (formated_absorbs .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
|
||||
end
|
||||
esta_porcentagem = _math_floor ((self.totalabsorb/instancia.top) * 100) --> determina qual o tamanho da barra
|
||||
esta_porcentagem = _math_floor ((self.totalabsorb/instancia.top) * 100)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1435,7 +1505,7 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
end
|
||||
|
||||
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[4]) --seta o texto da esqueda
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .."%".. instancia.divisores.fecha)
|
||||
|
||||
barra.icone:SetTexture (tabela[5])
|
||||
|
||||
@@ -1483,7 +1553,7 @@ function atributo_heal:MontaInfoOverHealing()
|
||||
end
|
||||
|
||||
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha)
|
||||
barra.texto_esquerdo:SetWidth (barra:GetWidth() - barra.texto_direita:GetStringWidth() - 30)
|
||||
|
||||
-- icon
|
||||
@@ -1608,9 +1678,9 @@ function atributo_heal:MontaInfoHealingDone()
|
||||
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[1]) --seta o texto da esqueda
|
||||
|
||||
if (info.sub_atributo == 2) then
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (_math_floor (tabela[2]/meu_tempo)) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha)
|
||||
else
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .. _cstr ("%.1f", tabela[3]) .. instancia.divisores.fecha)
|
||||
end
|
||||
|
||||
barra.minha_tabela = self
|
||||
@@ -1769,7 +1839,7 @@ function atributo_heal:MontaDetalhesHealingTaken (nome, barra)
|
||||
end
|
||||
|
||||
barra.texto_esquerdo:SetText (index..instancia.divisores.colocacao..tabela[4]) --seta o texto da esqueda
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .."%".. instancia.divisores.fecha) --seta o texto da direita
|
||||
barra.texto_direita:SetText (_detalhes:comma_value (tabela[2]) .." ".. instancia.divisores.abre .._cstr("%.1f", tabela[3]) .."%".. instancia.divisores.fecha)
|
||||
|
||||
barra.icone:SetTexture (tabela[5])
|
||||
|
||||
|
||||
@@ -173,9 +173,12 @@ _detalhes.instance_defaults = {
|
||||
--right text customization
|
||||
textR_enable_custom_text = false,
|
||||
textR_custom_text = "{data1} ({data2}, {data3}%)",
|
||||
--right text show which infos
|
||||
textR_show_data = {true, true, true},
|
||||
textR_bracket = "(",
|
||||
textR_separator = ",",
|
||||
--left text bar number
|
||||
textL_show_number = true,
|
||||
|
||||
--if text class color are false, this color will be used
|
||||
fixed_text_color = {1, 1, 1},
|
||||
--left text outline effect
|
||||
|
||||
@@ -691,6 +691,9 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
local qual_barra = 1
|
||||
local barras_container = instancia.barras
|
||||
local percentage_type = instancia.row_info.percent_type
|
||||
local bars_show_data = instancia.row_info.textR_show_data
|
||||
local bars_brackets = instancia:GetBarBracket()
|
||||
local bars_separator = instancia:GetBarSeparator()
|
||||
local use_animations = _detalhes.is_using_row_animations and (not instancia.baseframe.isStretching and not forcar)
|
||||
|
||||
if (total == 0) then
|
||||
@@ -702,13 +705,13 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
|
||||
if (instancia.bars_sort_direction == 1) then --top to bottom
|
||||
for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
elseif (instancia.bars_sort_direction == 2) then --bottom to top
|
||||
for i = instancia.barraS[2], instancia.barraS[1], 1 do --> vai atualizar só o range que esta sendo mostrado
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations) --> instância, index, total, valor da 1º barra
|
||||
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, nil, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
qual_barra = qual_barra+1
|
||||
end
|
||||
|
||||
@@ -744,7 +747,7 @@ end
|
||||
|
||||
local actor_class_color_r, actor_class_color_g, actor_class_color_b
|
||||
|
||||
function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, is_dead, percentage_type, use_animations)
|
||||
function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, lugar, total, sub_atributo, forcar, keyName, is_dead, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
|
||||
|
||||
local esta_barra = instancia.barras[qual_barra] --> pega a referência da barra na janela
|
||||
|
||||
@@ -778,7 +781,18 @@ function atributo_misc:AtualizaBarra (instancia, barras_container, qual_barra, l
|
||||
if (UsingCustomRightText) then
|
||||
esta_barra.texto_direita:SetText (_string_replace (instancia.row_info.textR_custom_text, meu_total, "", porcentagem, self, instancia.showing))
|
||||
else
|
||||
esta_barra.texto_direita:SetText (meu_total .." (" .. porcentagem .. "%)") --seta o texto da direita
|
||||
|
||||
if (not bars_show_data [1]) then
|
||||
meu_total = ""
|
||||
end
|
||||
if (not bars_show_data [3]) then
|
||||
porcentagem = ""
|
||||
else
|
||||
porcentagem = porcentagem .. "%"
|
||||
end
|
||||
|
||||
esta_barra.texto_direita:SetText (meu_total .. bars_brackets[1] .. porcentagem .. bars_brackets[2])
|
||||
|
||||
end
|
||||
|
||||
if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip
|
||||
|
||||
+174
-11
@@ -6044,6 +6044,150 @@ function window:CreateFrame5()
|
||||
frame5.customLeftTextButton:GetNormalTexture():SetDesaturated (true)
|
||||
frame5.customLeftTextButton.tooltip = Loc ["STRING_OPTIONS_RESET_TO_DEFAULT"]
|
||||
|
||||
--> total dps percent bracket separator
|
||||
|
||||
-- total
|
||||
g:NewSwitch (frame5, _, "$parentRightTextShowTotalSlider", "RightTextShowTotalSlider", 60, 20, _, _, instance.row_info.textR_show_data [1])
|
||||
g:NewLabel (frame5, _, "$parentRightTextShowTotalLabel", "RightTextShowTotalLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_TOTAL"], "GameFontHighlightLeft")
|
||||
|
||||
frame5.RightTextShowTotalSlider:SetPoint ("left", frame5.RightTextShowTotalLabel, "right", 2)
|
||||
frame5.RightTextShowTotalSlider.OnSwitch = function (self, instance, value)
|
||||
instance:SetBarRightTextSettings (value)
|
||||
|
||||
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
|
||||
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
|
||||
if (this_instance ~= instance) then
|
||||
instance:SetBarRightTextSettings (value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame5, "RightTextShowTotalSlider", "RightTextShowTotalLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_TOTAL_DESC"])
|
||||
|
||||
-- ps
|
||||
g:NewSwitch (frame5, _, "$parentRightTextShowPSSlider", "RightTextShowPSSlider", 60, 20, _, _, instance.row_info.textR_show_data [2])
|
||||
g:NewLabel (frame5, _, "$parentRightTextShowPSLabel", "RightTextShowPSLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PS"], "GameFontHighlightLeft")
|
||||
|
||||
frame5.RightTextShowPSSlider:SetPoint ("left", frame5.RightTextShowPSLabel, "right", 2)
|
||||
frame5.RightTextShowPSSlider.OnSwitch = function (self, instance, value)
|
||||
instance:SetBarRightTextSettings (nil, value)
|
||||
|
||||
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
|
||||
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
|
||||
if (this_instance ~= instance) then
|
||||
instance:SetBarRightTextSettings (nil, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame5, "RightTextShowPSSlider", "RightTextShowPSLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PS_DESC"])
|
||||
|
||||
-- percent
|
||||
|
||||
g:NewSwitch (frame5, _, "$parentRightTextShowPercentSlider", "RightTextShowPercentSlider", 60, 20, _, _, instance.row_info.textR_show_data [3])
|
||||
g:NewLabel (frame5, _, "$parentRightTextShowPercentLabel", "RightTextShowPercentLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PERCENT"], "GameFontHighlightLeft")
|
||||
|
||||
frame5.RightTextShowPercentSlider:SetPoint ("left", frame5.RightTextShowPercentLabel, "right", 2)
|
||||
frame5.RightTextShowPercentSlider.OnSwitch = function (self, instance, value)
|
||||
instance:SetBarRightTextSettings (nil, nil, value)
|
||||
|
||||
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
|
||||
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
|
||||
if (this_instance ~= instance) then
|
||||
instance:SetBarRightTextSettings (nil, nil, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame5, "RightTextShowPercentSlider", "RightTextShowPercentLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_PERCENT_DESC"])
|
||||
|
||||
--brackets
|
||||
local onSelectBracket = function (_, instance, value)
|
||||
instance:SetBarRightTextSettings (nil, nil, nil, value)
|
||||
|
||||
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
|
||||
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
|
||||
if (this_instance ~= instance) then
|
||||
instance:SetBarRightTextSettings (nil, nil, nil, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
local BracketTable = {
|
||||
{value = "(", label = "(", onclick = onSelectBracket, icon = ""},
|
||||
{value = "{", label = "{", onclick = onSelectBracket, icon = ""},
|
||||
{value = "[", label = "[", onclick = onSelectBracket, icon = ""},
|
||||
{value = "<", label = "<", onclick = onSelectBracket, icon = ""},
|
||||
{value = "NONE", label = "no bracket", onclick = onSelectBracket, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]]},
|
||||
}
|
||||
local buildBracketMenu = function()
|
||||
return BracketTable
|
||||
end
|
||||
|
||||
local d = g:NewDropDown (frame5, _, "$parentBracketDropdown", "BracketDropdown", 60, 20, buildBracketMenu, nil)
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||
d:SetBackdrop (dropdown_backdrop)
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
|
||||
g:NewLabel (frame5, _, "$parentBracketLabel", "BracketLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_BRACKET"], "GameFontHighlightLeft")
|
||||
frame5.BracketDropdown:SetPoint ("left", frame5.BracketLabel, "right", 2)
|
||||
|
||||
window:CreateLineBackground2 (frame5, "BracketDropdown", "BracketLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_BRACKET_DESC"])
|
||||
|
||||
--separators
|
||||
local onSelectSeparator = function (_, instance, value)
|
||||
instance:SetBarRightTextSettings (nil, nil, nil, nil, value)
|
||||
|
||||
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
|
||||
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
|
||||
if (this_instance ~= instance) then
|
||||
instance:SetBarRightTextSettings (nil, nil, nil, nil, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
local SeparatorTable = {
|
||||
{value = ",", label = ",", onclick = onSelectSeparator, icon = ""},
|
||||
{value = ".", label = ".", onclick = onSelectSeparator, icon = ""},
|
||||
{value = ";", label = ";", onclick = onSelectSeparator, icon = ""},
|
||||
{value = "-", label = "-", onclick = onSelectSeparator, icon = ""},
|
||||
{value = "|", label = "|", onclick = onSelectSeparator, icon = ""},
|
||||
{value = "/", label = "/", onclick = onSelectSeparator, icon = ""},
|
||||
{value = "\\", label = "\\", onclick = onSelectSeparator, icon = ""},
|
||||
{value = "~", label = "~", onclick = onSelectSeparator, icon = ""},
|
||||
{value = "NONE", label = "no separator", onclick = onSelectSeparator, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]]},
|
||||
}
|
||||
local buildSeparatorMenu = function()
|
||||
return SeparatorTable
|
||||
end
|
||||
|
||||
local d = g:NewDropDown (frame5, _, "$parentSeparatorDropdown", "SeparatorDropdown", 60, 20, buildSeparatorMenu, nil)
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||
d:SetBackdrop (dropdown_backdrop)
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
|
||||
g:NewLabel (frame5, _, "$parentSeparatorLabel", "SeparatorLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_SEPARATOR"], "GameFontHighlightLeft")
|
||||
frame5.SeparatorDropdown:SetPoint ("left", frame5.SeparatorLabel, "right", 2)
|
||||
|
||||
window:CreateLineBackground2 (frame5, "SeparatorDropdown", "SeparatorLabel", Loc ["STRING_OPTIONS_TEXT_SHOW_SEPARATOR_DESC"])
|
||||
|
||||
--> anchors
|
||||
|
||||
--general anchor
|
||||
@@ -6064,24 +6208,31 @@ function window:CreateFrame5()
|
||||
{"textLeftOutlineLabel", 2},
|
||||
{"classColorsLeftTextLabel", 3},
|
||||
{"PositionNumberLabel", 4},
|
||||
{"cutomLeftTextLabel", 5},
|
||||
{"cutomLeftTextLabel", 5, true},
|
||||
{"cutomLeftTextEntryLabel", 6},
|
||||
{"RightTextAnchorLabel", 7, true},
|
||||
{"textRightOutlineLabel", 8},
|
||||
{"classColorsRightTextLabel", 9},
|
||||
{"cutomRightTextLabel", 10},
|
||||
{"cutomRightTextEntryLabel", 11},
|
||||
|
||||
{"RowGeneralAnchorLabel", 7, true},
|
||||
{frame5.fonsizeLabel, 8}, --text size
|
||||
{frame5.fontLabel, 9},--text fontface
|
||||
{frame5.fixedTextColorLabel, 10},
|
||||
{frame5.percentLabel, 11, true},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame5, left_side, x, window.top_start_at)
|
||||
|
||||
local right_side = {
|
||||
{"RowGeneralAnchorLabel", 1, true},
|
||||
{frame5.fonsizeLabel, 2}, --text size
|
||||
{frame5.fontLabel, 3},--text fontface
|
||||
{frame5.fixedTextColorLabel, 4},
|
||||
{frame5.percentLabel, 5},
|
||||
{"RightTextAnchorLabel", 1, true},
|
||||
{"textRightOutlineLabel", 2},
|
||||
{"classColorsRightTextLabel", 3},
|
||||
|
||||
{"RightTextShowTotalLabel", 4, true},
|
||||
{"RightTextShowPSLabel", 5},
|
||||
{"RightTextShowPercentLabel", 6},
|
||||
{"SeparatorLabel", 7, true},
|
||||
{"BracketLabel", 8},
|
||||
|
||||
{"cutomRightTextLabel", 9, true},
|
||||
{"cutomRightTextEntryLabel", 10},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame5, right_side, window.right_start_at, window.top_start_at)
|
||||
@@ -9683,7 +9834,19 @@ end --> if not window
|
||||
|
||||
_G.DetailsOptionsWindow5PositionNumberSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow5PositionNumberSlider.MyObject:SetValue (editing_instance.row_info.textL_show_number)
|
||||
|
||||
_G.DetailsOptionsWindow5BracketDropdown.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow5SeparatorDropdown.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow5RightTextShowTotalSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow5RightTextShowPSSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow5RightTextShowPercentSlider.MyObject:SetFixedParameter (editing_instance)
|
||||
|
||||
_G.DetailsOptionsWindow5BracketDropdown.MyObject:Select (editing_instance.row_info.textR_bracket)
|
||||
_G.DetailsOptionsWindow5SeparatorDropdown.MyObject:Select (editing_instance.row_info.textR_separator)
|
||||
_G.DetailsOptionsWindow5RightTextShowTotalSlider.MyObject:SetValue (editing_instance.row_info.textR_show_data [1])
|
||||
_G.DetailsOptionsWindow5RightTextShowPSSlider.MyObject:SetValue (editing_instance.row_info.textR_show_data [2])
|
||||
_G.DetailsOptionsWindow5RightTextShowPercentSlider.MyObject:SetValue (editing_instance.row_info.textR_show_data [3])
|
||||
|
||||
--> window 6
|
||||
_G.DetailsOptionsWindow6BackdropDropdown.MyObject:SetFixedParameter (editing_instance)
|
||||
_G.DetailsOptionsWindow6BackdropDropdown.MyObject:Select (editing_instance.backdrop_texture)
|
||||
|
||||
@@ -3592,6 +3592,57 @@ function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, back
|
||||
|
||||
end
|
||||
|
||||
local brackets = {
|
||||
["("] = {" (", ")"},
|
||||
["{"] = {" {", "}"},
|
||||
["["] = {" [", "]"},
|
||||
["<"] = {" <", ">"},
|
||||
["NONE"] = {" ", ""},
|
||||
}
|
||||
|
||||
local separators = {
|
||||
[","] = ", ",
|
||||
["."] = ". ",
|
||||
[";"] = "; ",
|
||||
["-"] = " - ",
|
||||
["|"] = " | ",
|
||||
["/"] = " / ",
|
||||
["\\"] = " \\ ",
|
||||
["~"] = " ~ ",
|
||||
["NONE"] = "",
|
||||
}
|
||||
|
||||
function _detalhes:GetBarBracket()
|
||||
return brackets [self.row_info.textR_bracket]
|
||||
end
|
||||
|
||||
function _detalhes:GetBarSeparator()
|
||||
return separators [self.row_info.textR_separator]
|
||||
end
|
||||
|
||||
function _detalhes:SetBarRightTextSettings (total, persecond, percent, bracket, separator)
|
||||
|
||||
if (type (total) == "boolean") then
|
||||
self.row_info.textR_show_data [1] = total
|
||||
end
|
||||
if (type (persecond) == "boolean") then
|
||||
self.row_info.textR_show_data [2] = persecond
|
||||
end
|
||||
if (type (percent) == "boolean") then
|
||||
self.row_info.textR_show_data [3] = percent
|
||||
end
|
||||
|
||||
if (bracket) then
|
||||
self.row_info.textR_bracket = bracket
|
||||
end
|
||||
if (separator) then
|
||||
self.row_info.textR_separator = separator
|
||||
end
|
||||
|
||||
self:InstanceReset()
|
||||
|
||||
end
|
||||
|
||||
--/script _detalhes:InstanceRefreshRows (_detalhes.tabela_instancias[1])
|
||||
|
||||
--> on update function
|
||||
@@ -5472,6 +5523,7 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
self:SetBarSettings (self.row_info.height)
|
||||
self:SetBarBackdropSettings()
|
||||
self:SetBarSpecIconSettings()
|
||||
self:SetBarRightTextSettings()
|
||||
|
||||
--> update toolbar
|
||||
self:ToolbarSide()
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user