1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Improve PlayButton's loading

This commit is contained in:
Dean Herbert 2018-06-22 14:27:36 +09:00
parent 3824354cb8
commit 51600dd0ae

View File

@ -10,6 +10,7 @@ using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Overlays.Direct
@ -48,11 +49,17 @@ namespace osu.Game.Overlays.Direct
set
{
if (value)
{
icon.FadeTo(0.5f, transition_duration, Easing.OutQuint);
loadingAnimation.Show();
}
else
{
icon.FadeTo(1, transition_duration, Easing.OutQuint);
loadingAnimation.Hide();
}
}
}
public PlayButton(BeatmapSetInfo setInfo = null)
{
@ -67,7 +74,10 @@ namespace osu.Game.Overlays.Direct
RelativeSizeAxes = Axes.Both,
Icon = FontAwesome.fa_play,
},
loadingAnimation = new LoadingAnimation(),
loadingAnimation = new LoadingAnimation
{
Size = new Vector2(15),
},
});
Playing.ValueChanged += playingStateChanged;