* start afterscroll transition only after songs actually show up after leaving filterwheel
This commit is contained in:
parent
de58e98563
commit
716223a629
|
@ -245,7 +245,7 @@ function drawBackground(deltaTime)
|
||||||
local song = songwheel.songs[selectedIndex];
|
local song = songwheel.songs[selectedIndex];
|
||||||
local diff = song and song.difficulties[selectedDifficulty] or false;
|
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 the score for song exists
|
||||||
if song and diff then
|
if song and diff then
|
||||||
local jacketImage = getJacketImage(song);
|
local jacketImage = getJacketImage(song);
|
||||||
|
@ -266,7 +266,7 @@ function drawBackground(deltaTime)
|
||||||
|
|
||||||
drawLaserAnim()
|
drawLaserAnim()
|
||||||
|
|
||||||
if song and diff and (not isFilterWheelActive) then
|
if song and diff and (not isFilterWheelActive and transitionLeaveReappearTimer == 0) then
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
gfx.ImageRect(0, 0, desw, desh, dataGlowOverlayImage, transitionAfterscrollDataOverlayAlpha, 0)
|
gfx.ImageRect(0, 0, desw, desh, dataGlowOverlayImage, transitionAfterscrollDataOverlayAlpha, 0)
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
|
@ -391,7 +391,7 @@ end
|
||||||
local scoreNumbers = load_number_image("score_num");
|
local scoreNumbers = load_number_image("score_num");
|
||||||
function drawData() -- Draws the song data on the left panel
|
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 song = songwheel.songs[selectedIndex];
|
||||||
local diff = song and song.difficulties[selectedDifficulty] or false;
|
local diff = song and song.difficulties[selectedDifficulty] or false;
|
||||||
|
@ -543,7 +543,7 @@ end
|
||||||
|
|
||||||
function drawFilterInfo(deltatime)
|
function drawFilterInfo(deltatime)
|
||||||
gfx.LoadSkinFont('NotoSans-Regular.ttf')
|
gfx.LoadSkinFont('NotoSans-Regular.ttf')
|
||||||
|
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
gfx.ImageRect(5, 95, 417*0.85, 163*0.85, filterInfoBgImage, 1, 0)
|
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
|
transitionAfterscrollScale = 0; -- Keep songwheel in the "afterscroll" state while the filterwheel is active
|
||||||
transitionJacketBgScrollScale = 0; -- Same thing here, just with the jacket bg
|
transitionJacketBgScrollScale = 0; -- Same thing here, just with the jacket bg
|
||||||
else
|
else
|
||||||
if (transitionLeaveReappearTimer == 1) then
|
if (transitionLeaveReappearTimer ~= 0) then
|
||||||
-- This stuff happens right after filterwheel is deactivated
|
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
|
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
|
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
|
||||||
|
|
Loading…
Reference in New Issue