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
1 changed files with 6 additions and 4 deletions

View File

@ -69,13 +69,15 @@ protected override void LoadComplete()
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 @@ private void moveLineToCurrent() => ScheduleAfterChildren(() =>
hasInitialPosition = true;
}
});
}
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;