Fix touch device mod getting selected as a free mod in playlists #26492
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cause of this issue laid in the way
FooterButtonFreeMods
determines available mods, which is the following code:osu/osu.Game/Screens/OnlinePlay/FooterButtonFreeMods.cs
Lines 142 to 144 in 8e5b2e7
Touch device has
ValidForSelection = true
, therefore being included in the above list and becoming selected when clicking the footer button.At first, I considered removing system mods from being added to
ModSelectOverlay.AvailableMods
, but I'm not confident enough that this won't indirectly result in random issues when interacting with the mod select overlay (causing the touch device mod to be unintentionally deselected).Instead, I settled down on setting
ValidForSelection = false
and using that as an indicator for bothFooterButtonFreeMods
andSelectAllModsButton
(select all button in the overlay) to ignore such mods.@bdach requesting your review as you're more knowledgable in this system. also worthy of note I cannot test on a touch device at the moment.