diff --git a/README.md b/README.md index 71a33dc..911ac00 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,6 @@ The config can be found in `web/config.js`. This holds a plethora of configurati | TIP_CHANGE_INTERVAL | The interval (ms) at which Tips change automatically | `TIP_CHANGE_INTERVAL = 12000` | | BACKGROUND_CHANGE_INTERVAL | The interval (ms) at which backgrounds automatically switch | `BACKGROUND_CHANGE_INTERVAL = 15000` | | BACKGROUND_IMAGES | An array of file names for images present in the `web/backgrounds` folder. | `BACKGROUND_IMAGES = ["1.jpg","2.jpg"]` -| ENABLE_CURSOR | Whether to enable the cursor while in the loading screen | `ENABLE_CURSOR = false` | ENABLE_GFM_MARKDOWN | Whether to enable the `Github Flavored Markdown` spec for the parser | `ENABLE_GFM_MARKDOWN = true` | ENABLE_SERVER_LOGO | Whether to enable the server logo | `ENABLE_SERVER_LOGO = true` | SERVER_LOGO_POSITION | Where to place logo if enabled | `SERVER_LOGO_POSITION = 'top-left'` diff --git a/fxmanifest.lua b/fxmanifest.lua index e25307b..cb853d1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -10,6 +10,8 @@ loadscreen 'web/index.html' client_script 'client.lua' +loadscreen_cursor 'yes' + loadscreen_manual_shutdown 'yes' files { diff --git a/web/assets/images/cursor.svg b/web/assets/images/cursor.svg deleted file mode 100644 index 18096cc..0000000 --- a/web/assets/images/cursor.svg +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/web/assets/script.js b/web/assets/script.js index 08a292c..0364179 100644 --- a/web/assets/script.js +++ b/web/assets/script.js @@ -2,7 +2,6 @@ import { TIP_CHANGE_INTERVAL, BACKGROUND_CHANGE_INTERVAL, BACKGROUND_IMAGES, - ENABLE_CURSOR, SERVER_LOGO_POSITION, ENABLE_SERVER_LOGO, MUSIC_ENABLED, SERVER_LOGO_FILE_NAME @@ -167,21 +166,4 @@ const leftArrow = document.getElementById('tip-left-arrow') const rightArrow = document.getElementById('tip-right-arrow') leftArrow.addEventListener('click', showPrevTip) -rightArrow.addEventListener('click', showNextTip) - -if (ENABLE_CURSOR) { - const cursor = document.getElementById('cursor') - - cursor.style.visibility = 'visible' - - window.addEventListener("mousemove", e => { - // These offsets are related to the size of the SVG - // for now this is fine - const x = e.pageX - cursor.offsetWidth + 20 - const y = e.pageY - 2 - - cursor.style.left = `${x}px` - cursor.style.top = `${y}px` - }) - -} \ No newline at end of file +rightArrow.addEventListener('click', showNextTip) \ No newline at end of file diff --git a/web/assets/styles.css b/web/assets/styles.css index 598afa4..ff68626 100644 --- a/web/assets/styles.css +++ b/web/assets/styles.css @@ -48,19 +48,6 @@ a[onclick] { --main-bg: rgba(0, 0, 0, 0.85) } -#cursor { - width: 30px; - height: 30px; - pointer-events: none; - top: 0; - left: 0; - visibility: hidden; - background-image: url("images/cursor.svg"); - background-position: center; - position: absolute; - z-index: 999999; -} - #bgImg { background-image: url(../backgrounds/1.jpg); transition: background 1.5s linear; diff --git a/web/config.js b/web/config.js index d77f25a..038e02f 100644 --- a/web/config.js +++ b/web/config.js @@ -53,9 +53,6 @@ export const MUSIC_FILE_NAME = 'music.mp3' export const MUSIC_START_VOLUME = 0.3 -// Whether we should enable the cursor for the loadscreen -export const ENABLE_CURSOR = true - // Enable github flavored markdown export const ENABLE_GFM_MARKDOWN = false diff --git a/web/index.html b/web/index.html index 5352b60..7b78e93 100644 --- a/web/index.html +++ b/web/index.html @@ -17,7 +17,6 @@