From 6e4eed657ccf520e110f64c9aa4772a647a68b34 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 7 Oct 2024 14:32:31 +0900 Subject: [PATCH] Fix weird mouse position handling and don't return `true` to event --- osu.Game/Screens/Play/HUD/ArgonSongProgressBar.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/osu.Game/Screens/Play/HUD/ArgonSongProgressBar.cs b/osu.Game/Screens/Play/HUD/ArgonSongProgressBar.cs index 7d9cd25c4e..ace21fa955 100644 --- a/osu.Game/Screens/Play/HUD/ArgonSongProgressBar.cs +++ b/osu.Game/Screens/Play/HUD/ArgonSongProgressBar.cs @@ -35,13 +35,13 @@ namespace osu.Game.Screens.Play.HUD private double trackTime => (EndTime - StartTime) * Progress; - private float relativePositionX; + private float lastMouseX; public LocalisableString TooltipText { get { - double progress = Math.Clamp(relativePositionX, 0, DrawWidth) / DrawWidth; + double progress = Math.Clamp(lastMouseX, 0, DrawWidth) / DrawWidth; TimeSpan currentSpan = TimeSpan.FromMilliseconds(Math.Round((EndTime - StartTime) * progress)); @@ -107,10 +107,8 @@ namespace osu.Game.Screens.Play.HUD { base.OnMouseMove(e); - var cursorPosition = e.ScreenSpaceMousePosition; - relativePositionX = ToLocalSpace(cursorPosition).X; - - return true; + lastMouseX = e.MousePosition.X; + return false; } protected override bool OnHover(HoverEvent e)