From d4caa42d3f2fbc850248e0bf06f438f77b73e5ba Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 6 Jun 2021 01:32:31 +0200 Subject: Commit --- icons/stats.svg | 1 + lang/en.json | 14 ++++++++++ package.json | 2 +- views/menu.html | 1 + views/script/menu_global.js | 9 ++++++ views/stats.html | 68 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 icons/stats.svg create mode 100644 views/stats.html diff --git a/icons/stats.svg b/icons/stats.svg new file mode 100644 index 0000000..4cda1b2 --- /dev/null +++ b/icons/stats.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/lang/en.json b/lang/en.json index 37feb2d..3326c55 100644 --- a/lang/en.json +++ b/lang/en.json @@ -187,5 +187,19 @@ "aborted": "The other player ended the game", "car0": "Your car", "car1": "Their car" + }, + "stats": { + "menu": "Statistics", + "title": "Game Statistics", + "items": { + "times.single": "Time spent in singleplayer", + "times.local": "Time spent in local mode", + "times.online": "Time spent playing online", + "results.wins": "Number of games that you won", + "results.loses": "Number of games that you lost", + "ingame.walls": "Number of collisions you had", + "ingame.laps": "Number of laps you made", + "ingame.turns": "Number of rotations you made" + } } } diff --git a/package.json b/package.json index 69a8864..06d6104 100644 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"name":"kartik","version":"97ebd65","channel":"git","description":"A multiplatform 2D karting game","main":"app.js","dependencies":{"@electron/remote":"^1.0.4","discord-rpc":"^3.2.0","electron":"^12.0.1","ini":"^1.3.8","jquery":"^3.6.0","os-locale":"^5.0.0","uuid":"^8.3.2","yaml":"^1.10.2"},"scripts":{"test":"node_modules\\electron\\dist\\electron.exe app.js"},"author":"Minteck Projects","license":"UNLICENSED","serial":"XXX99999999999"} \ No newline at end of file +{"name":"kartik","version":"021d278","channel":"git","description":"A multiplatform 2D karting game","main":"app.js","dependencies":{"@electron/remote":"^1.0.4","discord-rpc":"^3.2.0","electron":"^12.0.1","ini":"^1.3.8","jquery":"^3.6.0","os-locale":"^5.0.0","uuid":"^8.3.2","yaml":"^1.10.2"},"scripts":{"test":"node_modules\\electron\\dist\\electron.exe app.js"},"author":"Minteck Projects","license":"UNLICENSED","serial":"XXX99999999999"} \ No newline at end of file diff --git a/views/menu.html b/views/menu.html index 7f7256a..0c6849f 100644 --- a/views/menu.html +++ b/views/menu.html @@ -49,6 +49,7 @@ } document.getElementById('prefill').outerHTML = ""; +
  • diff --git a/views/script/menu_global.js b/views/script/menu_global.js index 43937f4..3713591 100644 --- a/views/script/menu_global.js +++ b/views/script/menu_global.js @@ -91,6 +91,15 @@ function selectOption() { location.href = "settings.html"; }, 1000) break; + case 'stats': + keysEnabled = false; + require('electron').ipcRenderer.send('prefademusic', ""); + $("#box").fadeOut(500); + setTimeout(() => { + info("MenuWindow", "Switching control to OptnWindow"); + location.href = "stats.html"; + }, 1000) + break; case 'credits': keysEnabled = false; require('electron').ipcRenderer.send('prefademusic', ""); diff --git a/views/stats.html b/views/stats.html new file mode 100644 index 0000000..4d6d01c --- /dev/null +++ b/views/stats.html @@ -0,0 +1,68 @@ + + + + + + + + Kartik + + + + + + + + + + + + + + + + -- cgit