+ difficulties to songwheel & + inf grv hvn vvd diff labels to song transition

This commit is contained in:
FajsiEx 2021-07-31 22:53:05 +02:00
parent c2619a2af0
commit b65ae199aa
2 changed files with 36 additions and 2 deletions

View File

@ -7,6 +7,7 @@ local songPlateBg = gfx.CreateSkinImage("song_select/plate/bg.png", 1)
local songPlateBottomBarOverlayImage = gfx.CreateSkinImage("song_select/plate/bottom_bar_overlay.png", 1) local songPlateBottomBarOverlayImage = gfx.CreateSkinImage("song_select/plate/bottom_bar_overlay.png", 1)
local cursorImage = gfx.CreateSkinImage("song_select/cursor.png", 1) local cursorImage = gfx.CreateSkinImage("song_select/cursor.png", 1)
local diffCursorImage = gfx.CreateSkinImage("song_select/level_cursor.png", 1)
local defaultJacketImage = gfx.CreateSkinImage("song_select/loading.png", 0) local defaultJacketImage = gfx.CreateSkinImage("song_select/loading.png", 0)
@ -57,6 +58,17 @@ local gradeImages = {
none = gfx.CreateSkinImage("common/grades/none.png", 0), none = gfx.CreateSkinImage("common/grades/none.png", 0),
} }
local difficultyLabelUnderImages = {
gfx.CreateSkinImage("songtransition/difficulty_labels/nov.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/adv.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/exh.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/mxm.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/inf.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/grv.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/hvn.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/vvd.png", 0),
}
game.LoadSkinSample('song_wheel/cursor_change.wav'); game.LoadSkinSample('song_wheel/cursor_change.wav');
local difficultyNumbers; local difficultyNumbers;
@ -307,6 +319,26 @@ function drawData() -- Draws the song data on the left panel
-- Draw artist -- Draw artist
gfx.Text(song.artist, 30, 997); gfx.Text(song.artist, 30, 997);
-- Draw difficulties
local DIFF_X_START = 98.5
local DIFF_GAP = 114.8;
for index, diff in ipairs(song.difficulties) do
gfx.BeginPath()
if index == selectedDifficulty then
gfx.ImageRect(DIFF_X_START+(index-1)*DIFF_GAP-(163*0.8)/2, 1028, 163*0.8, 163*0.8, diffCursorImage, 1, 0)
end
draw_number(85+(index-1)*DIFF_GAP, 1085, 1.0, diff.level, 2, difficultyNumbers, false, 0.8, 1)
local diffLabelImage = difficultyLabelUnderImages[diff.difficulty+1];
local tw, th = gfx.ImageSize(diffLabelImage)
tw=tw*0.9
th=th*0.9
gfx.BeginPath()
gfx.ImageRect(DIFF_X_START+(index-1)*DIFF_GAP-tw/2, 1050, tw, th, diffLabelImage, 1, 0)
end
end end
function tickTransitions(deltaTime) function tickTransitions(deltaTime)

View File

@ -11,8 +11,10 @@ local difficultyLabelImages = {
gfx.CreateSkinImage("songtransition/difficulty_labels/adv.png", 0), gfx.CreateSkinImage("songtransition/difficulty_labels/adv.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/exh.png", 0), gfx.CreateSkinImage("songtransition/difficulty_labels/exh.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/mxm.png", 0), gfx.CreateSkinImage("songtransition/difficulty_labels/mxm.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/mxm.png", 0), gfx.CreateSkinImage("songtransition/difficulty_labels/inf.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/mxm.png", 0), gfx.CreateSkinImage("songtransition/difficulty_labels/grv.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/hvn.png", 0),
gfx.CreateSkinImage("songtransition/difficulty_labels/vvd.png", 0),
} }
local transitionTimer = 0; local transitionTimer = 0;