Compare commits

...

2 Commits

Author SHA1 Message Date
de9c72f760 settings arrangement 2023-04-26 00:06:07 +02:00
c774cc25fc start center 2023-04-25 22:56:03 +02:00
2 changed files with 16 additions and 16 deletions

19
app.js
View File

@ -238,7 +238,7 @@ class Matrix extends MinoesTable {
}
}
}
Matrix.prototype.init_center = [5, 4]
Matrix.prototype.init_center = [4, 4]
class Tetromino {
@ -398,19 +398,20 @@ class Settings {
}
load() {
for (let input of this.form.getElementsByTagName("input")) {
if (localStorage[input.name]) input.value = localStorage[input.name]
for (let element of settingsForm.elements) {
if (element.name) {
if (localStorage[element.name]) element.value = localStorage[element.name]
}
}
if (localStorage["stylesheet"]) stylesheetSelect.value = localStorage["stylesheet"]
document.selectedStyleSheetSet=stylesheetSelect.value
document.selectedStyleSheetSet = stylesheetSelect.value
}
save() {
for (let input of this.form.getElementsByTagName("input")) {
localStorage[input.name] = input.value
for (let element of settingsForm.elements) {
if (element.name) {
localStorage[element.name] = element.value
}
}
localStorage["stylesheet"] = stylesheetSelect.value
}
init() {

View File

@ -96,14 +96,13 @@
</div>
<label for="dasInput" class="col-sm-2 col-form-label" title="Delayed AutoShift : délai initial avant répétition">DAS</label>
</fieldset>
<fieldset class="row g-2 mb-3 align-items-center text-center">
<legend class="text-start">Feuille de style</legend>
<label for="stylesheetSelect" class="col-sm-2 col-form-label text-center">Style</label>
<div class="col-sm-4">
<fieldset class="row g-2 mb-3 align-items-center text-center justify-content-center">
<legend class="text-start">Thème</legend>
<div class="col-sm-8">
<select name="stylesheet" id="stylesheetSelect" class="form-select" onclick="document.selectedStyleSheetSet=this.value">
<option selected>Classique</option>
<option>Électro</option>
<option>Pop</option>
<option>Électro</option>
<option>Rétro</option>
</select>
</div>
@ -228,8 +227,8 @@
<tr><th>Score</th> <td id="statsModalScoreCell"></td> <th>Niveau</th> <td id="statsModalLevelCell"></td> </tr>
<tr><th>Meilleur score</th> <td id="statsModalHighScoreCell"></td> <th>Temps</th> <td id="statsModalTimeCell"></td> </tr>
<tr><th>Lignes</th> <td id="statsModaltotalClearedLines"></td> <th>Lignes par minutes</th> <td id="statsModaltotalClearedLinesPM"></td> </tr>
<tr><th>Quatris</th> <td id="statsModalNbQuatris"></td> <th>Pirouettes</th> <td id="statsModalNbTSpin"></td> </tr>
<tr><th>Plus grand enchaînement</th> <td id="statsModalMaxCombo"></td> <th>Plus grand bout à bout</th> <td id="statsModalMaxB2B"></td> </tr>
<tr><th>Quatris</th> <td id="statsModalNbQuatris"></td> <th>Plus grand enchaînement</th> <td id="statsModalMaxCombo"></td> </tr>
<tr><th>Pirouettes</th> <td id="statsModalNbTSpin"></td> <th>Plus grand bout à bout</th> <td id="statsModalMaxB2B"></td> </tr>
</table>
</div>
<div class="modal-footer">