+ remaining things to complete the transition
This commit is contained in:
parent
bdfa9dfcb0
commit
de58e98563
|
@ -251,6 +251,8 @@ function drawFolderList()
|
||||||
end
|
end
|
||||||
|
|
||||||
function drawCursor()
|
function drawCursor()
|
||||||
|
if not isFilterWheelActive or transitionLeaveScale ~= 0 then return end
|
||||||
|
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
|
|
||||||
local cursorImageIndex = game.GetSkinSetting('_gaugeType')
|
local cursorImageIndex = game.GetSkinSetting('_gaugeType')
|
||||||
|
@ -310,7 +312,7 @@ function tickTransitions(deltaTime)
|
||||||
-- This stuff happens right after filterwheel is deactivated
|
-- This stuff happens right after filterwheel is deactivated
|
||||||
end
|
end
|
||||||
|
|
||||||
transitionLeaveReappearTimer = transitionLeaveReappearTimer - deltaTime / TRANSITION_LEAVE_DURATION + 0.05 -- same reasoning as in the songwheel
|
transitionLeaveReappearTimer = transitionLeaveReappearTimer - deltaTime / (TRANSITION_LEAVE_DURATION + 0.05) -- same reasoning as in the songwheel
|
||||||
|
|
||||||
if (transitionLeaveReappearTimer <= 0) then
|
if (transitionLeaveReappearTimer <= 0) then
|
||||||
transitionLeaveScale = 0;
|
transitionLeaveScale = 0;
|
||||||
|
@ -337,6 +339,7 @@ render = function(deltatime, shown)
|
||||||
if (transitionEnterScale <= 0) then
|
if (transitionEnterScale <= 0) then
|
||||||
game.SetSkinSetting('_songWheelDespawnSelectorElements', 0);
|
game.SetSkinSetting('_songWheelDespawnSelectorElements', 0);
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
game.SetSkinSetting('_songWheelOverlayActive', 1);
|
game.SetSkinSetting('_songWheelOverlayActive', 1);
|
||||||
game.SetSkinSetting('_songWheelDespawnSelectorElements', 1);
|
game.SetSkinSetting('_songWheelDespawnSelectorElements', 1);
|
||||||
|
@ -358,7 +361,7 @@ render = function(deltatime, shown)
|
||||||
gfx.FillColor(255, 255, 255, 255);
|
gfx.FillColor(255, 255, 255, 255);
|
||||||
gfx.Text('S_M: ' .. selectionMode .. ' // S_F: ' .. selectedFolder ..
|
gfx.Text('S_M: ' .. selectionMode .. ' // S_F: ' .. selectedFolder ..
|
||||||
' // S_L: ' .. selectedLevel .. ' // L_TS: ' ..
|
' // S_L: ' .. selectedLevel .. ' // L_TS: ' ..
|
||||||
transitionLeaveScale, 8, 1870);
|
transitionLeaveScale .. ' // L_TRT: ' .. transitionLeaveReappearTimer, 8, 1870);
|
||||||
end
|
end
|
||||||
|
|
||||||
set_selection = function(newIndex, isFolder)
|
set_selection = function(newIndex, isFolder)
|
||||||
|
|
|
@ -49,6 +49,12 @@ local badgeImages = {
|
||||||
gfx.CreateSkinImage("song_select/medal/puc.png", 1),
|
gfx.CreateSkinImage("song_select/medal/puc.png", 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local cursorImages = {
|
||||||
|
gfx.CreateSkinImage("song_select/cursor.png", 1), -- Effective rate or fallback
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_exc.png", 1), -- Excessive rate
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_perm.png", 1), -- Premissive rate
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_blast.png", 1), -- Blastive rate
|
||||||
|
}
|
||||||
local gradeCutoffs = {
|
local gradeCutoffs = {
|
||||||
D = 0000000,
|
D = 0000000,
|
||||||
C = 7000000,
|
C = 7000000,
|
||||||
|
@ -536,6 +542,8 @@ function drawData() -- Draws the song data on the left panel
|
||||||
end
|
end
|
||||||
|
|
||||||
function drawFilterInfo(deltatime)
|
function drawFilterInfo(deltatime)
|
||||||
|
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)
|
||||||
|
|
||||||
|
@ -559,6 +567,17 @@ function drawFilterInfo(deltatime)
|
||||||
gfx.Text(sortOptionLabel or '', desw-150, 130);
|
gfx.Text(sortOptionLabel or '', desw-150, 130);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function drawCursor()
|
||||||
|
if isFilterWheelActive or transitionLeaveScale ~= 0 then return false end
|
||||||
|
|
||||||
|
gfx.BeginPath()
|
||||||
|
|
||||||
|
local cursorImageIndex = game.GetSkinSetting('_gaugeType')
|
||||||
|
local cursorImage = cursorImages[cursorImageIndex or 1];
|
||||||
|
|
||||||
|
gfx.ImageRect(desw / 2 - 14, desh / 2 - 213 / 2, 555, 213, cursorImage, 1, 0)
|
||||||
|
end
|
||||||
|
|
||||||
function drawSearch()
|
function drawSearch()
|
||||||
if (not songwheel.searchInputActive) then
|
if (not songwheel.searchInputActive) then
|
||||||
return;
|
return;
|
||||||
|
@ -709,12 +728,13 @@ function tickTransitions(deltaTime)
|
||||||
end
|
end
|
||||||
transitionLeaveReappearTimer = 1;
|
transitionLeaveReappearTimer = 1;
|
||||||
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
|
||||||
else
|
else
|
||||||
if (transitionLeaveReappearTimer == 1) then
|
if (transitionLeaveReappearTimer == 1) then
|
||||||
-- This stuff happens right after filterwheel is deactivated
|
-- This stuff happens right after filterwheel is deactivated
|
||||||
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
|
||||||
|
|
||||||
if (transitionLeaveReappearTimer <= 0) then
|
if (transitionLeaveReappearTimer <= 0) then
|
||||||
transitionLeaveScale = 0;
|
transitionLeaveScale = 0;
|
||||||
|
@ -740,6 +760,7 @@ render = function (deltaTime)
|
||||||
isFilterWheelActive = game.GetSkinSetting('_songWheelOverlayActive') == 1;
|
isFilterWheelActive = game.GetSkinSetting('_songWheelOverlayActive') == 1;
|
||||||
|
|
||||||
drawData()
|
drawData()
|
||||||
|
drawCursor()
|
||||||
|
|
||||||
drawFilterInfo(deltaTime)
|
drawFilterInfo(deltaTime)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue