Commit 5a36e63f authored by Bui's avatar Bui Committed by GitHub

Display all settings on first load

parent 5d7d38dc
...@@ -167,14 +167,13 @@ class SettingsView{ ...@@ -167,14 +167,13 @@ class SettingsView{
var content = this.getElement("view-content") var content = this.getElement("view-content")
this.items = [] this.items = []
this.selected = tutorial ? 1 : 0 this.selected = 0
for(let i in settings.items){ for(let i in settings.items){
var current = settings.items[i] var current = settings.items[i]
if( if(
!touchEnabled && current.touch === true || !touchEnabled && current.touch === true ||
touchEnabled && current.touch === false || touchEnabled && current.touch === false ||
!gamepadEnabled && current.gamepad === true || !gamepadEnabled && current.gamepad === true
tutorial && current.type !== "language"
){ ){
continue continue
} }
...@@ -202,15 +201,11 @@ class SettingsView{ ...@@ -202,15 +201,11 @@ class SettingsView{
valueDiv: valueDiv valueDiv: valueDiv
}) })
} }
if(tutorial){ this.items.push({
this.defaultButton.style.display = "none" id: "default",
this.endButton.classList.add("selected") settingBox: this.defaultButton
}else{ })
this.items.push({ this.addTouch(this.defaultButton, this.defaultSettings.bind(this))
id: "default",
settingBox: this.defaultButton
})
this.addTouch(this.defaultButton, this.defaultSettings.bind(this))
} }
this.items.push({ this.items.push({
id: "back", id: "back",
...@@ -494,10 +489,8 @@ class SettingsView{ ...@@ -494,10 +489,8 @@ class SettingsView{
this.gamepadTitle.setAttribute("alt", strings.settings.gamepadLayout.name) this.gamepadTitle.setAttribute("alt", strings.settings.gamepadLayout.name)
this.gamepadEndButton.innerText = strings.settings.ok this.gamepadEndButton.innerText = strings.settings.ok
this.gamepadEndButton.setAttribute("alt", strings.settings.ok) this.gamepadEndButton.setAttribute("alt", strings.settings.ok)
if(!this.tutorial){ this.defaultButton.innerText = strings.settings.default
this.defaultButton.innerText = strings.settings.default this.defaultButton.setAttribute("alt", strings.settings.default)
this.defaultButton.setAttribute("alt", strings.settings.default)
}
} }
mod(length, index){ mod(length, index){
return ((index % length) + length) % length return ((index % length) + length) % length
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment