/ songwheel crash if no jacket is found and if cleared medal is shown
This commit is contained in:
parent
ec57a1fbba
commit
bcfe54fa3b
|
@ -5,6 +5,8 @@ local songPlateBottomBarOverlayImage = gfx.CreateSkinImage("song_select/plate/bo
|
||||||
|
|
||||||
local cursorImage = gfx.CreateSkinImage("song_select/cursor.png", 1)
|
local cursorImage = gfx.CreateSkinImage("song_select/cursor.png", 1)
|
||||||
|
|
||||||
|
local defaultJacketImage = gfx.CreateSkinImage("song_select/loading.png", 0)
|
||||||
|
|
||||||
local difficultyLabelImages = {
|
local difficultyLabelImages = {
|
||||||
gfx.CreateSkinImage("song_select/plate/difficulty_labels/novice.png", 1),
|
gfx.CreateSkinImage("song_select/plate/difficulty_labels/novice.png", 1),
|
||||||
gfx.CreateSkinImage("song_select/plate/difficulty_labels/advanced.png", 1),
|
gfx.CreateSkinImage("song_select/plate/difficulty_labels/advanced.png", 1),
|
||||||
|
@ -19,7 +21,7 @@ local difficultyLabelImages = {
|
||||||
local badgeImages = {
|
local badgeImages = {
|
||||||
gfx.CreateSkinImage("song_select/medal/nomedal.png", 1),
|
gfx.CreateSkinImage("song_select/medal/nomedal.png", 1),
|
||||||
gfx.CreateSkinImage("song_select/medal/played.png", 1),
|
gfx.CreateSkinImage("song_select/medal/played.png", 1),
|
||||||
gfx.CreateSkinImage("song_select/medal/cleared.png", 1),
|
gfx.CreateSkinImage("song_select/medal/clear.png", 1),
|
||||||
gfx.CreateSkinImage("song_select/medal/hard.png", 1),
|
gfx.CreateSkinImage("song_select/medal/hard.png", 1),
|
||||||
gfx.CreateSkinImage("song_select/medal/uc.png", 1),
|
gfx.CreateSkinImage("song_select/medal/uc.png", 1),
|
||||||
gfx.CreateSkinImage("song_select/medal/puc.png", 1),
|
gfx.CreateSkinImage("song_select/medal/puc.png", 1),
|
||||||
|
@ -97,7 +99,7 @@ function drawSong(song, y)
|
||||||
-- Draw jacket
|
-- Draw jacket
|
||||||
local jacketImage = getJacketImage(song);
|
local jacketImage = getJacketImage(song);
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
gfx.ImageRect(songX+4, y+4, 163, 163, jacketImage, 1, 0)
|
gfx.ImageRect(songX+4, y+4, 163, 163, jacketImage or defaultJacketImage, 1, 0)
|
||||||
|
|
||||||
-- Draw the overlay for the song plate (that bottom black bar)
|
-- Draw the overlay for the song plate (that bottom black bar)
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
|
@ -113,10 +115,11 @@ function drawSong(song, y)
|
||||||
|
|
||||||
-- Draw score badge
|
-- Draw score badge
|
||||||
local badgeImage = badgeImages[1];
|
local badgeImage = badgeImages[1];
|
||||||
if bestScore and bestScore.badge > 0 then
|
if bestScore then
|
||||||
badgeImage = badgeImages[bestScore.badge+1];
|
badgeImage = badgeImages[bestScore.badge+1];
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
gfx.ImageRect(songX+282, y+44, 79, 69, badgeImage, 1, 0)
|
gfx.ImageRect(songX+282, y+44, 79, 69, badgeImage, 1, 0)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue