osu icon indicating copy to clipboard operation
osu copied to clipboard

Disable setting keys in the same ruleset with the same bindings

Open nanashi-1 opened this issue 3 years ago • 4 comments

  • Addresses #20107

Can no longer set keys in the same ruleset with the same bindings but it may need feedback like a toast or an animation.

nanashi-1 avatar Sep 04 '22 08:09 nanashi-1

Keep in mind that this isn't enforcing anything. If the key bindings are already set they are still going to be usable.

I believe you'll also need some extra logic around this point:

https://github.com/ppy/osu/blob/31a447fda0532fcf15f8c8251ca890c533386492/osu.Game/Rulesets/UI/RulesetInputManager.cs#L205

peppy avatar Sep 04 '22 13:09 peppy

Keep in mind that this isn't enforcing anything. If the key bindings are already set they are still going to be usable.

I believe you'll also need some extra logic around this point:

https://github.com/ppy/osu/blob/31a447fda0532fcf15f8c8251ca890c533386492/osu.Game/Rulesets/UI/RulesetInputManager.cs#L205

I don't quite understand what this does.

nanashi-1 avatar Sep 05 '22 00:09 nanashi-1

Let me explain another way: Your change is only blocking UI level changes. If the user already has bindings set in the realm database, or manually sets it externally, the changes you've made are not going to have any effect.

peppy avatar Sep 05 '22 10:09 peppy

No test coverage was added to check the recent fix to the issue I mentioned. Should be added to make review of this PR easier.

peppy avatar Sep 08 '22 06:09 peppy