Fixed the Auto Hide from the title bar buttons

This commit is contained in:
Tercio Jose
2020-07-09 14:36:39 -03:00
parent 899ac439a1
commit 5070641626
2 changed files with 23 additions and 19 deletions
+5 -5
View File
File diff suppressed because one or more lines are too long
+18 -14
View File
@@ -5060,10 +5060,8 @@ 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))
self:SetIconAlpha (nil, true)
--self:SetIconAlpha(nil, true)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) hiding window SetWindowAlphaForCombat()", amount, rowsamount, menuamount)
@@ -5074,10 +5072,11 @@ function _detalhes:SetWindowAlphaForCombat (entering_in_combat, true_hide, alpha
self.baseframe:Show()
self.baseframe:SetAlpha (1)
self:InstanceAlpha (min (amount, self.color[4]))
gump:Fade (self.rowframe, "ALPHAANIM", rowsamount)
gump:Fade (self.baseframe, "ALPHAANIM", rowsamount)
self:SetIconAlpha (menuamount)
self:InstanceAlpha(min (amount, self.color[4]))
gump:Fade(self.rowframe, "ALPHAANIM", rowsamount)
gump:Fade(self.baseframe, "ALPHAANIM", rowsamount)
--self:SetIconAlpha(menuamount)
if (_detalhes.debug) then
_detalhes:Msg ("(debug) showing window SetWindowAlphaForCombat()", amount, rowsamount, menuamount)
@@ -5450,16 +5449,21 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations)
SetIconAlphaCacheButtonsTable [5] = self.baseframe.cabecalho.reset
SetIconAlphaCacheButtonsTable [6] = self.baseframe.cabecalho.fechar
print("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))
--gump:Fade (button, _unpack (_detalhes.windows_fade_in))
button:Hide()
else
if (no_animations) then
button:SetAlpha (alpha)
else
gump:Fade (button, "ALPHAANIM", alpha)
end
button:Show()
button:SetAlpha(alpha)
--if (no_animations) then
-- button:SetAlpha (alpha)
--else
-- gump:Fade (button, "ALPHAANIM", alpha)
--end
end
end
end