Rewrite on Faders: Details.FadeHandler.Fader(frame, animationType, speed, hideType)

This commit is contained in:
Tercio Jose
2021-04-24 18:17:59 -03:00
parent 4a28c63b4e
commit 2379884746
35 changed files with 722 additions and 337 deletions
+6 -6
View File
@@ -190,7 +190,7 @@
if (force) then
if (instance:IsGroupMode()) then
for i = 1, instance.rows_fit_in_window do
gump:Fade (instance.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instance.barras [i], "in", 0.3)
end
end
end
@@ -428,7 +428,7 @@
row1.icone_classe:SetTexture (instance.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (row1, "out")
for i = instance.barraS[1], iter_last, 1 do
instance_container._ActorTable[i]:UpdateBar (barras_container, whichRowLine, percentage_type, i, total, top, instance, force, percent_script, total_script, combat, bars_show_data, bars_brackets, bars_separator)
@@ -464,7 +464,7 @@
row1.icone_classe:SetTexture (instance.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (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, whichRowLine, percentage_type, i, total, top, instance, force, percent_script, total_script, combat, bars_show_data, bars_brackets, bars_separator)
@@ -483,7 +483,7 @@
if (force) then
if (instance:IsGroupMode()) then
for i = whichRowLine, instance.rows_fit_in_window do
gump:Fade (instance.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instance.barras [i], "in", 0.3)
end
end
end
@@ -599,7 +599,7 @@
esta_barra:SetValue (100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
end
return self:RefreshBarra (esta_barra, instancia)
@@ -611,7 +611,7 @@
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
esta_barra:SetValue (esta_porcentagem)
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
+9 -9
View File
@@ -982,7 +982,7 @@
end
if (thisLine.hidden or thisLine.fading_in or thisLine.faded) then
gump:Fade (thisLine, "out")
Details.FadeHandler.Fader (thisLine, "out")
end
if (instancia.row_info.texture_class_colors) then
@@ -1169,7 +1169,7 @@
thisLine.lineText4:SetTextColor (1, 1, 1, 1)
if (thisLine.hidden or thisLine.fading_in or thisLine.faded) then
gump:Fade (thisLine, "out")
Details.FadeHandler.Fader (thisLine, "out")
end
Details:SetBarColors (thisLine, instancia, _unpack (Details.class_colors [tabela [3]]))
@@ -1586,7 +1586,7 @@
thisLine:SetValue (100)
if (thisLine.hidden or thisLine.fading_in or thisLine.faded) then
gump:Fade (thisLine, "out")
Details.FadeHandler.Fader (thisLine, "out")
end
local _, _, icon = GetSpellInfo (self.damage_spellid)
@@ -2136,7 +2136,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (forcar) then
if (instancia.modo == 2) then --> group
for i = 1, instancia.rows_fit_in_window do
gump:Fade (instancia.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3)
end
end
end
@@ -2241,7 +2241,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (row1, "out")
totalBarIsShown = true
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
@@ -2313,7 +2313,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (row1, "out")
totalBarIsShown = true
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
@@ -2370,7 +2370,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (forcar) then
if (instancia.modo == 2) then --> group
for i = whichRowLine, instancia.rows_fit_in_window do
gump:Fade (instancia.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3)
end
end
end
@@ -2689,7 +2689,7 @@ end
thisLine:SetValue (100)
if (thisLine.hidden or thisLine.fading_in or thisLine.faded) then
gump:Fade (thisLine, "out")
Details.FadeHandler.Fader (thisLine, "out")
end
return self:RefreshBarra (thisLine, instance)
@@ -2707,7 +2707,7 @@ end
thisLine.animacao_ignorar = true
end
gump:Fade (thisLine, "out")
Details.FadeHandler.Fader (thisLine, "out")
return self:RefreshBarra (thisLine, instance)
else
+5 -5
View File
@@ -449,7 +449,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (row1, "out")
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
@@ -519,7 +519,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (row1, "out")
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator)
@@ -579,7 +579,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (forcar) then
if (instancia.modo == 2) then --> group
for i = whichRowLine, instancia.rows_fit_in_window do
gump:Fade (instancia.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3)
end
end
end
@@ -880,7 +880,7 @@ function atributo_heal:RefreshBarra2 (thisLine, instancia, tabela_anterior, forc
thisLine:SetValue (100)
if (thisLine.hidden or thisLine.fading_in or thisLine.faded) then
gump:Fade (thisLine, "out")
Details.FadeHandler.Fader (thisLine, "out")
end
return self:RefreshBarra (thisLine, instancia)
@@ -898,7 +898,7 @@ function atributo_heal:RefreshBarra2 (thisLine, instancia, tabela_anterior, forc
thisLine.animacao_ignorar = true
end
gump:Fade (thisLine, "out")
Details.FadeHandler.Fader (thisLine, "out")
if (instancia.row_info.texture_class_colors) then
thisLine.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
+37 -37
View File
@@ -103,7 +103,7 @@ end
function _detalhes:InstanciaCallFunction (funcao, ...)
for index, instancia in _ipairs (_detalhes.tabela_instancias) do
if (instancia:IsAtiva()) then --> s reabre se ela estiver ativa
funcao (_, instancia, ...)
funcao (_, instancia, ...)
end
end
end
@@ -330,7 +330,7 @@ end
if (config) then
if (not _detalhes.profile_save_pos) then
self.posicao = table_deepcopy (config.pos)
self.posicao = Details.CopyTable (config.pos)
end
if (_type (config.attribute) ~= "number") then
@@ -348,10 +348,10 @@ end
self.sub_atributo = config.sub_attribute
self.modo = config.mode
self.segmento = config.segment
self.snap = config.snap and table_deepcopy (config.snap) or {}
self.snap = config.snap and Details.CopyTable (config.snap) or {}
self.horizontalSnap = config.horizontalSnap
self.verticalSnap = config.verticalSnap
self.sub_atributo_last = table_deepcopy (config.sub_atributo_last)
self.sub_atributo_last = Details.CopyTable (config.sub_atributo_last)
self.isLocked = config.isLocked
self.last_raid_plugin = config.last_raid_plugin
end
@@ -408,15 +408,15 @@ end
self:ResetaGump()
--gump:Fade (self.baseframe.cabecalho.atributo_icon, _unpack (_detalhes.windows_fade_in))
--gump:Fade (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_in))
--gump:Fade (self.baseframe, _unpack (_detalhes.windows_fade_in))
--gump:Fade (self.rowframe, _unpack (_detalhes.windows_fade_in))
--Details.FadeHandler.Fader (self.baseframe.cabecalho.atributo_icon, _unpack (_detalhes.windows_fade_in))
--Details.FadeHandler.Fader (self.baseframe.cabecalho.ball, _unpack (_detalhes.windows_fade_in))
--Details.FadeHandler.Fader (self.baseframe, _unpack (_detalhes.windows_fade_in))
--Details.FadeHandler.Fader (self.rowframe, _unpack (_detalhes.windows_fade_in))
gump:Fade (self.baseframe.cabecalho.ball, 1)
gump:Fade (self.baseframe, 1)
gump:Fade (self.rowframe, 1)
gump:Fade (self.windowSwitchButton, 1)
Details.FadeHandler.Fader (self.baseframe.cabecalho.ball, 1)
Details.FadeHandler.Fader (self.baseframe, 1)
Details.FadeHandler.Fader (self.rowframe, 1)
Details.FadeHandler.Fader (self.windowSwitchButton, 1)
self:Desagrupar (-1)
@@ -440,10 +440,10 @@ end
local _fadeType, _fadeSpeed = _unpack (_detalhes.row_fade_in)
if (segmento) then
if (instancia.segmento == segmento) then
return gump:Fade (instancia, _fadeType, _fadeSpeed, "barras")
return Details.FadeHandler.Fader (instancia, _fadeType, _fadeSpeed, "barras")
end
else
return gump:Fade (instancia, _fadeType, _fadeSpeed, "barras")
return Details.FadeHandler.Fader (instancia, _fadeType, _fadeSpeed, "barras")
end
end
@@ -620,15 +620,15 @@ end
_detalhes:TrocaTabela (self, nil, nil, nil, true)
if (self.hide_icon) then
gump:Fade (self.baseframe.cabecalho.atributo_icon, 1)
Details.FadeHandler.Fader (self.baseframe.cabecalho.atributo_icon, 1)
else
gump:Fade (self.baseframe.cabecalho.atributo_icon, 0)
Details.FadeHandler.Fader (self.baseframe.cabecalho.atributo_icon, 0)
end
gump:Fade (self.baseframe.cabecalho.ball, 0)
gump:Fade (self.baseframe, 0)
gump:Fade (self.rowframe, 0)
gump:Fade (self.windowSwitchButton, 0)
Details.FadeHandler.Fader (self.baseframe.cabecalho.ball, 0)
Details.FadeHandler.Fader (self.baseframe, 0)
Details.FadeHandler.Fader (self.rowframe, 0)
Details.FadeHandler.Fader (self.windowSwitchButton, 0)
self:SetMenuAlpha()
self.baseframe.cabecalho.fechar:Enable()
@@ -760,7 +760,7 @@ end
if (_detalhes.standard_skin) then
for key, value in pairs (_detalhes.standard_skin) do
if (type (value) == "table") then
new_instance [key] = table_deepcopy (value)
new_instance [key] = Details.CopyTable (value)
else
new_instance [key] = value
end
@@ -782,7 +782,7 @@ end
for key, value in pairs (copy_from) do
if (_detalhes.instance_defaults [key] ~= nil) then
if (type (value) == "table") then
new_instance [key] = table_deepcopy (value)
new_instance [key] = Details.CopyTable (value)
else
new_instance [key] = value
end
@@ -1426,7 +1426,7 @@ end
for key, value in pairs (style) do
if (key ~= "skin") then
if (type (value) == "table") then
instance [key] = table_deepcopy (value)
instance [key] = Details.CopyTable (value)
else
instance [key] = value
end
@@ -1730,7 +1730,7 @@ function _detalhes:ExportSkin()
for key, value in pairs (self) do
if (_detalhes.instance_defaults [key] ~= nil) then
if (type (value) == "table") then
exported [key] = table_deepcopy (value)
exported [key] = Details.CopyTable (value)
else
exported [key] = value
end
@@ -1752,13 +1752,13 @@ function _detalhes:ExportSkin()
["right"] = self.StatusBar.right.real_name or "NONE",
}
exported.StatusBarSaved.options = {
[exported.StatusBarSaved.left] = table_deepcopy (self.StatusBar.left.options),
[exported.StatusBarSaved.center] = table_deepcopy (self.StatusBar.center.options),
[exported.StatusBarSaved.right] = table_deepcopy (self.StatusBar.right.options)
[exported.StatusBarSaved.left] = Details.CopyTable (self.StatusBar.left.options),
[exported.StatusBarSaved.center] = Details.CopyTable (self.StatusBar.center.options),
[exported.StatusBarSaved.right] = Details.CopyTable (self.StatusBar.right.options)
}
elseif (self.StatusBarSaved) then
exported.StatusBarSaved = table_deepcopy (self.StatusBarSaved)
exported.StatusBarSaved = Details.CopyTable (self.StatusBarSaved)
end
@@ -1781,7 +1781,7 @@ function _detalhes:ApplySavedSkin (style)
for key, value in pairs (style) do
if (key ~= "skin") then
if (type (value) == "table") then
self [key] = table_deepcopy (value)
self [key] = Details.CopyTable (value)
else
self [key] = value
end
@@ -1794,7 +1794,7 @@ function _detalhes:ApplySavedSkin (style)
for key2, value2 in pairs (value) do
if (self [key] [key2] == nil) then
if (type (value2) == "table") then
self [key] [key2] = table_deepcopy (_detalhes.instance_defaults [key] [key2])
self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
end
@@ -1803,7 +1803,7 @@ function _detalhes:ApplySavedSkin (style)
end
end
self.StatusBarSaved = style.StatusBarSaved and table_deepcopy (style.StatusBarSaved) or {options = {}}
self.StatusBarSaved = style.StatusBarSaved and Details.CopyTable (style.StatusBarSaved) or {options = {}}
self.StatusBar.options = self.StatusBarSaved.options
_detalhes.StatusBar:UpdateChilds (self)
@@ -1815,7 +1815,7 @@ function _detalhes:ApplySavedSkin (style)
self.posicao = style.posicao
self:RestoreMainWindowPosition()
else
self.posicao = table_deepcopy (self.posicao)
self.posicao = Details.CopyTable (self.posicao)
end
end
@@ -1826,7 +1826,7 @@ function _detalhes:InstanceReset (instance)
if (instance) then
self = instance
end
_detalhes.gump:Fade (self, "in", nil, "barras")
Details.FadeHandler.Fader (self, "in", nil, "barras")
self:AtualizaSegmentos (self)
self:AtualizaSoloMode_AfertReset()
self:ResetaGump()
@@ -1978,7 +1978,7 @@ function _detalhes:Freeze (instancia)
if (not _detalhes.initializing) then
instancia:ResetaGump()
gump:Fade (instancia, "in", nil, "barras")
Details.FadeHandler.Fader (instancia, "in", nil, "barras")
end
instancia:InstanceMsg (Loc ["STRING_FREEZE"], [[Interface\CHARACTERFRAME\Disconnect-Icon]], "silver")
@@ -2039,7 +2039,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
if (segmento == _detalhes.segments_amount) then --> significa que o index [5] passou a ser [6] com a entrada da nova tabela
instancia.showing = historico.tabelas [_detalhes.segments_amount] --> ento ele volta a pegar o index [5] que antes era o index [4]
--print ("==> Changing the Segment now! - classe_instancia.lua 1942")
gump:Fade (instancia, _fadeType, _fadeSpeed, "barras")
Details.FadeHandler.Fader (instancia, _fadeType, _fadeSpeed, "barras")
instancia.showing[instancia.atributo].need_refresh = true
instancia.v_barras = true
instancia:ResetaGump()
@@ -2050,7 +2050,7 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
instancia.showing = historico.tabelas [segmento]
--print ("==> Changing the Segment now! - classe_instancia.lua 1952")
gump:Fade (instancia, _fadeType, _fadeSpeed, "barras") --"in", nil
Details.FadeHandler.Fader (instancia, _fadeType, _fadeSpeed, "barras") --"in", nil
instancia.showing[instancia.atributo].need_refresh = true
instancia.v_barras = true
instancia:ResetaGump()
@@ -2806,7 +2806,7 @@ function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
end
_detalhes:ResetaGump (instancia)
--gump:Fade (instancia, 1, nil, "barras")
--Details.FadeHandler.Fader (instancia, 1, nil, "barras")
instancia.modo = modo_grupo
instancia:ChangeIcon()
+7 -7
View File
@@ -260,7 +260,7 @@ function atributo_energy:AtualizarResources (whichRowLine, colocacao, instancia)
esta_barra:SetValue (100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
end
--> texture color
@@ -353,7 +353,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (forcar) then
if (instancia.modo == 2) then --> group
for i = whichRowLine, instancia.rows_fit_in_window do
gump:Fade (instancia.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3)
end
end
end
@@ -538,7 +538,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (row1, "out")
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
@@ -599,7 +599,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
row1.icone_classe:SetTexture (instancia.total_bar.icon)
row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375)
gump:Fade (row1, "out")
Details.FadeHandler.Fader (row1, "out")
if (following and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then
conteudo[myPos]:RefreshLine (instancia, barras_container, whichRowLine, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type, use_animations, bars_show_data, bars_brackets, bars_separator) --> instncia, index, total, valor da 1 barra
@@ -639,7 +639,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex
if (forcar) then
if (instancia.modo == 2) then --> group
for i = whichRowLine, instancia.rows_fit_in_window do
gump:Fade (instancia.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3)
end
end
end
@@ -716,7 +716,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
esta_barra:SetValue (100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
end
return self:RefreshBarra (esta_barra, instancia)
@@ -734,7 +734,7 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior,
esta_barra.animacao_ignorar = true
end
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
+4 -4
View File
@@ -590,7 +590,7 @@ function atributo_misc:DeadAtualizarBarra (morte, whichRowLine, colocacao, insta
esta_barra:SetValue (100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
end
--> seta a cor da barra e a cor do texto caso eles esteja mostrando com a cor da classe
@@ -864,7 +864,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo
if (forcar) then
if (instancia.modo == 2) then --> group
for i = whichRowLine, instancia.rows_fit_in_window do
gump:Fade (instancia.barras [i], "in", 0.3)
Details.FadeHandler.Fader (instancia.barras [i], "in", 0.3)
end
end
end
@@ -943,7 +943,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
esta_barra:SetValue (100)
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
end
return self:RefreshBarra (esta_barra, instancia)
@@ -961,7 +961,7 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo
esta_barra.animacao_ignorar = true
end
gump:Fade (esta_barra, "out")
Details.FadeHandler.Fader (esta_barra, "out")
if (instancia.row_info.texture_class_colors) then
esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
+4 -4
View File
@@ -539,10 +539,10 @@ function historico:resetar()
_detalhes.schedule_hard_garbage_collect = true
end
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
_detalhes:InstanciaCallFunction (_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
_detalhes:InstanciaCallFunction (_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
_detalhes:InstanciaCallFunction (gump.Fade, "in", nil, "barras")
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSegmentos) -- atualiza o instancia.showing para as novas tabelas criadas
_detalhes:InstanciaCallFunction(_detalhes.AtualizaSoloMode_AfertReset) -- verifica se precisa zerar as tabela da janela solo mode
_detalhes:InstanciaCallFunction(_detalhes.ResetaGump) --_detalhes:ResetaGump ("de todas as instancias")
_detalhes:InstanciaCallFunction(Details.FadeHandler.Fader, "IN", nil, "barras")
_detalhes:RefreshMainWindow (-1) --atualiza todas as instancias
+4 -4
View File
@@ -13,7 +13,7 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
function _detalhes:ResetInstanceConfig (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (type (value) == "table") then
self [key] = table_deepcopy (value)
self [key] = Details.CopyTable (value)
else
self [key] = value
end
@@ -60,7 +60,7 @@ function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap)
for key, value in pairs (_detalhes.instance_defaults) do
if (not _detalhes.instance_skin_ignored_values [key]) then
if (type (value) == "table") then
self [key] = table_deepcopy (value)
self [key] = Details.CopyTable (value)
else
self [key] = value
end
@@ -78,7 +78,7 @@ function _detalhes:LoadInstanceConfig()
for key, value in pairs (_detalhes.instance_defaults) do
if (self [key] == nil) then
if (type (value) == "table") then
self [key] = table_deepcopy (_detalhes.instance_defaults [key])
self [key] = Details.CopyTable (_detalhes.instance_defaults [key])
else
self [key] = value
end
@@ -87,7 +87,7 @@ function _detalhes:LoadInstanceConfig()
for key2, value2 in pairs (value) do
if (self [key] [key2] == nil) then
if (type (value2) == "table") then
self [key] [key2] = table_deepcopy (_detalhes.instance_defaults [key] [key2])
self [key] [key2] = Details.CopyTable (_detalhes.instance_defaults [key] [key2])
else
self [key] [key2] = value2
end