From a9510227185abd689ac562aeb8d19e0531e4feb7 Mon Sep 17 00:00:00 2001 From: LEGALISE_PIRACY Date: Tue, 30 Jan 2024 02:50:49 +0000 Subject: [PATCH] Upload files to "hill/scripts/project" --- hill/scripts/project/scriptsInEvents.js | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 hill/scripts/project/scriptsInEvents.js diff --git a/hill/scripts/project/scriptsInEvents.js b/hill/scripts/project/scriptsInEvents.js new file mode 100644 index 00000000..183c54b2 --- /dev/null +++ b/hill/scripts/project/scriptsInEvents.js @@ -0,0 +1,50 @@ + + + +const scriptsInEvents = { + + async Sound_Event21_Act1(runtime, localVars) + { + window.open(localVars.url); + }, + + async Menu_Event64_Act1(runtime, localVars) + { + try { + let canvas = document.querySelector('canvas'); + if (!canvas) { + return; + } + + canvas.style.position = 'relative'; + canvas.style.boxShadow = '0px 0px 2px 5px #373737'; + + let bg = document.querySelector('.game-bg'); + if (!bg) { + bg = document.createElement('div'); + bg.classList.add('game-bg'); + canvas.parentNode.insertBefore(bg, canvas); + } + + bg.style.cssText = ` + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 0; + position: fixed; + background-image: url(${localVars.image}); + background-position: center; + background-repeat: no-repeat; + background-size: cover; + filter: blur(15px); + `; + } catch (err) { + console.error(err); + } + } + +}; + +self.C3.ScriptsInEvents = scriptsInEvents; +