Removed more hardcoded instances of categories
This commit is contained in:
@@ -23,40 +23,6 @@
|
||||
this.darkDonBg = false
|
||||
|
||||
this.pauseOptions = strings.pauseOptions
|
||||
this.categories = {
|
||||
"J-POP": {
|
||||
sort: 0,
|
||||
infoFill: "#004d68"
|
||||
},
|
||||
"アニメ": {
|
||||
sort: 1,
|
||||
infoFill: "#9c4002"
|
||||
},
|
||||
"ボーカロイド™曲": {
|
||||
sort: 2,
|
||||
infoFill: "#546184"
|
||||
},
|
||||
"バラエティ": {
|
||||
sort: 3,
|
||||
infoFill: "#3c6800"
|
||||
},
|
||||
"クラシック": {
|
||||
sort: 4,
|
||||
infoFill: "#865800"
|
||||
},
|
||||
"ゲームミュージック": {
|
||||
sort: 5,
|
||||
infoFill: "#4f2886"
|
||||
},
|
||||
"ナムコオリジナル": {
|
||||
sort: 6,
|
||||
infoFill: "#961e00"
|
||||
},
|
||||
"default": {
|
||||
sort: 7,
|
||||
infoFill: "#656565"
|
||||
}
|
||||
}
|
||||
this.difficulty = {
|
||||
"easy": 0,
|
||||
"normal": 1,
|
||||
@@ -329,10 +295,10 @@
|
||||
var _h = 22
|
||||
var _x = 628 - _w
|
||||
var _y = 88 - _h
|
||||
if(selectedSong.category in this.categories){
|
||||
ctx.fillStyle = this.categories[selectedSong.category].infoFill
|
||||
if(assets.categories.find(cat=>cat.title == selectedSong.category)){
|
||||
ctx.fillStyle = assets.categories.find(cat=>cat.title == selectedSong.category).songSkin.outline
|
||||
}else{
|
||||
ctx.fillStyle = this.categories.default.infoFill
|
||||
ctx.fillStyle = assets.categories.find(cat=>cat.title == 'default').songSkin.outline
|
||||
}
|
||||
this.draw.roundedRect({
|
||||
ctx: ctx,
|
||||
@@ -1425,12 +1391,6 @@
|
||||
var songLayers = [document.getElementById("layer1"), document.getElementById("layer2")]
|
||||
var prefix = ""
|
||||
|
||||
if(selectedSong.category in this.categories){
|
||||
var catId = this.categories[selectedSong.category].sort
|
||||
}else{
|
||||
var catId = this.categories.default.sort
|
||||
}
|
||||
|
||||
if(!selectedSong.songSkin.song){
|
||||
var id = selectedSong.songBg
|
||||
this.songBg.classList.add("songbg-" + id)
|
||||
|
||||
Reference in New Issue
Block a user