* start afterscroll transition only after songs actually show up after leaving filterwheel

This commit is contained in:
FajsiEx 2021-11-20 19:34:15 +01:00
parent de58e98563
commit 716223a629
1 changed files with 7 additions and 6 deletions

View File

@ -245,7 +245,7 @@ function drawBackground(deltaTime)
local song = songwheel.songs[selectedIndex];
local diff = song and song.difficulties[selectedDifficulty] or false;
if (not isFilterWheelActive) then
if (not isFilterWheelActive and transitionLeaveReappearTimer == 0) then
-- If the score for song exists
if song and diff then
local jacketImage = getJacketImage(song);
@ -266,7 +266,7 @@ function drawBackground(deltaTime)
drawLaserAnim()
if song and diff and (not isFilterWheelActive) then
if song and diff and (not isFilterWheelActive and transitionLeaveReappearTimer == 0) then
gfx.BeginPath()
gfx.ImageRect(0, 0, desw, desh, dataGlowOverlayImage, transitionAfterscrollDataOverlayAlpha, 0)
gfx.BeginPath()
@ -391,7 +391,7 @@ end
local scoreNumbers = load_number_image("score_num");
function drawData() -- Draws the song data on the left panel
if isFilterWheelActive then return false end;
if isFilterWheelActive or transitionLeaveReappearTimer ~= 0 then return false end;
local song = songwheel.songs[selectedIndex];
local diff = song and song.difficulties[selectedDifficulty] or false;
@ -543,7 +543,7 @@ end
function drawFilterInfo(deltatime)
gfx.LoadSkinFont('NotoSans-Regular.ttf')
gfx.BeginPath()
gfx.ImageRect(5, 95, 417*0.85, 163*0.85, filterInfoBgImage, 1, 0)
@ -730,8 +730,9 @@ function tickTransitions(deltaTime)
transitionAfterscrollScale = 0; -- Keep songwheel in the "afterscroll" state while the filterwheel is active
transitionJacketBgScrollScale = 0; -- Same thing here, just with the jacket bg
else
if (transitionLeaveReappearTimer == 1) then
-- This stuff happens right after filterwheel is deactivated
if (transitionLeaveReappearTimer ~= 0) then
transitionAfterscrollScale = 0; -- Keep songwheel in the "afterscroll" state while we're waiting on filter wheel to fade out
transitionJacketBgScrollScale = 0; -- Same thing here, just with the jacket bg
end
transitionLeaveReappearTimer = transitionLeaveReappearTimer - deltaTime / (TRANSITION_LEAVE_DURATION + 0.05) -- 0.05s is a few frames between the completetion of the fade out and songs reappearing in the AC