Rewrite on Faders: Details.FadeHandler.Fader(frame, animationType, speed, hideType)
This commit is contained in:
+33
-33
@@ -313,7 +313,7 @@ local function OnLeaveMainWindow (instancia, self)
|
||||
end
|
||||
|
||||
--> stretch button
|
||||
gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0)
|
||||
Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0)
|
||||
|
||||
elseif (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and instancia.baseframe.isLocked) then
|
||||
|
||||
@@ -323,7 +323,7 @@ local function OnLeaveMainWindow (instancia, self)
|
||||
instancia.break_snap_button:SetAlpha (0)
|
||||
end
|
||||
|
||||
gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0)
|
||||
Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0)
|
||||
|
||||
end
|
||||
end
|
||||
@@ -362,7 +362,7 @@ local function OnEnterMainWindow (instancia, self)
|
||||
|
||||
--> stretch button
|
||||
if (not _detalhes.disable_stretch_button) then
|
||||
gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0.6)
|
||||
Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0.6)
|
||||
end
|
||||
|
||||
elseif (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and instancia.baseframe.isLocked) then
|
||||
@@ -381,7 +381,7 @@ local function OnEnterMainWindow (instancia, self)
|
||||
end
|
||||
|
||||
if (not _detalhes.disable_stretch_button) then
|
||||
gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0.6)
|
||||
Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0.6)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -582,9 +582,9 @@ local movement_onupdate = function (self, elapsed)
|
||||
if (tempo_movendo and tempo_movendo < 0) then
|
||||
|
||||
if (precisa_ativar) then --> se a inst�ncia estiver fechada
|
||||
gump:Fade (instancia_alvo.baseframe, "ALPHA", 0.2)
|
||||
gump:Fade (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2)
|
||||
gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2)
|
||||
Details.FadeHandler.Fader (instancia_alvo.baseframe, "ALPHA", 0.2)
|
||||
Details.FadeHandler.Fader (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2)
|
||||
Details.FadeHandler.Fader (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2)
|
||||
instancia_alvo:SaveMainWindowPosition()
|
||||
instancia_alvo:RestoreMainWindowPosition()
|
||||
precisa_ativar = false
|
||||
@@ -810,9 +810,9 @@ local function move_janela (baseframe, iniciando, instancia, just_updating)
|
||||
instancia_alvo:SaveMainWindowPosition()
|
||||
instancia_alvo:RestoreMainWindowPosition()
|
||||
|
||||
gump:Fade (instancia_alvo.baseframe, 1)
|
||||
gump:Fade (instancia_alvo.rowframe, 1)
|
||||
gump:Fade (instancia_alvo.baseframe.cabecalho.ball, 1)
|
||||
Details.FadeHandler.Fader (instancia_alvo.baseframe, 1)
|
||||
Details.FadeHandler.Fader (instancia_alvo.rowframe, 1)
|
||||
Details.FadeHandler.Fader (instancia_alvo.baseframe.cabecalho.ball, 1)
|
||||
|
||||
need_start = false
|
||||
end
|
||||
@@ -939,9 +939,9 @@ local function move_janela (baseframe, iniciando, instancia, just_updating)
|
||||
if (not esta_instancia:IsAtiva() and esta_instancia.iniciada) then
|
||||
esta_instancia:ResetaGump()
|
||||
|
||||
gump:Fade (esta_instancia.baseframe, "in", 0.2)
|
||||
gump:Fade (esta_instancia.baseframe.cabecalho.ball, "in", 0.2)
|
||||
gump:Fade (esta_instancia.baseframe.cabecalho.atributo_icon, "in", 0.2)
|
||||
Details.FadeHandler.Fader (esta_instancia.baseframe, "in", 0.2)
|
||||
Details.FadeHandler.Fader (esta_instancia.baseframe.cabecalho.ball, "in", 0.2)
|
||||
Details.FadeHandler.Fader (esta_instancia.baseframe.cabecalho.atributo_icon, "in", 0.2)
|
||||
|
||||
if (esta_instancia.modo == modo_raid) then
|
||||
_detalhes.raid = nil
|
||||
@@ -2560,12 +2560,12 @@ local function button_stretch_scripts (baseframe, backgrounddisplay, instancia)
|
||||
button:SetScript ("OnEnter", function (self)
|
||||
self.mouse_over = true
|
||||
if (not _detalhes.disable_stretch_button) then
|
||||
gump:Fade (self, "ALPHA", 1)
|
||||
Details.FadeHandler.Fader (self, "ALPHA", 1)
|
||||
end
|
||||
end)
|
||||
button:SetScript ("OnLeave", function (self)
|
||||
self.mouse_over = false
|
||||
gump:Fade (self, "ALPHA", 0)
|
||||
Details.FadeHandler.Fader (self, "ALPHA", 0)
|
||||
end)
|
||||
|
||||
button:SetScript ("OnMouseDown", function (self, button)
|
||||
@@ -3560,7 +3560,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
baseframe.button_stretch:SetHeight (16)
|
||||
|
||||
baseframe.button_stretch:Show()
|
||||
gump:Fade (baseframe.button_stretch, "ALPHA", 0)
|
||||
Details.FadeHandler.Fader (baseframe.button_stretch, "ALPHA", 0)
|
||||
|
||||
button_stretch_scripts (baseframe, backgrounddisplay, instancia)
|
||||
|
||||
@@ -3698,7 +3698,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
lockFunctionOnClick (baseframe.lock_button, nil, nil, true)
|
||||
end
|
||||
|
||||
gump:Fade (baseframe.lock_button, -1, 3.0)
|
||||
Details.FadeHandler.Fader (baseframe.lock_button, -1, 3.0)
|
||||
|
||||
-- scripts ------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -4079,7 +4079,7 @@ function gump:CreateNewLine (instancia, index)
|
||||
barra_scripts (new_row, instancia, index)
|
||||
|
||||
--> hide
|
||||
gump:Fade (new_row, 1)
|
||||
Details.FadeHandler.Fader (new_row, 1)
|
||||
|
||||
--> adds the window container
|
||||
instancia.barras [index] = new_row
|
||||
@@ -4833,7 +4833,7 @@ function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, h
|
||||
|
||||
elseif (type (texture) == "boolean" and not texture) then
|
||||
self.wallpaper.enabled = false
|
||||
return gump:Fade (self.baseframe.wallpaper, "in")
|
||||
return Details.FadeHandler.Fader (self.baseframe.wallpaper, "in")
|
||||
|
||||
elseif (type (texture) == "table") then
|
||||
anchor = texture.anchor or wallpaper.anchor
|
||||
@@ -4924,7 +4924,7 @@ function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, h
|
||||
|
||||
t:Show()
|
||||
--t:SetAlpha (alpha)
|
||||
gump:Fade (t, "ALPHAANIM", alpha)
|
||||
Details.FadeHandler.Fader (t, "ALPHAANIM", alpha)
|
||||
|
||||
end
|
||||
|
||||
@@ -5036,9 +5036,9 @@ function _detalhes:SetWindowAlphaForCombat (entering_in_combat, true_hide, alpha
|
||||
self.baseframe:Hide()
|
||||
self.rowframe:Hide()
|
||||
self.windowSwitchButton:Hide()
|
||||
--gump:Fade (self.baseframe, _unpack (_detalhes.windows_fade_in))
|
||||
--gump:Fade (self.rowframe, _unpack (_detalhes.windows_fade_in))
|
||||
--gump:Fade (self.windowSwitchButton, _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))
|
||||
--Details.FadeHandler.Fader (self.windowSwitchButton, _unpack (_detalhes.windows_fade_in))
|
||||
|
||||
--self:SetIconAlpha (nil, true)
|
||||
|
||||
@@ -5052,8 +5052,8 @@ function _detalhes:SetWindowAlphaForCombat (entering_in_combat, true_hide, alpha
|
||||
self.baseframe:SetAlpha (1)
|
||||
|
||||
self:InstanceAlpha(min (amount, self.color[4]))
|
||||
gump:Fade(self.rowframe, "ALPHAANIM", rowsamount)
|
||||
gump:Fade(self.baseframe, "ALPHAANIM", rowsamount)
|
||||
Details.FadeHandler.Fader(self.rowframe, "ALPHAANIM", rowsamount)
|
||||
Details.FadeHandler.Fader(self.baseframe, "ALPHAANIM", rowsamount)
|
||||
--]]
|
||||
end
|
||||
|
||||
@@ -5394,12 +5394,12 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations)
|
||||
end
|
||||
|
||||
if (hide) then
|
||||
gump:Fade (self.menu_attribute_string.widget, _unpack (_detalhes.windows_fade_in))
|
||||
Details.FadeHandler.Fader (self.menu_attribute_string.widget, _unpack (_detalhes.windows_fade_in))
|
||||
else
|
||||
if (no_animations) then
|
||||
self.menu_attribute_string:SetAlpha (alpha)
|
||||
else
|
||||
gump:Fade (self.menu_attribute_string.widget, "ALPHAANIM", alpha)
|
||||
Details.FadeHandler.Fader (self.menu_attribute_string.widget, "ALPHAANIM", alpha)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -5419,7 +5419,7 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations)
|
||||
for index, button in _ipairs (SetIconAlphaCacheButtonsTable) do
|
||||
if (self.menu_icons [index]) then
|
||||
if (hide) then
|
||||
--gump:Fade (button, _unpack (_detalhes.windows_fade_in))
|
||||
--Details.FadeHandler.Fader (button, _unpack (_detalhes.windows_fade_in))
|
||||
button:Hide()
|
||||
else
|
||||
button:Show()
|
||||
@@ -5427,7 +5427,7 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations)
|
||||
--if (no_animations) then
|
||||
-- button:SetAlpha (alpha)
|
||||
--else
|
||||
-- gump:Fade (button, "ALPHAANIM", alpha)
|
||||
-- Details.FadeHandler.Fader (button, "ALPHAANIM", alpha)
|
||||
--end
|
||||
end
|
||||
end
|
||||
@@ -5437,12 +5437,12 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations)
|
||||
if (#_detalhes.ToolBar.Shown > 0) then
|
||||
for index, button in ipairs (_detalhes.ToolBar.Shown) do
|
||||
if (hide) then
|
||||
gump:Fade (button, _unpack (_detalhes.windows_fade_in))
|
||||
Details.FadeHandler.Fader (button, _unpack (_detalhes.windows_fade_in))
|
||||
else
|
||||
if (no_animations) then
|
||||
button:SetAlpha (alpha)
|
||||
else
|
||||
gump:Fade (button, "ALPHAANIM", alpha)
|
||||
Details.FadeHandler.Fader (button, "ALPHAANIM", alpha)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -8365,7 +8365,7 @@ function _detalhes:HideMainIcon (value)
|
||||
if (value) then
|
||||
|
||||
self.hide_icon = true
|
||||
gump:Fade (self.baseframe.cabecalho.atributo_icon, 1)
|
||||
Details.FadeHandler.Fader (self.baseframe.cabecalho.atributo_icon, 1)
|
||||
|
||||
if (self.toolbar_side == 1) then
|
||||
self.baseframe.cabecalho.ball:SetTexCoord (unpack (COORDS_LEFT_BALL_NO_ICON))
|
||||
@@ -8388,7 +8388,7 @@ function _detalhes:HideMainIcon (value)
|
||||
|
||||
else
|
||||
self.hide_icon = false
|
||||
gump:Fade (self.baseframe.cabecalho.atributo_icon, 0)
|
||||
Details.FadeHandler.Fader (self.baseframe.cabecalho.atributo_icon, 0)
|
||||
|
||||
if (self.toolbar_side == 1) then
|
||||
|
||||
|
||||
Reference in New Issue
Block a user