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:
commit
877ade3053
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user