From 5a36e63f3645a5f0b0aedd8366c509571f38161a Mon Sep 17 00:00:00 2001 From: Bui Date: Fri, 3 May 2019 03:59:31 +0100 Subject: [PATCH] Display all settings on first load --- public/src/js/settings.js | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/public/src/js/settings.js b/public/src/js/settings.js index 35a863e..2d0c7ed 100644 --- a/public/src/js/settings.js +++ b/public/src/js/settings.js @@ -167,14 +167,13 @@ class SettingsView{ var content = this.getElement("view-content") this.items = [] - this.selected = tutorial ? 1 : 0 + this.selected = 0 for(let i in settings.items){ var current = settings.items[i] if( !touchEnabled && current.touch === true || touchEnabled && current.touch === false || - !gamepadEnabled && current.gamepad === true || - tutorial && current.type !== "language" + !gamepadEnabled && current.gamepad === true ){ continue } @@ -202,15 +201,11 @@ class SettingsView{ valueDiv: valueDiv }) } - if(tutorial){ - this.defaultButton.style.display = "none" - this.endButton.classList.add("selected") - }else{ - this.items.push({ - id: "default", - settingBox: this.defaultButton - }) - this.addTouch(this.defaultButton, this.defaultSettings.bind(this)) + this.items.push({ + id: "default", + settingBox: this.defaultButton + }) + this.addTouch(this.defaultButton, this.defaultSettings.bind(this)) } this.items.push({ id: "back", @@ -494,10 +489,8 @@ class SettingsView{ this.gamepadTitle.setAttribute("alt", strings.settings.gamepadLayout.name) this.gamepadEndButton.innerText = strings.settings.ok this.gamepadEndButton.setAttribute("alt", strings.settings.ok) - if(!this.tutorial){ - this.defaultButton.innerText = strings.settings.default - this.defaultButton.setAttribute("alt", strings.settings.default) - } + this.defaultButton.innerText = strings.settings.default + this.defaultButton.setAttribute("alt", strings.settings.default) } mod(length, index){ return ((index % length) + length) % length