1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 06:42:54 +08:00

Move private methods down

This commit is contained in:
Dean Herbert 2021-05-18 14:11:26 +09:00
parent 3a5b21c0f5
commit 0100b88a86

View File

@ -129,9 +129,9 @@ namespace osu.Game.Overlays.KeyBinding
{ {
base.LoadComplete(); base.LoadComplete();
IsDefault.BindValueChanged(resetButtons => IsDefault.BindValueChanged(isDefault =>
{ {
if (resetButtons.NewValue && !computeIsDefaultValue()) if (isDefault.NewValue && !computeIsDefaultValue())
{ {
RestoreDefaults(); RestoreDefaults();
finalise(); finalise();
@ -139,10 +139,6 @@ namespace osu.Game.Overlays.KeyBinding
}); });
} }
private void updateIsDefaultValue() => IsDefault.Value = computeIsDefaultValue();
private bool computeIsDefaultValue() => bindings.Select(b => b.KeyCombination).SequenceEqual(Defaults);
public void RestoreDefaults() public void RestoreDefaults()
{ {
int i = 0; int i = 0;
@ -331,6 +327,10 @@ namespace osu.Game.Overlays.KeyBinding
cancelAndClearButtons.BypassAutoSizeAxes |= Axes.Y; cancelAndClearButtons.BypassAutoSizeAxes |= Axes.Y;
} }
private void updateIsDefaultValue() => IsDefault.Value = computeIsDefaultValue();
private bool computeIsDefaultValue() => bindings.Select(b => b.KeyCombination).SequenceEqual(Defaults);
protected override void OnFocus(FocusEvent e) protected override void OnFocus(FocusEvent e)
{ {
AutoSizeDuration = 500; AutoSizeDuration = 500;