From 8886d5111aa4ae75f54f46c93f09fa7548979969 Mon Sep 17 00:00:00 2001 From: Minteck <46352972+Minteck@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:37:48 +0200 Subject: Fixes --- views/common/load-new.ttf | Bin 0 -> 50172 bytes views/load.html | 44 +++++-------- views/loader.svg | 128 ++++++++++++++++++++++++++++++++++++++ views/menu.css | 10 ++- views/script/core_notification.js | 13 ++++ views/script/loader_global.js | 2 +- 6 files changed, 164 insertions(+), 33 deletions(-) create mode 100644 views/common/load-new.ttf create mode 100644 views/loader.svg create mode 100644 views/script/core_notification.js (limited to 'views') diff --git a/views/common/load-new.ttf b/views/common/load-new.ttf new file mode 100644 index 0000000..d2a94dc Binary files /dev/null and b/views/common/load-new.ttf differ diff --git a/views/load.html b/views/load.html index c6e45bf..473c1ac 100644 --- a/views/load.html +++ b/views/load.html @@ -21,6 +21,11 @@ font-weight: normal; } + @font-face { + font-family: "HomepageBaukasten-Bold"; + src: url("./common/load-new.ttf"); + } + - -
- - - - + var ipcRenderer = require('electron').ipcRenderer; + ipcRenderer.on('progress', function (event, progress) { + document.getElementById("bar").style.width = progress + "%"; + }); + +
+
+
diff --git a/views/loader.svg b/views/loader.svg new file mode 100644 index 0000000..77a496e --- /dev/null +++ b/views/loader.svg @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Kartik +%version% + + + + + + + diff --git a/views/menu.css b/views/menu.css index d6fc60e..2c2b94f 100644 --- a/views/menu.css +++ b/views/menu.css @@ -37,8 +37,12 @@ } .services:not(.services-settings) li.selected .item { - border-color: #00ff99; + background-color: rgba(0, 255, 153, 0.25); + backdrop-filter: blur(10px); + border-radius: 10px; animation-direction: alternate-reverse; + position: relative; + z-index: 9999999999; animation-duration: 3s; animation-name: border-overlay; animation-fill-mode: both; @@ -59,10 +63,10 @@ @keyframes border-overlay { 0% { - border-color: #00ff66; + background-color: rgba(0, 255, 102, 0.25); } 100% { - border-color: #00ccff; + background-color: rgba(0, 204, 255, 0.25); } } diff --git a/views/script/core_notification.js b/views/script/core_notification.js new file mode 100644 index 0000000..118d19d --- /dev/null +++ b/views/script/core_notification.js @@ -0,0 +1,13 @@ +var ipcRenderer = require('electron').ipcRenderer; +ipcRenderer.on('notification', function (event, data) { + document.getElementById("notification-title").innerText = data.title; + document.getElementById("notification-message").innerText = data.message; + document.getElementById("notification").style.right = "20px"; + document.getElementById("notification").style.opacity = "1"; + new Audio("./sfx/notification.mp3").play(); + + setTimeout(() => { + document.getElementById("notification").style.right = "-300px"; + document.getElementById("notification").style.opacity = "0"; + }, 5000) +}); \ No newline at end of file diff --git a/views/script/loader_global.js b/views/script/loader_global.js index 6bde06c..7c89d0f 100644 --- a/views/script/loader_global.js +++ b/views/script/loader_global.js @@ -19,7 +19,7 @@ window.addEventListener('load', () => { document.getElementById('updates').style.backgroundColor = "lightgreen"; document.getElementById('updates').innerText = lang.updates.ok; } else { - document.getElementById('warning').style.opacity = "1"; + require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.updates.warn[0], message: lang.updates.warn[1]}); document.getElementById('updates').style.backgroundColor = "lightyellow"; document.getElementById('updates').innerText = lang.updates.available; } -- cgit From b9e7ec33542bb8041857eb997d17b29ffeae40c8 Mon Sep 17 00:00:00 2001 From: Minteck <46352972+Minteck@users.noreply.github.com> Date: Fri, 9 Jul 2021 00:51:46 +0200 Subject: Add cooldown to rotations This helps fix some bugs such as an out of border usebug and a bug that enables players to count a lap as they die. This also makes the game more realistic by removing the possibility of doing moves that are not supposed to be possible in real life. --- views/script/game_debug.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/script/game_debug.js b/views/script/game_debug.js index edcdc26..1fb2639 100644 --- a/views/script/game_debug.js +++ b/views/script/game_debug.js @@ -194,6 +194,7 @@ setInterval(() => { changedDataLeft += "\n0$: Laps: " + document.getElementById('laps-car0').innerText + "/5"; changedDataLeft += "\n0$: Model: " + selectedModel0; + changedDataLeft += "\n0$: Collision: " + (car0collisionon ? "%true%" : "%false%"); changedDataLeft += "\n\n1$: XY: " + document.getElementById('car1').style.left.split("px")[0] + " / " + document.getElementById('car1').style.top.split("px")[0] @@ -212,6 +213,7 @@ setInterval(() => { changedDataLeft += "\n1$: Laps: " + document.getElementById('laps-car1').innerText + "/5"; changedDataLeft += "\n1$: Model: " + selectedModel1; + changedDataLeft += "\n1$: Collision: " + (car1collisionon ? "%true%" : "%false%"); changedDataLeft += "\n" + oil(0) + oil(1) + oil(2) + oil(3) + oil(4); changedDataLeft += "\n\nMusic: " + i; changedDataLeft += "\nCircuit: " + rand; @@ -252,7 +254,7 @@ setInterval(() => { } catch (e) { console.error(e); } -},1000); +},100); window.addEventListener("load", () => { require('@electron/remote').app.getGPUInfo('complete').then((data) => { -- cgit From c3b756f987ffd8ca981c1e6f23435c74aad36aea Mon Sep 17 00:00:00 2001 From: Minteck <46352972+Minteck@users.noreply.github.com> Date: Sat, 10 Jul 2021 16:03:26 +0200 Subject: Fixes --- views/loader.svg | 4 +- views/loader/back.png | Bin 0 -> 67643 bytes views/loader/logo.png | Bin 0 -> 165369 bytes views/menu.css | 70 +++++++++++++++++ views/menu.html | 34 ++++++-- views/script/core_compatlayer.js | 4 +- views/script/global_compatlayer.js | 4 +- views/script/global_levelsapi.js | 47 +++++++++++ views/script/loader_global.js | 7 +- views/script/menu_global.js | 2 + views/script/menu_login.js | 155 +++++++++++++++++++++++++++++++++++++ views/stats.html | 2 +- 12 files changed, 315 insertions(+), 14 deletions(-) create mode 100644 views/loader/back.png create mode 100644 views/loader/logo.png create mode 100644 views/script/global_levelsapi.js create mode 100644 views/script/menu_login.js (limited to 'views') diff --git a/views/loader.svg b/views/loader.svg index 77a496e..042b338 100644 --- a/views/loader.svg +++ b/views/loader.svg @@ -115,7 +115,7 @@ - + Kartik %version% @@ -123,6 +123,6 @@ - + diff --git a/views/loader/back.png b/views/loader/back.png new file mode 100644 index 0000000..4d268cc Binary files /dev/null and b/views/loader/back.png differ diff --git a/views/loader/logo.png b/views/loader/logo.png new file mode 100644 index 0000000..09112ca Binary files /dev/null and b/views/loader/logo.png differ diff --git a/views/menu.css b/views/menu.css index 2c2b94f..ca90e93 100644 --- a/views/menu.css +++ b/views/menu.css @@ -151,4 +151,74 @@ .item-icon { filter: invert(1); vertical-align: middle; +} + +div.services.home { + top: 115px; + padding: 0; + display: flex; + align-items: center; + bottom: 70px; + z-index: 9999; +} + +div.services.home > div.items > ul > li > span.item { + width: 216px; + border-radius: 0; +} + +div.services.home > div.items > ul > li > span.item > a { + margin-left: 10px; + margin-right: 10px; + width: 100%; + display: inline-block; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +div.services.home > div.items { + width: 256px; +} + +div.services.home > div.items > ul { + padding: 0; +} + +div.services.home > div.items > ul > li { + list-style: none; +} + +div.services.home > div.items > ul > li > span.item { + margin-left: 10vw; + transition: none; +} + +img[alt="full-logo"] { + margin-left: calc(10vw + 37.5px) !important; + margin-top: 55px !important; + height: 56px !important; + z-index: 99999; + position: fixed; +} + +span#copyright { + bottom: 46px; + left: 10vw; + z-index: 9999; + color: rgba(255, 255, 255, 0.75); + right: unset; + width: 227px; + text-align: center; +} + +#services-background { + position: fixed; + top: 0; + bottom: 0; + width: 227px; + z-index: 9; + backdrop-filter: blur(10px); + background: rgba(0, 0, 0, 0.5); + left: 10vw; } \ No newline at end of file diff --git a/views/menu.html b/views/menu.html index d00107c..26e79db 100644 --- a/views/menu.html +++ b/views/menu.html @@ -11,6 +11,7 @@ Kartik +