SongSelect: Mark songs with lyrics

This commit is contained in:
LoveEevee 2020-03-30 17:29:53 +03:00
parent 18b6e7dfc2
commit b4dcd76f90
2 changed files with 52 additions and 27 deletions

View File

@ -1746,45 +1746,63 @@ class SongSelect{
})
}
if(currentSong.maker || currentSong.maker === 0){
var hasMaker = currentSong.maker || currentSong.maker === 0
if(hasMaker || currentSong.lyrics){
if (songSel) {
var _x = x + 38
var _y = y + 10
ctx.strokeStyle = "#000"
ctx.lineWidth = 5
var grd = ctx.createLinearGradient(_x, _y, _x, _y+50);
grd.addColorStop(0, '#fa251a');
grd.addColorStop(1, '#ffdc33');
ctx.fillStyle = grd;
if(hasMaker){
var grd = ctx.createLinearGradient(_x, _y, _x, _y + 50)
grd.addColorStop(0, "#fa251a")
grd.addColorStop(1, "#ffdc33")
ctx.fillStyle = grd
}else{
ctx.fillStyle = "#000"
}
this.draw.roundedRect({
ctx: ctx,
x: _x - 28,
y: _y,
w: 130,
w: 192,
h: 50,
radius: 24
})
ctx.fill()
ctx.stroke()
ctx.beginPath()
ctx.arc(_x, _y + 28, 20, 0, Math.PI * 2)
ctx.fill()
if(hasMaker){
this.draw.layeredText({
ctx: ctx,
text: strings.creative.creative,
fontSize: strings.id == "en" ? 30 : 34,
fontSize: strings.id === "en" ? 28 : 34,
fontFamily: this.font,
align: "center",
baseline: "middle",
x: _x + 38,
y: _y + (["ja", "en"].indexOf(strings.id) >= 0 ? 25 : 28),
width: 110
x: _x + 68,
y: _y + (strings.id === "ja" || strings.id === "en" ? 25 : 28),
width: 172
}, [
{outline: "#fff", letterBorder: 8},
{outline: "#fff", letterBorder: 6},
{fill: "#000"}
])
}else{
this.draw.layeredText({
ctx: ctx,
text: strings.withLyrics,
fontSize: strings.id === "en" ? 28 : 34,
fontFamily: this.font,
align: "center",
baseline: "middle",
x: _x + 68,
y: _y + (strings.id === "ja" || strings.id === "en" ? 25 : 28),
width: 172
}, [
{fill: currentSong.skin.border[0]}
])
}
} else if(currentSong.maker && currentSong.maker.id > 0 && currentSong.maker.name){
var _x = x + 62
var _y = y + 380

View File

@ -1087,6 +1087,13 @@ var translations = {
tw: "製作者",
ko: "만드는 사람"
}
},
withLyrics: {
ja: "歌詞あり",
en: "With lyrics",
cn: "带歌词",
tw: "帶歌詞",
ko: "가사가있는"
}
}
var allStrings = {}