More bug fixes
- BPM and go go time change even when there are no notes after the change, seen in Ego Ego Atakushi and UFO Swingin' - Maker URL can be added to a local tja - Example: `MAKER: Creator name <https://example.com/path>` - Long list of settings scrolls more naturally with arrow keys - When media engagement is low, gamepad users will not be able to proceed on the title screen until a mouse click or a key press unpauses the audio context - Fix "Bad" note gauge judgement on easy difficulty - In debug, use hash to tell apart songs
This commit is contained in:
@@ -544,7 +544,7 @@ class SettingsView{
|
||||
}while(this.items[this.selected].id === "default" && name !== "left")
|
||||
selected = this.items[this.selected]
|
||||
selected.settingBox.classList.add("selected")
|
||||
selected.settingBox.scrollIntoView()
|
||||
this.scrollTo(selected.settingBox)
|
||||
this.playSound("se_ka")
|
||||
}else if(name === "back"){
|
||||
this.onEnd()
|
||||
@@ -606,6 +606,21 @@ class SettingsView{
|
||||
}
|
||||
}
|
||||
}
|
||||
scrollTo(element){
|
||||
var parentNode = element.parentNode
|
||||
var selected = element.getBoundingClientRect()
|
||||
var parent = parentNode.getBoundingClientRect()
|
||||
var scrollY = parentNode.scrollTop
|
||||
var selectedPosTop = selected.top - selected.height / 2
|
||||
if(Math.floor(selectedPosTop) < Math.floor(parent.top)){
|
||||
parentNode.scrollTop += selectedPosTop - parent.top
|
||||
}else{
|
||||
var selectedPosBottom = selected.top + selected.height * 1.5 - parent.top
|
||||
if(Math.floor(selectedPosBottom) > Math.floor(parent.height)){
|
||||
parentNode.scrollTop += selectedPosBottom - parent.height
|
||||
}
|
||||
}
|
||||
}
|
||||
keyboardSet(){
|
||||
var selected = this.items[this.selected]
|
||||
var current = settings.items[selected.id]
|
||||
|
||||
Reference in New Issue
Block a user