From 108ebc861e8ba35b362f5a827f611e2b6af8a25c Mon Sep 17 00:00:00 2001 From: cake Date: Sat, 25 Apr 2026 21:07:04 -0400 Subject: [PATCH] clean up noise and branch pr --- scripts/database/settings/SettingsProfile.cs | 32 ++- scripts/scenes/LegacyRunner.cs | 281 ++++++++++++++----- scripts/scenes/PauseHud.cs | 34 +-- 3 files changed, 253 insertions(+), 94 deletions(-) diff --git a/scripts/database/settings/SettingsProfile.cs b/scripts/database/settings/SettingsProfile.cs index a1bd69e..02074cc 100644 --- a/scripts/database/settings/SettingsProfile.cs +++ b/scripts/database/settings/SettingsProfile.cs @@ -173,6 +173,18 @@ public partial class SettingsProfile [Order] public SettingsItem TrailDetail { get; private set; } + /// + /// Updates trail particles only when the cursor moves + /// + [Order] + public SettingsItem SmartCursorTrail { get; private set; } + + /// + /// Shrinks trail particles based on how long its been present + /// + [Order] + public SettingsItem TrailModeScale { get; private set; } + /// /// Uses the skin's cursor instead of the native cursor /// @@ -684,16 +696,32 @@ public SettingsProfile() { Id = "TrailDetail", Title = "Trail Detail", - Description = "(Not implemented) Adjusts the detail for the trail", + Description = "Adjusts the detail for the trail", Section = SettingsSection.Visual, Slider = new() { Step = 0.05f, MinValue = 0, - MaxValue = 5 + MaxValue = 100 } }; + SmartCursorTrail = new(false) + { + Id = "SmartCursorTrail", + Title = "Smart Cursor Trail", + Description = "Updates trail particles only when the cursor moves", + Section = SettingsSection.Visual + }; + + TrailModeScale = new(false) + { + Id = "TrailModeScale", + Title = "Cursor Trail Scale", + Description = "Scales trail particles over lifetime using cursor scale", + Section = SettingsSection.Visual + }; + UseCursorInMenus = new(false) { Id = "UseCursorInMenus", diff --git a/scripts/scenes/LegacyRunner.cs b/scripts/scenes/LegacyRunner.cs index cfc28c1..f276cd6 100644 --- a/scripts/scenes/LegacyRunner.cs +++ b/scripts/scenes/LegacyRunner.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Security.Cryptography; @@ -89,6 +89,9 @@ public partial class LegacyRunner : BaseScene private double lastFrame = Time.GetTicksUsec(); // delta arg unreliable.. //private double lastSecond = Time.GetTicksUsec(); // better framerate calculation private List> lastCursorPositions = []; // trail + private Vector2 previousSmartTrailPosition; + private float previousSmartTrailRotation; + private bool smartTrailInitialized = false; //private int frameCount = 0; private float skipLabelAlpha = 0; private float targetSkipLabelAlpha = 0; @@ -510,6 +513,7 @@ public override void _Ready() videoQuad = holder.GetNode("Video"); notesMultimesh = holder.GetNode("Notes"); cursorTrailMultimesh = holder.GetNode("CursorTrail"); + resetCursorTrailState(); //jesus = GetNode("Jesus"); healthPanel = holder.GetNode("Health"); @@ -584,7 +588,7 @@ public override void _Ready() menuButtonsHolder.GetNode