- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user