Remove countdown toggle transition for now

Tricky to get right and the design isn't final as is anyway, so leaving
*something* functioning as a best-effort for now.
This commit is contained in:
Bartłomiej Dach 2021-08-31 22:37:40 +02:00
parent 464ab8af4e
commit 04773b51bb
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -16,8 +16,6 @@ namespace osu.Game.Screens.Edit.Setup
{
internal class DesignSection : SetupSection
{
private const float fade_duration = 250;
protected LabelledSwitchButton EnableCountdown;
protected LabelledEnumDropdown<CountdownType> CountdownSpeed;
protected LabelledNumberBox CountdownOffset;
@ -90,7 +88,6 @@ namespace osu.Game.Screens.Edit.Setup
base.LoadComplete();
EnableCountdown.Current.BindValueChanged(_ => updateCountdownSettingsVisibility(), true);
countdownSettings.FinishTransforms(true);
EnableCountdown.Current.BindValueChanged(_ => updateBeatmap());
CountdownSpeed.Current.BindValueChanged(_ => updateBeatmap());
@ -101,16 +98,7 @@ namespace osu.Game.Screens.Edit.Setup
letterboxDuringBreaks.Current.BindValueChanged(_ => updateBeatmap());
}
private void updateCountdownSettingsVisibility()
{
bool countdownEnabled = EnableCountdown.Current.Value;
foreach (var child in countdownSettings)
{
child.ScaleTo(new Vector2(1, countdownEnabled ? 1 : 0), fade_duration, Easing.OutQuint)
.FadeTo(countdownEnabled ? 1 : 0, fade_duration, Easing.OutQuint);
}
}
private void updateCountdownSettingsVisibility() => countdownSettings.FadeTo(EnableCountdown.Current.Value ? 1 : 0);
private void onOffsetCommitted()
{