Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix difficulty slider focus handling in song select #31749

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ryawaa
Copy link
Contributor

@ryawaa ryawaa commented Jan 31, 2025

i feel like theres a better way to do this, if you think so, please let me know.

fixes #31559

@ryawaa ryawaa changed the title fix: difficulty slider focus handling in song select Fix difficulty slider focus handling in song select Jan 31, 2025
Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There definitely is a much better way to do this, and a one-liner sketch of such a way follows:

diff --git a/osu.Game/Graphics/UserInterface/RangeSlider.cs b/osu.Game/Graphics/UserInterface/RangeSlider.cs
index 422c2ca4a3..5638c217c9 100644
--- a/osu.Game/Graphics/UserInterface/RangeSlider.cs
+++ b/osu.Game/Graphics/UserInterface/RangeSlider.cs
@@ -164,6 +164,8 @@ protected partial class BoundSlider : RoundedSliderBar<double>
         {
             public new Nub Nub => base.Nub;
 
+            public override bool AcceptsFocus => false;
+
             public string? DefaultString;
             public LocalisableString? DefaultTooltip;
             public string? TooltipSuffix;

You could say that this override should be constrained only to the specific usage site of the range slider in song select; figuring out how to achieve that is left as an exercise to the reader.

peppy added a commit to peppy/osu that referenced this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Song Select search box looses focus after interacting with difficulty range slider
2 participants