mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-11-15 07:21:50 +08:00
Fix tutorial not saving
This commit is contained in:
parent
f5d4c6bce5
commit
454028a7e6
@ -431,19 +431,15 @@ class SettingsView{
|
||||
this.gamepadButtons.style.backgroundPosition = "0 " + (-318 - 132 * this.gamepadSelected) + "px"
|
||||
this.gamepadSettings.style.display = "block"
|
||||
}
|
||||
gamepadBack(save){
|
||||
gamepadBack(confirm){
|
||||
if(this.mode !== "gamepad"){
|
||||
return
|
||||
}
|
||||
if(save){
|
||||
var selected = this.items[this.selected]
|
||||
var current = settings.items[selected.id]
|
||||
settings.setItem(selected.id, current.options[this.gamepadSelected])
|
||||
this.getValue(selected.id, selected.valueDiv)
|
||||
assets.sounds["se_don"].play()
|
||||
}else{
|
||||
assets.sounds["se_cancel"].play()
|
||||
}
|
||||
var selected = this.items[this.selected]
|
||||
var current = settings.items[selected.id]
|
||||
settings.setItem(selected.id, current.options[this.gamepadSelected])
|
||||
this.getValue(selected.id, selected.valueDiv)
|
||||
assets.sounds[confirm ? "se_don" : "se_cancel"].play()
|
||||
this.gamepadSettings.style.display = ""
|
||||
this.mode = "settings"
|
||||
}
|
||||
@ -466,6 +462,9 @@ class SettingsView{
|
||||
if(this.tutorial && !this.touched){
|
||||
new Tutorial(false, this.songId)
|
||||
}else{
|
||||
try{
|
||||
localStorage.setItem("tutorial", "true")
|
||||
}catch(e){}
|
||||
new SongSelect(this.tutorial ? false : "settings", false, this.touched, this.songId)
|
||||
}
|
||||
}, 500)
|
||||
|
@ -44,7 +44,9 @@ class Tutorial{
|
||||
if(pressed){
|
||||
this.clean()
|
||||
assets.sounds["se_don"].play()
|
||||
localStorage.setItem("tutorial", "true")
|
||||
try{
|
||||
localStorage.setItem("tutorial", "true")
|
||||
}catch(e){}
|
||||
setTimeout(() => {
|
||||
new SongSelect(this.fromSongSel ? "tutorial" : false, false, this.touched, this.songId)
|
||||
}, 500)
|
||||
|
Loading…
Reference in New Issue
Block a user