From d29054433b5e0a6a49282e1fb6e28ea38e47a866 Mon Sep 17 00:00:00 2001 From: RadiantHexagon Date: Sun, 13 Sep 2026 15:05:41 -0500 Subject: [PATCH] Add "Switch Wave Trail Color" --- assets/scripts/core/game-scene.js | 28 ++++++++++++++++++++++------ assets/scripts/core/player.js | 15 ++++++++++++--- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/assets/scripts/core/game-scene.js b/assets/scripts/core/game-scene.js index 06a32a59..bddd82f3 100644 --- a/assets/scripts/core/game-scene.js +++ b/assets/scripts/core/game-scene.js @@ -5041,7 +5041,7 @@ _buildSettingsPopup() { this._settingsPopup = null; }); - const pages = ["Gameplay", "Visual", "Advanced", "Performance"]; + const pages = ["Gameplay", "Visual", "Visual", "Advanced", "Performance"]; let currentPage = 0; const pageTitle = this.add.bitmapText(0, -(panelHeight / 2) + 45, "bigFont", pages[currentPage], 40).setOrigin(0.5); innerContainer.add(pageTitle); @@ -5116,7 +5116,8 @@ _buildSettingsPopup() { "Use Proxy (for schools)": "Enables a proxy for a better chance to see online levels when blocked.", "Cull Distance": "Changes how many objects are shown. [DOES NOT SAVE!!]", "Default Mini Icon": "Sets player icon in min mode to default.", - "Safe Mode": "Enables when Noclip or Speedhack are on. Disables level Completion when enabled." + "Safe Mode": "Enables when Noclip or Speedhack are on. Disables level Completion when enabled.", + "Switch Wave Trail Color": "Toggles between main and secondary color for the trail in wave mode. " }; const createInfoButton = (container, x, y, infoTextOrKey, scale) => { @@ -5463,6 +5464,20 @@ _buildSettingsPopup() { true, "Default Mini Icon" ); + + }; + + const buildVisual2Page = (container) => { + + createToggle(container, column1X, startY, "Switch Wave Trail Color", + () => window.toggleWaveTrailCol, + (v) => window.toggleWaveTrailCol = v, + null, + 17, + true, + "Switch Wave Trail Color" + ); + }; const buildAdvancedPage = (container) => { @@ -5486,8 +5501,8 @@ _buildSettingsPopup() { */ }; - const buildPerformancePage = (container) => { - createNumberInput(container, column1X, startY, "Cull Distance", + const buildPerformancePage = (container) => { + createNumberInput(container, column1X, startY, "Cull Distance", () => (typeof window.cullDistance !== 'undefined' ? window.cullDistance : 3), (v) => window.cullDistance = v, 0, @@ -5506,8 +5521,9 @@ _buildSettingsPopup() { if (idx === 0) buildGameplayPage(pageContainer); else if (idx === 1) buildVisualPage(pageContainer); - else if (idx === 2) buildAdvancedPage(pageContainer); - else if (idx === 3) buildPerformancePage(pageContainer); + else if (idx === 2) buildVisual2Page(pageContainer); + else if (idx === 3) buildAdvancedPage(pageContainer); + else if (idx === 4) buildPerformancePage(pageContainer); }; buildPage(0); diff --git a/assets/scripts/core/player.js b/assets/scripts/core/player.js index 0ee23f03..5d4e9522 100644 --- a/assets/scripts/core/player.js +++ b/assets/scripts/core/player.js @@ -157,8 +157,15 @@ class StreakManager { } class WaveTrail { constructor(scene, color, glowColor) { - this._color = color; - this._glowColor = glowColor; + + if (!window.toggleWaveTrailCol) { + this._color = color; + this._glowColor = glowColor; + } else { + this._color = secondaryColor; + this._glowColor = secondaryColor; + } + this._pts = []; this._active = false; this._posInit = false; @@ -174,14 +181,16 @@ class WaveTrail { this._glowGfx = scene.add.graphics(); this._glowGfx.setBlendMode(Phaser.BlendModes.ADD); } + addToContainer(container, depth) { container.add(this._glowGfx); this._glowGfx.setDepth(depth - 1); container.add(this._gfx); this._gfx.setDepth(depth); } + setPosition(x, y) { this._pos.x = x; this._pos.y = y; this._posInit = true; } - setColor(color, glowColor = color) { this._color = color; this._glowColor = glowColor; } + setColor(color, glowColor) { color = this._color; glowColor = this._glowColor; } setMiniScale(isMini) { const scale = isMini ? 0.6 : 1; this._halfW = this._baseHalfW * scale;