mirror of
https://github.com/yuukiwww/taiko-web.git
synced 2024-10-22 17:05:49 +02:00
SongSelect: Mark songs with lyrics
This commit is contained in:
parent
18b6e7dfc2
commit
b4dcd76f90
@ -1745,46 +1745,64 @@ class SongSelect{
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if(currentSong.maker || currentSong.maker === 0){
|
var hasMaker = currentSong.maker || currentSong.maker === 0
|
||||||
|
if(hasMaker || currentSong.lyrics){
|
||||||
if (songSel) {
|
if (songSel) {
|
||||||
var _x = x + 38
|
var _x = x + 38
|
||||||
var _y = y + 10
|
var _y = y + 10
|
||||||
|
ctx.strokeStyle = "#000"
|
||||||
ctx.lineWidth = 5
|
ctx.lineWidth = 5
|
||||||
|
|
||||||
var grd = ctx.createLinearGradient(_x, _y, _x, _y+50);
|
if(hasMaker){
|
||||||
grd.addColorStop(0, '#fa251a');
|
var grd = ctx.createLinearGradient(_x, _y, _x, _y + 50)
|
||||||
grd.addColorStop(1, '#ffdc33');
|
grd.addColorStop(0, "#fa251a")
|
||||||
|
grd.addColorStop(1, "#ffdc33")
|
||||||
ctx.fillStyle = grd;
|
ctx.fillStyle = grd
|
||||||
|
}else{
|
||||||
|
ctx.fillStyle = "#000"
|
||||||
|
}
|
||||||
this.draw.roundedRect({
|
this.draw.roundedRect({
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
x: _x - 28,
|
x: _x - 28,
|
||||||
y: _y,
|
y: _y,
|
||||||
w: 130,
|
w: 192,
|
||||||
h: 50,
|
h: 50,
|
||||||
radius: 24
|
radius: 24
|
||||||
})
|
})
|
||||||
ctx.fill()
|
ctx.fill()
|
||||||
ctx.stroke()
|
ctx.stroke()
|
||||||
ctx.beginPath()
|
|
||||||
ctx.arc(_x, _y + 28, 20, 0, Math.PI * 2)
|
if(hasMaker){
|
||||||
ctx.fill()
|
this.draw.layeredText({
|
||||||
|
ctx: ctx,
|
||||||
this.draw.layeredText({
|
text: strings.creative.creative,
|
||||||
ctx: ctx,
|
fontSize: strings.id === "en" ? 28 : 34,
|
||||||
text: strings.creative.creative,
|
fontFamily: this.font,
|
||||||
fontSize: strings.id == "en" ? 30 : 34,
|
align: "center",
|
||||||
fontFamily: this.font,
|
baseline: "middle",
|
||||||
align: "center",
|
x: _x + 68,
|
||||||
baseline: "middle",
|
y: _y + (strings.id === "ja" || strings.id === "en" ? 25 : 28),
|
||||||
x: _x + 38,
|
width: 172
|
||||||
y: _y + (["ja", "en"].indexOf(strings.id) >= 0 ? 25 : 28),
|
}, [
|
||||||
width: 110
|
{outline: "#fff", letterBorder: 6},
|
||||||
}, [
|
{fill: "#000"}
|
||||||
{outline: "#fff", letterBorder: 8},
|
])
|
||||||
{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){
|
} else if(currentSong.maker && currentSong.maker.id > 0 && currentSong.maker.name){
|
||||||
var _x = x + 62
|
var _x = x + 62
|
||||||
var _y = y + 380
|
var _y = y + 380
|
||||||
|
@ -1087,6 +1087,13 @@ var translations = {
|
|||||||
tw: "製作者",
|
tw: "製作者",
|
||||||
ko: "만드는 사람"
|
ko: "만드는 사람"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
withLyrics: {
|
||||||
|
ja: "歌詞あり",
|
||||||
|
en: "With lyrics",
|
||||||
|
cn: "带歌词",
|
||||||
|
tw: "帶歌詞",
|
||||||
|
ko: "가사가있는"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var allStrings = {}
|
var allStrings = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user