1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Merge pull request #28787 from peppy/adjust-editor-fades

Adjust editor transparent tweens to be less "flashy"
This commit is contained in:
Bartłomiej Dach 2024-07-09 10:08:14 +02:00 committed by GitHub
commit 877ade3053
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 7 deletions

View File

@ -269,9 +269,16 @@ namespace osu.Game.Rulesets.Edit
composerFocusMode.BindValueChanged(_ =>
{
float targetAlpha = composerFocusMode.Value ? 0.5f : 1;
leftToolboxBackground.FadeTo(targetAlpha, 400, Easing.OutQuint);
rightToolboxBackground.FadeTo(targetAlpha, 400, Easing.OutQuint);
if (!composerFocusMode.Value)
{
leftToolboxBackground.FadeIn(750, Easing.OutQuint);
rightToolboxBackground.FadeIn(750, Easing.OutQuint);
}
else
{
leftToolboxBackground.Delay(600).FadeTo(0.5f, 4000, Easing.OutQuint);
rightToolboxBackground.Delay(600).FadeTo(0.5f, 4000, Easing.OutQuint);
}
}, true);
}

View File

@ -82,10 +82,13 @@ namespace osu.Game.Screens.Edit
saveInProgress.BindValueChanged(_ => TestGameplayButton.Enabled.Value = !saveInProgress.Value, true);
composerFocusMode.BindValueChanged(_ =>
{
float targetAlpha = composerFocusMode.Value ? 0.5f : 1;
foreach (var c in this.ChildrenOfType<BottomBarContainer>())
c.Background.FadeTo(targetAlpha, 400, Easing.OutQuint);
{
if (!composerFocusMode.Value)
c.Background.FadeIn(750, Easing.OutQuint);
else
c.Background.Delay(600).FadeTo(0.5f, 4000, Easing.OutQuint);
}
}, true);
}
}

View File

@ -132,7 +132,13 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{
base.LoadComplete();
composerFocusMode.BindValueChanged(_ => timelineBackground.FadeTo(composerFocusMode.Value ? 0.5f : 1, 400, Easing.OutQuint), true);
composerFocusMode.BindValueChanged(_ =>
{
if (!composerFocusMode.Value)
timelineBackground.FadeIn(750, Easing.OutQuint);
else
timelineBackground.Delay(600).FadeTo(0.5f, 4000, Easing.OutQuint);
}, true);
}
}
}