From db916fe43c7a453d59ede8e6fb8b0aacb43f7b81 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 17 May 2021 16:49:46 -0300 Subject: [PATCH] Change logs and cleanup --- boot.lua | 10 ++++++++-- core/util.lua | 31 +++++++------------------------ frames/window_main.lua | 16 ++++++++-------- functions/profiles.lua | 2 ++ 4 files changed, 25 insertions(+), 34 deletions(-) diff --git a/boot.lua b/boot.lua index a7e1a5590..aedc2dbe5 100644 --- a/boot.lua +++ b/boot.lua @@ -4,8 +4,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 8406 - _detalhes.alpha_build_counter = 8406 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 8501 + _detalhes.alpha_build_counter = 8501 --if this is higher than the regular counter, use it instead _detalhes.dont_open_news = true _detalhes.game_version = "v9.0.5" _detalhes.userversion = "v9.0.5." .. _detalhes.build_counter @@ -29,6 +29,12 @@ do local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" ) local news = { + {"v9.0.5.8501.144", "May 17th, 2021"}, + "Complete overhaul and rerritten on Fade In and Out animations, this should fix all bugs related to animations not being consistent.", + "Complete overhaul on the broadcaster tool for arenas 'Current DPS'. It shows now a bar indicating the dps of both teams.", + "Yellow arena team now has purple color.", + "Several updates on the combat log engine and bug fixes.", + {"v9.0.5.8357.144", "March 15th, 2021"}, "Max amount of segments raised to 40, was 30.", "Added a 'Sanguine Heal' actor to show how much the void zone healed enemies, shown on Everything mode.", diff --git a/core/util.lua b/core/util.lua index 828d97ee4..d55d22d73 100644 --- a/core/util.lua +++ b/core/util.lua @@ -6,19 +6,15 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> local pointers - local _table_insert = table.insert --lua local local upper = string.upper --lua local local _ipairs = ipairs --lua local local _pairs = pairs --lua local local _math_floor = math.floor --lua local local _math_max = math.max --lua local - local _math_abs = math.abs --lua local local _math_min = math.min --lua local local _math_random = math.random --lua local local type = type --lua local local _string_match = string.match --lua local - local _string_byte = string.byte --lua local - local _string_len = string.lenv local _string_format = string.format --lua local local loadstring = loadstring --lua local local _select = select @@ -27,14 +23,10 @@ local _pcall = pcall local _GetTime = GetTime - local _UnitClass = UnitClass --wow api local local _IsInRaid = IsInRaid --wow api local local _IsInGroup = IsInGroup --wow api local local _GetNumGroupMembers = GetNumGroupMembers --wow api local local _UnitAffectingCombat = UnitAffectingCombat --wow api local - local _GameTooltip = GameTooltip --wow api local - --local _UIFrameFadeIn = UIFrameFadeIn --wow api local - --local _UIFrameFadeOut = UIFrameFadeOut --wow api local local _InCombatLockdown = InCombatLockdown --wow api local local gump = _detalhes.gump --details local @@ -105,7 +97,7 @@ frame.fading_in = true Details.FadeHandler.frames[frame] = { - totalTime = totalTime or 0.3, + totalTime = totalTime or Details.fade_speed, startAlpha = startAlpha or frame:GetAlpha(), endAlpha = endAlpha or 0, finishedCallback = callbackFunc or fadeINFinishedCallback, @@ -119,7 +111,7 @@ frame.fading_out = true Details.FadeHandler.frames[frame] = { - totalTime = totalTime or 0.3, + totalTime = totalTime or Details.fade_speed, startAlpha = startAlpha or frame:GetAlpha() or 0, endAlpha = endAlpha or 1, finishedCallback = callbackFunc or fadeOUTFinishedCallback, @@ -148,10 +140,10 @@ end return else - speed = speed or 0.3 + speed = speed or Details.fade_speed for i = 1, instance.rows_created do local instanceBar = instance.barras[i] - Details.FadeHandler.Fader(instanceBar, animationType, 0.3+(i/10)) + Details.FadeHandler.Fader(instanceBar, animationType, Details.fade_speed+(i/10)) end return end @@ -162,7 +154,6 @@ local instanceBar = instance.barras[i] if (instanceBar.fading_in or instanceBar.fading_out) then startFadeINAnimation(instanceBar, 0.01, instanceBar:GetAlpha(), instanceBar:GetAlpha()) --- _UIFrameFadeIn (instanceBar, 0.01, instanceBar:GetAlpha(), instanceBar:GetAlpha()) end instanceBar.hidden = true instanceBar.faded = true @@ -180,7 +171,7 @@ end end - speed = speed or 0.3 + speed = speed or Details.fade_speed --animationType = upper(animationType) --hide all instanceBars on all instances @@ -209,8 +200,6 @@ if (frame.fading_out) then frame.fading_out = false end - --- _UIFrameFadeIn (frame, speed, frame:GetAlpha(), 0) startFadeINAnimation(frame, speed, frame:GetAlpha(), 0) elseif (upper(animationType) == "OUT") then --show the frame @@ -226,7 +215,6 @@ end frame:Show() --- _UIFrameFadeOut (frame, speed, frame:GetAlpha(), 1.0) startFadeOUTAnimation(frame, speed, frame:GetAlpha(), 1.0) frame.fading_out = true @@ -262,7 +250,6 @@ end startFadeINAnimation(frame, speed, frame:GetAlpha(), 0, just_fade_func) --- _UIFrameFadeIn (frame, speed, frame:GetAlpha(), 0) elseif (upper(animationType) == "ALPHAANIM") then @@ -274,16 +261,12 @@ if (frame.fading_in) then frame.fading_in = false end - startFadeOUTAnimation(frame, 0.3, currentApha, value, function(frame) frame.fading_out = false end) --- _UIFrameFadeOut (frame, 0.3, currentApha, value) - + startFadeOUTAnimation(frame, Details.fade_speed, currentApha, value, function(frame) frame.fading_out = false end) else if (frame.fading_out) then frame.fading_out = false end - --- _UIFrameFadeIn (frame, 0.3, currentApha, value) - startFadeINAnimation(frame, 0.3, currentApha, value, function(frame) frame.fading_in = false end) + startFadeINAnimation(frame, Details.fade_speed, currentApha, value, function(frame) frame.fading_in = false end) end --set a fixed alpha value diff --git a/frames/window_main.lua b/frames/window_main.lua index 5efe68054..9b6fefde4 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -362,7 +362,7 @@ local function OnEnterMainWindow (instancia, self) --> stretch button if (not _detalhes.disable_stretch_button) then - Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0.6) + Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0.4) 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 - Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0.6) + Details.FadeHandler.Fader (instancia.baseframe.button_stretch, "ALPHA", 0.4) 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 - 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) + Details.FadeHandler.Fader (instancia_alvo.baseframe, "ALPHA", 0.15) + Details.FadeHandler.Fader (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.15) + Details.FadeHandler.Fader (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.15) instancia_alvo:SaveMainWindowPosition() instancia_alvo:RestoreMainWindowPosition() precisa_ativar = false @@ -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() - 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) + Details.FadeHandler.Fader (esta_instancia.baseframe, "in", 0.15) + Details.FadeHandler.Fader (esta_instancia.baseframe.cabecalho.ball, "in", 0.15) + Details.FadeHandler.Fader (esta_instancia.baseframe.cabecalho.atributo_icon, "in", 0.15) if (esta_instancia.modo == modo_raid) then _detalhes.raid = nil diff --git a/functions/profiles.lua b/functions/profiles.lua index b0dfef3a6..f377ddabd 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -837,6 +837,8 @@ local default_profile = { }, }, + fade_speed = 0.15, + --> minimap minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1, text_format = 3}, data_broker_text = "",