1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 14:12:54 +08:00

Remove transitions for now

If you want to add transitions, the containers should be IStateful so we can discern their state for later use (because I switched to Show/Hide I can use IsPresent for now). We should probably look at moving the VisibilityState portion of OverlayContainer into a new StatefulContainer class or similar, so it can be used in situations like this.
This commit is contained in:
Dean Herbert 2017-03-23 16:28:40 +09:00
parent 88d878e1d5
commit 022fd625df
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Transforms;
using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests;
using osu.Game.Screens.Select.Leaderboards;
@ -14,8 +13,6 @@ namespace osu.Game.Screens.Select
{
public class BeatmapDetailArea : Container
{
private const float transition_duration = 500;
private readonly Container content;
protected override Container<Drawable> Content => content;
@ -42,13 +39,12 @@ namespace osu.Game.Screens.Select
switch (tab)
{
case BeatmapDetailTab.Details:
Details.FadeIn(transition_duration, EasingTypes.OutQuint);
Leaderboard.FadeOut(transition_duration, EasingTypes.OutQuint);
Details.Show();
Leaderboard.Hide();
break;
default:
Details.FadeOut(transition_duration, EasingTypes.OutQuint);
Leaderboard.FadeIn(transition_duration, EasingTypes.OutQuint);
Details.Hide();
Leaderboard.Show();
break;
}
},