1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-16 09:22:54 +08:00

Merge pull request #12735 from smoogipoo/fix-toolbar-queuing-sounds

Fix toolbar queuing ruleset sounds
This commit is contained in:
Dean Herbert 2021-05-10 23:05:49 +09:00 committed by GitHub
commit 1492ad750a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,13 +69,15 @@ namespace osu.Game.Overlays.Toolbar
base.LoadComplete();
Current.BindDisabledChanged(disabled => this.FadeColour(disabled ? Color4.Gray : Color4.White, 300), true);
Current.BindValueChanged(_ => moveLineToCurrent(), true);
Current.BindValueChanged(_ => moveLineToCurrent());
// Scheduled to allow the button flow layout to be computed before the line position is updated
ScheduleAfterChildren(moveLineToCurrent);
}
private bool hasInitialPosition;
// Scheduled to allow the flow layout to be computed before the line position is updated
private void moveLineToCurrent() => ScheduleAfterChildren(() =>
private void moveLineToCurrent()
{
if (SelectedTab != null)
{
@ -86,7 +88,7 @@ namespace osu.Game.Overlays.Toolbar
hasInitialPosition = true;
}
});
}
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;