mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Improve PlayButton's loading
This commit is contained in:
@ -10,6 +10,7 @@ using osu.Game.Audio;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Direct
|
namespace osu.Game.Overlays.Direct
|
||||||
@ -48,11 +49,17 @@ namespace osu.Game.Overlays.Direct
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (value)
|
if (value)
|
||||||
|
{
|
||||||
|
icon.FadeTo(0.5f, transition_duration, Easing.OutQuint);
|
||||||
loadingAnimation.Show();
|
loadingAnimation.Show();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
icon.FadeTo(1, transition_duration, Easing.OutQuint);
|
||||||
loadingAnimation.Hide();
|
loadingAnimation.Hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public PlayButton(BeatmapSetInfo setInfo = null)
|
public PlayButton(BeatmapSetInfo setInfo = null)
|
||||||
{
|
{
|
||||||
@ -67,7 +74,10 @@ namespace osu.Game.Overlays.Direct
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Icon = FontAwesome.fa_play,
|
Icon = FontAwesome.fa_play,
|
||||||
},
|
},
|
||||||
loadingAnimation = new LoadingAnimation(),
|
loadingAnimation = new LoadingAnimation
|
||||||
|
{
|
||||||
|
Size = new Vector2(15),
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Playing.ValueChanged += playingStateChanged;
|
Playing.ValueChanged += playingStateChanged;
|
||||||
|
Reference in New Issue
Block a user