-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
401 lines (370 loc) · 26.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<!DOCTYPE html>
<html lang="en">
<head>
<title>teti</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="./assets/titanicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./styles/style.css">
<link rel="stylesheet" href="./styles/boards.css">
<link rel="preload" href="./styles/menus.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="./styles/miscmenus.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="./styles/settings.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<script defer src="https://cdn.jsdelivr.net/npm/pixi.js@latest/dist/pixi.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/gsap@latest/dist/gsap.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/gsap@latest/dist/PixiPlugin.min.js"></script>
<script defer src="./src/main.js" type="module"></script>
</head>
<body id="body">
<!-- BOARD -->
<div id="board">
<progress id="garbageQueue" max="40" value="0"></progress>
<progress id="lockTimer" max="100" value="50"></progress>
<progress id="lockCounter" max="100" value="50"></progress>
<progress id="climbSpeedBar" max="100" value="0"></progress>
</div>
<!-- INFO OVERLAYS -->
<div id="splashScreen">
<h1>Teti</h1>
<p id="splashText">loading code</p>
<div class="spinner"></div>
</div>
<div id="nofocus">OUT OF FOCUS<span>Click To Return</span></div>
<div id="redochoices">
<p class="smalltext" id="history" style="font-size: 0.9em; color: var(--l-gray); width: 100%;">history: 0</p>
<button class="redochoice selected">1</button>
<button class="redochoice">2</button>
</div>
<div id="notifications"></div>
<div id="rainbowSides">
<div id="rainbowLeft"></div>
<div id="rainbowRight"></div>
</div>
<!-- MAIN MENU -->
<dialog id="settingsPanel" class="dialog">
<!-- top row -->
<button id="closeSettings" class="settingPanelButton smallPanelButton" onclick="menu.toggleDialog()" title="Continue playing">
<img src="./assets/icons/play.svg" style="transform: translateY(-15%); height: 200%;">
</button>
<button id="handling" class="settingPanelButton smallPanelButton" onclick="modal.openModal('handlingDialog')" title="Change handling/tuning">
<img src="./assets/icons/handling.svg" style="transform: translateY(10%); height: 90%;">
</button>
<button id="volume" class="settingPanelButton smallPanelButton" onclick="modal.openModal('volumeDialog')" title="Change audio settings">
<img src="./assets/icons/volume.svg" style="transform: translateY(5%); height: 110%;">
</button>
<button id="goals" class="settingPanelButton smallPanelButton" onclick="modal.openModal('goalsDialog')" title="Change goals for gamemodes">
<img src="./assets/icons/goal.svg" style="transform: translateY(0%); height: 130%;">
</button>
<button id="competitive" class="settingPanelButton smallPanelButton" onclick="modal.openModal('competitiveDialog')" title="Toggle competitive mode and view PBs">
<img src="./assets/icons/medal.svg" style="transform: translateY(-8%); height: 140%;">
</button>
<button id="replays" class="settingPanelButton smallPanelButton" onclick="modal.openModal('replaysDialog')" title="Play replay">
<img src="./assets/icons/history.svg" style="transform: translateY(10%); height: 100%;">
</button>
<br>
<!-- main row -->
<button id="display" class="settingPanelButton" onclick="modal.openModal('displayDialog')" title="User Settings - Graphics, board, and background">
<img src="./assets/icons/display.svg" style="transform: translateY(10%);">
<p>GRAPHICS</p>
</button>
<button id="game" class="settingPanelButton" onclick="modal.openModal('gameDialog')" title="Game Settings - Gameplay features and mechanics">
<img src="./assets/icons/settings.svg">
<p>GAME</p>
</button>
<button id="control" class="settingPanelButton" onclick="modal.openModal('controlDialog')" title="Controls - keybinds for different actions">
<img src="./assets/icons/joystick.svg">
<p>CONTROLS</p>
</button>
<button id="gamemode" class="settingPanelButton" onclick="modal.openModal('gamemodeDialog')" title="Select Gamemode / Change goals">
<img src="./assets/icons/timer.svg">
<p>GAMEMODE</p>
</button>
<br>
<!-- bottom row -->
<p id='explanationText'><span class="spanleft">Hover for info</span> | <span class="spanright">Esc to close</span></p>
<br>
<p id='updatetext'>Check out the new update in the info button</p>
<br>
<button id="projectinfo" class="settingPanelButton smallPanelButton" onclick="window.location = './info.html'" title="See info about this project">
<img src="./assets/icons/info.svg" style="height: 80%;">
</button>
<button id="downloadSettings" class="settingPanelButton smallPanelButton" onclick="menu.downloadSettings()" title="Download / Export Settings">
<img src="./assets/icons/download.svg" style="transform: translateY(10%); height: 90%;">
</button>
<div id="uploadSettings" class="settingPanelButton smallPanelButton" style="box-sizing: border-box;" onclick="document.getElementById('fileUpload').click()" title="Upload / Import Settings (only .teti files)">
<input type="file" id="fileUpload" onchange="menu.uploadSettings(this)" hidden accept=".teti">
<img src="./assets/icons/upload.svg" style="transform: translateY(10%); height: 90%;">
</div>
<button id="projectgithub" class="settingPanelButton smallPanelButton" onclick="menu.openPage('github.com/TitanPlayz100/teti')" title="See the github page, star if you like it">
<img src="./assets/icons/github.svg" style="transform: translateY(-14%); height: 200%;">
</button>
<br>
<div id="songSelector">
<p id="songText">Not Playing</p>
<button id="pauseSong" onclick="songs.pauseSong()" class="settingPanelButton smallerPanelButton" title="Pause/Play"><img src="./assets/icons/pause.svg"/></button>
<progress id="songProgress" max=100 value=0></progress>
<button id="nextSong" onclick="songs.endSong(); songs.startSong();" class="settingPanelButton smallerPanelButton" title="Next Song"><img src="./assets/icons/next.svg" style="transform: translateY(-5%);"/></button>
</div>
</dialog>
<dialog id="displayDialog" class="scrollSettings">
<div class="settingsTop"><h1>DISPLAY</h1></div>
<div class="settingsBox">
<div class="settingRow"><p>Background URL/Hex</p> <input class="option textInput" type="text" id="background" /></div>
<div class="settingRow"><p>Block Skin URL/Name</p> <input class="option textInput" type="text" id="skin" list="options"/></div>
<div class="settingRow"><p>Board Opacity</p> <input class="option range" type="range" id="boardOpacity" min="0" max="100" step="1"/></div>
<div class="settingRow"><p>Board Size</p> <input class="option range" type="range" id="boardHeight" min="0" max="130" step="1" /></div>
<div class="settingRow"><p>Board Bounciness</p> <input class="option range" type="range" id="boardBounce" min="-5" max="20" step="0.1" /></div>
<div class="settingRow"><p>Enable Grid</p> <input class="option check" type="checkbox" id="showGrid" /></div>
<div class="settingRow"><p>Grid opacity</p> <input class="option range" type="range" id="gridopacity" min="0" max="100" step="2" /></div>
<div class="settingRow"><p>Grid Type</p> <select class="option dropdown" id="gridType"></select></div>
<div class="settingRow"><p>Shadow opacity</p> <input class="option range" type="range" id="shadowOpacity" min="0" max="100" step="5" /></div>
<div class="settingRow"><p>Coloured Shadow</p> <input class="option check" type="checkbox" id="colouredShadow" /></div>
<div class="settingRow"><p>Rainbow effect on fast pace</p> <input class="option check" type="checkbox" id="rainbowPB" /></div>
<div class="settingRow"><p>Show Lock Bar</p> <input class="option check" type="checkbox" id="lockBar" /></div>
<div class="settingRow"><p>Show out of focus text</p> <input class="option check" type="checkbox" id="outoffocus" /></div>
<div class="settingRow"><p>Action Text</p> <input class="option check" type="checkbox" id="actionText" /></div>
<div class="settingRow"><p>Enable Particles</p> <input class="option check" type="checkbox" id="particles" /></div>
<div class="settingRow"><p>Particle Volume</p> <input class="option range" type="range" id="particleVolume" min="5" max="1000" step="5" /></div>
<div class="settingRow"><p>Particle Size</p> <input class="option range" type="range" id="particleSize" min="0.1" max="10" step="0.1" /></div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('displayDialog')">Save and Close</button>
<button title="Reset settings in this section" class="settingsReset" onclick="menu.resetSettings('display')">
<img src="./assets/icons/reset.svg" alt="reset" height="100%">
</button>
</div>
</dialog>
<dialog id="gameDialog" class="scrollSettings">
<div class="settingsTop"><h1>GAME</h1></div>
<div class="settingsBox">
<div class="settingRow"><p>Gravity</p> <input class="option range exp" type="range" id="gravitySpeed" min="0" max="100" step="1" /></div>
<div class="settingRow"><p>Lock delay</p> <input class="option range" type="range" id="lockDelay" min="0" max="1000" step="10" /></div>
<div class="settingRow"><p>Lock Movements</p><input class="option range" type="range" id="maxLockMovements" min="0" max="30" step="1" /></div>
<div class="settingRow"><p>Next Pieces</p> <input class="option range" type="range" id="nextPieces" min="0" max="5" step="1" /></div>
<div class="settingRow"><p>Lockout Deaths</p> <input class="option check" type="checkbox" id="allowLockout" /></div>
<div class="settingRow"><p>Preserve DAS</p> <input class="option check" type="checkbox" id="preserveARR" /></div>
<div class="settingRow"><p>Allow Hold Queue</p> <input class="option check" type="checkbox" id="allowHold" /></div>
<div class="settingRow"><p>Infinite Hold</p> <input class="option check" type="checkbox" id="infiniteHold" /></div>
<div class="settingRow"><p>Allow Queue Modification</p> <input class="option check" type="checkbox" id="allowQueueModify" /></div>
<div class="settingRow"><p>Line Clear Delay</p> <input class="option range" type="range" id="clearDelay" min="0" max="1000" step="5" /></div>
<div class="settingRow"><p>Allspin</p> <input class="option check" type="checkbox" id="allspin" /></div>
<div class="settingRow"><p>Allspin's are mini</p> <input class="option check" type="checkbox" id="allspinminis" /></div>
<div class="settingRow"><p>Allow history (undo/redo)</p> <input class="option check" type="checkbox" id="history" /></div>
<div class="settingRow"><p>Stride (better queue)</p> <input class="option check" type="checkbox" id="stride" /></div>
<div class="settingRow"><p>Use ready, set, go</p> <input class="option check" type="checkbox" id="readysetgo" /></div>
<div class="settingRow"><p>Randomiser</p> <select class="option dropdown" id="randomiser"></select></div>
<div class="settingRow"><p>Kick Table</p> <select class="option dropdown" id="kicktable"></select></div>
<div class="settingRow"><p>Sidebar Stats</p>
<select class="option dropdown statoption" id="statoption1"></select>
<select class="option dropdown statoption" id="statoption2"></select>
<select class="option dropdown statoption" id="statoption3"></select>
</div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('gameDialog')">Save and Close</button>
<button title="Reset settings in this section" class="settingsReset" onclick="menu.resetSettings('game')">
<img src="./assets/icons/reset.svg" alt="reset" height="100%">
</button>
</div>
</dialog>
<dialog id="controlDialog" class="scrollSettings">
<div class="settingsTop"><h1>KEYBINDS</h1></div>
<div class="settingsBox">
<div class="settingRow"><p>Move Right</p> <button class="option keybind" id="rightKey"></button></div>
<div class="settingRow"><p>Move Left</p> <button class="option keybind" id="leftKey"></button></div>
<div class="settingRow"><p>Rotate Clockwise</p> <button class="option keybind" id="cwKey"></button></div>
<div class="settingRow"><p>Rotate Anticlockwise</p> <button class="option keybind" id="ccwKey"></button></div>
<div class="settingRow"><p>Rotate 180</p> <button class="option keybind" id="rotate180Key"></button></div>
<div class="settingRow"><p>Softdrop</p> <button class="option keybind" id="sdKey"></button></div>
<div class="settingRow"><p>Harddrop</p> <button class="option keybind" id="hdKey"></button></div>
<div class="settingRow"><p>Hold Piece</p> <button class="option keybind" id="holdKey"></button></div>
<div class="settingRow"><p>Reset Game</p> <button class="option keybind" id="resetKey"></button></div>
<div class="settingRow"><p>Open Edit Menu (Custom)</p> <button class="option keybind" id="editMenuKey"></button></div>
<div class="settingRow"><p>Undo</p> <button class="option keybind" id="undoKey"></button></div>
<div class="settingRow"><p>Redo</p> <button class="option keybind" id="redoKey"></button></div>
<div class="settingRow"><p>Pause and Play in Replays</p> <button class="option keybind" id="pauseReplayKey"></button></div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('controlDialog')">Save and Close</button>
<button title="Reset settings in this section" class="settingsReset" onclick="menu.resetSettings('control')">
<img src="./assets/icons/reset.svg" alt="reset" height="100%">
</button>
</div>
</dialog>
<dialog id="frontdrop" onkeydown="menu.setKeybind(event)" onkeyup="menu.checkKeybind(event)">
<div id="selectkeydiv" onclick="menu.setKeybind('None')">
<p id="selectkeybigtext">PRESS ANY KEY</p>
<p id="selectkeytext">Click to remove keybind</p>
</div>
</dialog>
<dialog id="gamemodeDialog" class="scrollSettings">
<div class="settingsTop"><h1>GAMEMODES</h1></div>
<div class="settingsBox">
<div id="startGamemodeList"></div>
</div>
</dialog>
<dialog id="handlingDialog" class="scrollSettings">
<div class="settingsTop"><h1>HANDLING</h1></div>
<div class="settingsBox">
<div class="settingRow"><p>DAS</p> <input class="option range" type="range" id="das" min="0" max="250" step="1" /></div>
<div class="settingRow"><p>ARR</p> <input class="option range" type="range" id="arr" min="0" max="50" step="2" /></div>
<div class="settingRow"><p>Softdrop ARR</p> <input class="option range" type="range" id="sdarr" min="0" max="200" step="5" /></div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('handlingDialog')">Save and Close</button>
<button title="Reset settings in this section" class="settingsReset" onclick="menu.resetSettings('handling')">
<img src="./assets/icons/reset.svg" alt="reset" height="100%">
</button>
</div>
</dialog>
<dialog id="volumeDialog" class="scrollSettings">
<div class="settingsTop"><h1>AUDIO</h1></div>
<div class="settingsBox">
<div class="settingRow"><p>Music Volume</p> <input class="option range" type="range" id="audioLevel" min="0" max="100" step="1" /></div>
<div class="settingRow"><p>SFX Volume</p> <input class="option range" type="range" id="sfxLevel" min="0" max="100" step="1" /></div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('volumeDialog')">Save and Close</button>
<button title="Reset settings in this section" class="settingsReset" onclick="menu.resetSettings('volume')">
<img src="./assets/icons/reset.svg" alt="reset" height="100%">
</button>
</div>
</dialog>
<dialog id="goalsDialog" class="scrollSettings">
<div class="settingsTop"><h1>GOALS</h1></div>
<div class="settingsBox">
<div class="settingRow"><p>Required Lines (sprint, lookahead)</p> <input class="option number" type="number" id="requiredLines"/></div>
<div class="settingRow"><p>Time Limit (ultra, survival)</p> <input class="option number" type="number" id="timeLimit" /></div>
<div class="settingRow"><p>Attack (attacker, backfire)</p> <input class="option number" type="number" id="requiredAttack" /></div>
<div class="settingRow"><p>Garbage Rows (digger)</p> <input class="option number" type="number" id="requiredGarbage" /></div>
<div class="settingRow"><p>APM (survival)</p> <input class="option number" type="number" id="survivalRate" /></div>
<div class="settingRow"><p>Multiplier (backfire)</p> <input class="option number" type="number" id="backfireMulti"/></div>
<div class="settingRow"><p>Look ahead pieces</p> <input class="option number" type="number" id="lookAheadPieces" /></div>
<div class="settingRow"><p>Race Target</p> <input class="option number" type="number" id="raceTarget" /></div>
<div class="settingRow"><p>Required Altitude (Climb)</p> <input class="option number" type="number" id="requiredAltitude" /></div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('goalsDialog')">Save and Close</button>
</div>
<input id="limiter" type="range" min="1" max="9999" style="display: none;"/>
<input id="limiter2" type="range" min="0.1" max="9999" style="display: none;"/>
</dialog>
<dialog id="competitiveDialog" class="scrollSettings">
<div class="settingsTop"><h2>PBs & COMPETITIVE MODE<h2></div>
<div class="settingsBox">
<div class="settingRow"><p>Competitive Mode</p> <input class="option check" type="checkbox" id="competitiveMode" /></div>
<h3>Profile stats</h3>
<button class="closeDialogButton" onclick="menu.exportLifetime()">Export all lifetime stats and PBs</button>
<h3>Personal Bests</h3>
<p style="margin-left: 1vw; ">Click to save PB</p>
<div id="PBlist"></div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('competitiveDialog')">Save and Close</button>
</div>
</dialog>
<dialog id="replaysDialog" class="scrollSettings">
<div class="settingsTop"><h2>REPLAYS<h2></div>
<div class="settingsBox" style="align-items: center;">
<p>Currently in beta, can change in the future</p>
<div id="uploadReplay" class="closeDialogButton" onclick="document.getElementById('replayUpload').click()">
<input type="file" id="replayUpload" onchange="menu.uploadReplay(this)" hidden accept=".trf">
<p>Open Replay</p>
</div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('replaysDialog')">Save and Close</button>
</div>
</dialog>
<!-- GAME MENUS -->
<dialog id="changeRangeValue" class="dialog" style="height: 25vh;">
<h1>Enter Value</h1>
<div class="settingsBox">
<div class="settingRow"> <p>Value</p><input class="option number" type="number" id="rangeValue"/></div>
<button class="closeDialogButton" onclick="modal.closeModal('changeRangeValue')">Save</button>
</div>
</dialog>
<dialog id="queueModify" class="scrollSettings">
<div class="settingsTop"><h1>Change Queues</h1></div>
<div class="settingsBox">
<div class="settingRow"><p>Next</p> <input class="option textInput next" type="text" id="nextQueue" /></div>
<div class="settingRow"><p>Hold</p> <input class="option textInput hold" type="text" id="holdQueue" /></div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('queueModify')">Save and Close</button>
</div>
</dialog>
<dialog id="editMenu" class="scrollSettings">
<div class="settingsTop"><h1>Edit Menu</h1></div>
<div class="settingsBox">
<h3 style="margin-left: 1vw;">Choose Piece</h3>
<div style="width: 100%; display: flex; justify-content: center;" id="editMenuPieces">
<button class="pieceselection" id="i_piece_colour" onclick="menu.changeEditPiece('i')"></button>
<button class="pieceselection" id="j_piece_colour" onclick="menu.changeEditPiece('j')"></button>
<button class="pieceselection" id="l_piece_colour" onclick="menu.changeEditPiece('l')"></button>
<button class="pieceselection" id="o_piece_colour" onclick="menu.changeEditPiece('o')"></button>
<button class="pieceselection" id="s_piece_colour" onclick="menu.changeEditPiece('s')"></button>
<button class="pieceselection" id="t_piece_colour" onclick="menu.changeEditPiece('t')"></button>
<button class="pieceselection" id="z_piece_colour" onclick="menu.changeEditPiece('z')"></button>
<button class="pieceselection" id="G_piece_colour" onclick="menu.changeEditPiece('G')"></button>
</div>
<div class="settingRow"><p>Row Fill Mode</p> <input class="option check custom" type="checkbox" id="rowfillmode" /></div>
<div class="settingRow"><p>Override Other Minos</p> <input class="option check custom" type="checkbox" id="override" /></div>
<div id="editbuttons">
<button id="addGarbage" class="settingPanelButton smallPanelButton" onclick="menu.addGarbageRow()" title="Add garbage row">
<img src="./assets/icons/addgarb.svg" style="transform: translateY(10%); height: 90%;">
</button>
<button id="removeLine" class="settingPanelButton smallPanelButton" onclick="menu.removeLastRow()" title="Remove bottom row">
<img src="./assets/icons/addgarb.svg" style="transform: translateY(-5%) rotate(180deg); height: 90%;">
</button>
<button id="clearGarbage" class="settingPanelButton smallPanelButton" onclick="menu.clearGarbage()" title="Clear all garbage">
<img src="./assets/icons/cleargarb.svg" style="height: 110%;">
</button>
<br>
<button id="copyBoardString" class="settingPanelButton smallPanelButton" onclick="menu.getBoardString()" title="Copy current board">
<img src="./assets/icons/download.svg" style="transform: translateY(10%); height: 90%;">
</button>
<button id="setBoardState" class="settingPanelButton smallPanelButton" onclick="menu.setBoard()" title="Set current board">
<img src="./assets/icons/upload.svg" style="transform: translateY(10%); height: 90%;">
</button>
</div>
</div>
<div class="settingsFooter">
<p>Press Esc to close without saving</p>
<button class="closeDialogButton" onclick="modal.closeModal('editMenu')">Save and Close</button>
</div>
</dialog>
<dialog id="gameStatsDialog" class="scrollSettings">
<div class="settingsTop"><h1>STATS</h1></div>
<div class="settingsBox">
<p style="text-align: center; opacity: 0.5;">(Some stats cannot be displayed)</p>
<div id="startStatsList"></div>
</div>
<div class="settingsFooter">
<button onclick="menu.exportStats()" class="closeDialogButton">Export Stats</button>
<button onclick="menu.closeStats()" class="closeDialogButton">Back</button>
</div>
</dialog>
<dialog id="gameEnd" class="dialog" onkeydown="menu.newGame(event.key, 'gameEnd')">
<h1 id="gameEndTitle">GAME ENDED</h1>
<p id="reason" style="font-size: 3.6vh;"></p>
<p id="result"></p>
<div class="settingsFooter">
<button class="closeDialogButton" onclick="menu.saveReplay()">Save Replay</button>
<button id="seeStats" class="closeDialogButton" onclick="modal.openModal('gameStatsDialog')">See Stats</button>
<button class="closeDialogButton" onclick="modal.closeModal('gameEnd')">Play Again</button>
</div>
</dialog>
</body>
</html>