From 0c5a1410d3395cb712c3f1b05c2f42296c6d7bdb Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 8 Jul 2024 07:51:17 +0300 Subject: [PATCH] Add fade transition to content during open/close --- osu.Game/Overlays/Mods/ModCustomisationPanel.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Mods/ModCustomisationPanel.cs b/osu.Game/Overlays/Mods/ModCustomisationPanel.cs index f214bcb3a1..1553f37878 100644 --- a/osu.Game/Overlays/Mods/ModCustomisationPanel.cs +++ b/osu.Game/Overlays/Mods/ModCustomisationPanel.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; +using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects; @@ -18,6 +19,7 @@ using osu.Game.Graphics.Containers; using osu.Game.Input.Bindings; using osu.Game.Rulesets.Mods; using osuTK; +using osuTK.Graphics; namespace osu.Game.Overlays.Mods { @@ -75,6 +77,7 @@ namespace osu.Game.Overlays.Mods Offset = new Vector2(0f, 5f), Radius = 20f, Roundness = 5f, + Colour = Color4.Black.Opacity(0.25f), }, Expanded = { BindTarget = Expanded }, Children = new Drawable[] @@ -161,13 +164,13 @@ namespace osu.Game.Overlays.Mods content.AutoSizeDuration = 400; content.AutoSizeEasing = Easing.OutQuint; content.AutoSizeAxes = Axes.Y; - content.FadeEdgeEffectTo(0.25f, 120, Easing.OutQuint); + content.FadeIn(120, Easing.OutQuint); } else { content.AutoSizeAxes = Axes.None; content.ResizeHeightTo(header_height, 400, Easing.OutQuint); - content.FadeEdgeEffectTo(0f, 400, Easing.OutQuint); + content.FadeOut(400, Easing.OutSine); } }