mirror of
https://github.com/ppy/osu
synced 2025-01-24 14:53:18 +00:00
Debounce and schedule updates to key combinations
This commit is contained in:
parent
b4225804ed
commit
49c26a465c
@ -522,11 +522,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
}
|
||||
}
|
||||
|
||||
private void updateKeyCombinationText()
|
||||
{
|
||||
Text.Text = keyCombinationProvider.GetReadableString(KeyBinding.KeyCombination);
|
||||
}
|
||||
|
||||
public void UpdateKeyCombination(KeyCombination newCombination)
|
||||
{
|
||||
if (KeyBinding.RulesetID != null && !RealmKeyBindingStore.CheckValidForGameplay(newCombination))
|
||||
@ -536,6 +531,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
updateKeyCombinationText();
|
||||
}
|
||||
|
||||
private void updateKeyCombinationText()
|
||||
{
|
||||
Scheduler.AddOnce(updateText);
|
||||
|
||||
void updateText() => Text.Text = keyCombinationProvider.GetReadableString(KeyBinding.KeyCombination);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
Loading…
Reference in New Issue
Block a user