mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +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)
|
public void UpdateKeyCombination(KeyCombination newCombination)
|
||||||
{
|
{
|
||||||
if (KeyBinding.RulesetID != null && !RealmKeyBindingStore.CheckValidForGameplay(newCombination))
|
if (KeyBinding.RulesetID != null && !RealmKeyBindingStore.CheckValidForGameplay(newCombination))
|
||||||
@ -536,6 +531,13 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
updateKeyCombinationText();
|
updateKeyCombinationText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateKeyCombinationText()
|
||||||
|
{
|
||||||
|
Scheduler.AddOnce(updateText);
|
||||||
|
|
||||||
|
void updateText() => Text.Text = keyCombinationProvider.GetReadableString(KeyBinding.KeyCombination);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
|
Reference in New Issue
Block a user