Bug fixes
- Change song select mouse wheel song scrolling to be instant - Clicking on don chan in account settings toggles the animation - If the music is too long for the chart, the results screen is shown earlier - Fix weird BPM values freezing the browser (zero, negative, and very large) - Add a warning to the page when JavaScript is disabled in the browser - Fix Chrome auto dark mode by forcing light mode on the page - Add a meta keywords tag to the page - Fix plugin names getting cut off in the menu - Delay the function editing of the EditFunction class in plugins to the start() function instead of load() - When stopping one of the plugins, all the plugins have to be stopped in reverse order and started again so that patched code of a stopped plugin does not linger around - Fix importing plugins that have a SyntaxError - Fix plugins getting the same internal name when added without one, causing them to not appear in the plugin settings - Support editing args in EditFunction for plugins - Prevent multiple websockets from being opened - Fix page freezing after selecting Random song with no songs - Fix the back button being repeated twice when there are no songs - Fix /admin/users not accepting case insensitive usernames - Pressing enter on the Delete Account field does the expected action instead of refreshing the page - Better error message when custom folder access is denied - Fix being able to start netplay in custom songs after refreshing the page (#383) - Fix an error when importing songs from previous session and clicking on the white spot where you normally start multiplayer session - Fix canvas elements becoming smaller than 1x1 resolution and crashing the game (#390) - Fix song frame shadow cache on song select not being cleared when resizing the browser window, causing it to become blurry - Fix a pause-restart error when you hit both confirm keys on the restart button
This commit is contained in:
@@ -104,18 +104,20 @@ class SongSelect{
|
||||
return a.id > b.id ? 1 : -1
|
||||
}
|
||||
})
|
||||
this.songs.push({
|
||||
title: strings.back,
|
||||
skin: this.songSkin.back,
|
||||
action: "back"
|
||||
})
|
||||
this.songs.push({
|
||||
title: strings.randomSong,
|
||||
skin: this.songSkin.random,
|
||||
action: "random",
|
||||
category: strings.random,
|
||||
canJump: true
|
||||
})
|
||||
if(assets.songs.length){
|
||||
this.songs.push({
|
||||
title: strings.back,
|
||||
skin: this.songSkin.back,
|
||||
action: "back"
|
||||
})
|
||||
this.songs.push({
|
||||
title: strings.randomSong,
|
||||
skin: this.songSkin.random,
|
||||
action: "random",
|
||||
category: strings.random,
|
||||
canJump: true
|
||||
})
|
||||
}
|
||||
if(touchEnabled){
|
||||
if(fromTutorial === "tutorial"){
|
||||
fromTutorial = false
|
||||
@@ -287,7 +289,8 @@ class SongSelect{
|
||||
options: 0,
|
||||
selLock: false,
|
||||
catJump: false,
|
||||
focused: true
|
||||
focused: true,
|
||||
waitPreview: 0
|
||||
}
|
||||
this.songSelecting = {
|
||||
speed: 400,
|
||||
@@ -472,7 +475,7 @@ class SongSelect{
|
||||
this.toAccount()
|
||||
}else if(p2.session && 438 < mouse.x && mouse.x < 834 && mouse.y > 603){
|
||||
this.toSession()
|
||||
}else if(!p2.session && mouse.x > 641 && mouse.y > 603 && p2.socket.readyState === 1 && !assets.customSongs){
|
||||
}else if(!p2.session && mouse.x > 641 && mouse.y > 603 && p2.socket && p2.socket.readyState === 1 && !assets.customSongs){
|
||||
this.toSession()
|
||||
}else{
|
||||
var moveBy = this.songSelMouse(mouse.x, mouse.y)
|
||||
@@ -508,7 +511,7 @@ class SongSelect{
|
||||
event.preventDefault()
|
||||
}
|
||||
mouseWheel(event){
|
||||
if(this.state.screen === "song"){
|
||||
if(this.state.screen === "song" && this.state.focused){
|
||||
this.wheelTimer = this.getMS()
|
||||
|
||||
if(event.deltaY < 0) {
|
||||
@@ -809,7 +812,7 @@ class SongSelect{
|
||||
this.selectedDiff = 1
|
||||
do{
|
||||
this.state.options = this.mod(this.optionsList.length, this.state.options + moveBy)
|
||||
}while((p2.socket.readyState !== 1 || assets.customSongs) && this.state.options === 2)
|
||||
}while((p2.socket && p2.socket.readyState !== 1 || assets.customSongs) && this.state.options === 2)
|
||||
}
|
||||
}
|
||||
toTitleScreen(){
|
||||
@@ -913,12 +916,7 @@ class SongSelect{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.wheelScrolls !== 0 && !this.state.locked && ms >= this.wheelTimer + 20) {
|
||||
this.moveToSong(this.wheelScrolls)
|
||||
this.wheelScrolls -= this.wheelScrolls
|
||||
}
|
||||
|
||||
|
||||
if(!this.redrawRunning){
|
||||
return
|
||||
}
|
||||
@@ -944,8 +942,8 @@ class SongSelect{
|
||||
var ratioY = winH / 720
|
||||
var ratio = (ratioX < ratioY ? ratioX : ratioY)
|
||||
if(this.winW !== winW || this.winH !== winH){
|
||||
this.canvas.width = winW
|
||||
this.canvas.height = winH
|
||||
this.canvas.width = Math.max(1, winW)
|
||||
this.canvas.height = Math.max(1, winH)
|
||||
ctx.scale(ratio, ratio)
|
||||
this.canvas.style.width = (winW / this.pixelRatio) + "px"
|
||||
this.canvas.style.height = (winH / this.pixelRatio) + "px"
|
||||
@@ -1034,6 +1032,13 @@ class SongSelect{
|
||||
var screen = this.state.screen
|
||||
var selectedWidth = this.songAsset.width
|
||||
|
||||
if(this.wheelScrolls !== 0 && !this.state.locked && ms >= this.wheelTimer + 20) {
|
||||
this.state.move = this.wheelScrolls
|
||||
this.state.waitPreview = ms + 400
|
||||
this.wheelScrolls = 0
|
||||
this.endPreview()
|
||||
}
|
||||
|
||||
if(screen === "title" || screen === "titleFadeIn"){
|
||||
if(ms > this.state.screenMS + 1000){
|
||||
this.state.screen = "song"
|
||||
@@ -2439,7 +2444,7 @@ class SongSelect{
|
||||
}
|
||||
|
||||
startPreview(loadOnly){
|
||||
if(!loadOnly && this.state && this.state.showWarning){
|
||||
if(!loadOnly && this.state && this.state.showWarning || this.state.waitPreview > this.getMS()){
|
||||
return
|
||||
}
|
||||
var currentSong = this.songs[this.selectedSong]
|
||||
|
||||
Reference in New Issue
Block a user