diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-27 19:18:42 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-27 19:18:42 +0200 |
commit | 73864d898c3fb3cb0d9a8e3060ae01e780774d48 (patch) | |
tree | d3b07d36074f8a58e10856e6cf5975edcd55c7a7 /views/script | |
parent | a3104b69bc8153eed684f54e4249c84a6559182f (diff) | |
download | kartik-client-73864d898c3fb3cb0d9a8e3060ae01e780774d48.tar.gz kartik-client-73864d898c3fb3cb0d9a8e3060ae01e780774d48.tar.bz2 kartik-client-73864d898c3fb3cb0d9a8e3060ae01e780774d48.zip |
Sleek new loading screen
Diffstat (limited to 'views/script')
-rw-r--r-- | views/script/game_music.js | 6 | ||||
-rw-r--r-- | views/script/loader_global.js | 3 | ||||
-rw-r--r-- | views/script/menu_login.js | 4 | ||||
-rw-r--r-- | views/script/menu_music.js | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/views/script/game_music.js b/views/script/game_music.js index 2aa7e94..7d43a25 100644 --- a/views/script/game_music.js +++ b/views/script/game_music.js @@ -1,8 +1,8 @@ startHooks.push(() => { info("MusicMgr", "Playing game" + i + ".mp3"); - require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file); + if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file); }) if (location.search === "?online") { - require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file); -}
\ No newline at end of file + if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file); +} diff --git a/views/script/loader_global.js b/views/script/loader_global.js index 81b4dd7..2333db4 100644 --- a/views/script/loader_global.js +++ b/views/script/loader_global.js @@ -2,6 +2,9 @@ const $ = require('jquery'); require('electron').ipcRenderer.on('ready', (e, a) => {
document.getElementById("banner-decoration").style.display = "";
+ document.getElementById("banner-outer").style.backgroundImage = "";
+ document.getElementById("banner-outer").style.backgroundColor = "#042349";
+ document.getElementById("banner-contrast").style.display = "none";
setTimeout(() => {
if (native) {
diff --git a/views/script/menu_login.js b/views/script/menu_login.js index f2d7c7e..57b4bbc 100644 --- a/views/script/menu_login.js +++ b/views/script/menu_login.js @@ -88,7 +88,6 @@ window.addEventListener('load', () => { onlineMode = false;
postOnlineMode();
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
})
}).catch((e) => {
require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.error[0], message: lang.polymer.error[1]});
@@ -96,7 +95,6 @@ window.addEventListener('load', () => { onlineMode = false;
postOnlineMode();
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
})
}).catch((e) => {
require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.error[0], message: lang.polymer.error[1]});
@@ -104,7 +102,6 @@ window.addEventListener('load', () => { onlineMode = false;
postOnlineMode();
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
})
})
@@ -237,6 +234,5 @@ function postOnlineMode() { console.error(e);
onlineMode = false;
document.getElementById("loginIntro").innerText = lang.polymer.error[2];
- document.getElementById("online").parentElement.parentElement.outerHTML = "";
}
}
\ No newline at end of file diff --git a/views/script/menu_music.js b/views/script/menu_music.js index f1d23f9..d650478 100644 --- a/views/script/menu_music.js +++ b/views/script/menu_music.js @@ -1,5 +1,5 @@ if (location.search !== "?noreset") { console.log("back"); - require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file); + if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file); } info("MenuWindow", "Menu opened"); |