mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:02:54 +08:00
Ensure settings rows cannot set an invalid value in the first place
This commit is contained in:
parent
a00f226ab3
commit
62b6cadb64
@ -16,6 +16,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
@ -445,6 +446,9 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
|
||||
public void UpdateKeyCombination(KeyCombination newCombination)
|
||||
{
|
||||
if ((KeyBinding as DatabasedKeyBinding)?.RulesetID != null && !KeyBindingStore.CheckValidForGameplay(newCombination))
|
||||
return;
|
||||
|
||||
KeyBinding.KeyCombination = newCombination;
|
||||
Text.Text = KeyBinding.KeyCombination.ReadableString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user