Merge pull request #68 from LoveEevee/view-blue-gauge

View: Blue gauge for second player
This commit is contained in:
Bui 2018-11-06 19:33:43 +00:00 committed by GitHub
commit 5d4d69be71
4 changed files with 12 additions and 9 deletions

View File

@ -998,19 +998,19 @@
ctx.fill()
if(gaugeFilled <= gaugeClear){
ctx.fillStyle = "#680000"
ctx.fillStyle = config.blue ? "#184d55" : "#680000"
var x = Math.max(0, gaugeFilled - 5)
ctx.fillRect(x, firstTop, gaugeClear - x + 2, 22)
}
if(gaugeFilled > 0){
var w = Math.min(gaugeClear + 1, gaugeFilled - 4)
ctx.fillStyle = "#ff3508"
ctx.fillStyle = config.blue ? "#00edff" : "#ff3408"
ctx.fillRect(0, firstTop + 2, w, 20)
ctx.fillStyle = "#ff9e94"
ctx.fillStyle = config.blue ? "#9cffff" : "#ffa191"
ctx.fillRect(0, firstTop, w, 3)
}
if(gaugeFilled < gaugeW - 4){
ctx.fillStyle = "#684c00"
ctx.fillStyle = "#684900"
var x = Math.max(gaugeClear + 9, gaugeFilled - gaugeClear + 9)
ctx.fillRect(x, secondTop, gaugeW - 4 - x, 44)
}
@ -1021,7 +1021,7 @@
ctx.fillStyle = "#fff"
ctx.fillRect(gaugeClear + 9, secondTop, w, 3)
}
ctx.fillStyle = cleared ? "#ff0" : "#684c00"
ctx.fillStyle = cleared ? "#ff0" : "#684900"
ctx.beginPath()
if(config.multiplayer){
this.roundedCorner(ctx, gaugeClear, secondTop + 44, 10, 3)

View File

@ -454,7 +454,8 @@ class Scoresheet{
percentage: gaugePercent,
font: this.font,
scale: w / 788,
scoresheet: true
scoresheet: true,
blue: p === 1
})
this.draw.soul({
ctx: ctx,

View File

@ -1621,7 +1621,7 @@ class SongSelect{
return song.id === id
})
currentSong.p2Cursor = diffId
if(currentSong.stars){
if(p2.session && currentSong.stars){
this.selectedSong = index
this.state.move = 0
if(this.state.screen !== "difficulty"){

View File

@ -339,7 +339,8 @@
percentage: gaugePercent,
font: this.font,
scale: 0.7,
multiplayer: this.multiplayer === 2
multiplayer: this.multiplayer === 2,
blue: this.multiplayer === 2
})
this.draw.soul({
ctx: ctx,
@ -411,7 +412,8 @@
clear: 25 / 50,
percentage: gaugePercent,
font: this.font,
multiplayer: this.multiplayer === 2
multiplayer: this.multiplayer === 2,
blue: this.multiplayer === 2
})
this.draw.soul({
ctx: ctx,