mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Debounce and schedule updates to key combinations
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user