From 3e62534eb7db3011ef540b6053811d48761dda21 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 10 Jun 2021 20:04:31 +0200 Subject: Cutefox Studios --- views/common/banner.gif | Bin 0 -> 96319 bytes views/loader.html | 11 ++--- views/script/core_viewer.js | 1 + views/script/loader_global.js | 96 ++++++++++++++++++++++++++++-------------- 4 files changed, 70 insertions(+), 38 deletions(-) create mode 100644 views/common/banner.gif (limited to 'views') diff --git a/views/common/banner.gif b/views/common/banner.gif new file mode 100644 index 0000000..e65d463 Binary files /dev/null and b/views/common/banner.gif differ diff --git a/views/loader.html b/views/loader.html index c1db38b..9e100bb 100644 --- a/views/loader.html +++ b/views/loader.html @@ -21,15 +21,12 @@ } -
- + +
+

diff --git a/views/script/core_viewer.js b/views/script/core_viewer.js index d22ada9..389bf41 100644 --- a/views/script/core_viewer.js +++ b/views/script/core_viewer.js @@ -1,6 +1,7 @@ const webview = document.getElementById('wb'); webview.addEventListener('dom-ready', () => { + document.getElementById('dummyloader').style.display = "none"; require('@electron/remote').getCurrentWindow().log(" * " + webview.getURL()); try { if (require('@electron/remote').getCurrentWindow().debug) { diff --git a/views/script/loader_global.js b/views/script/loader_global.js index 67016d9..6bde06c 100644 --- a/views/script/loader_global.js +++ b/views/script/loader_global.js @@ -2,8 +2,6 @@ window.addEventListener('load', () => { setTimeout(() => { if (native) { setTimeout(() => { - document.getElementById('vendor').style.transform = "scale(3)"; - new Audio("../sfx/intro.mp3").play(); setTimeout(() => { if (native) {global.$ = require('jquery');} else {var script = document.createElement('script');script.src = '../webinit/jquery.js';script.type = 'text/javascript';document.getElementsByTagName('head')[0].appendChild(script);} $("#progress").fadeOut(500); @@ -27,46 +25,75 @@ window.addEventListener('load', () => { } } setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }).catch((e) => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }); }).catch((e) => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }); }).catch((e) => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; setTimeout(() => { - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }); }, 2000) }, 3000) @@ -74,12 +101,19 @@ window.addEventListener('load', () => { } else { if (native) {global.$ = require('jquery');} else {var script = document.createElement('script');script.src = '../webinit/jquery.js';script.type = 'text/javascript';document.getElementsByTagName('head')[0].appendChild(script);} setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 8000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 5000) } }, 2000) }) -- cgit