1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-06 03:03:05 +08:00

Improve repeat point visual.

This commit is contained in:
Dean Herbert 2016-12-07 17:21:59 +09:00
parent b5e3dcbd1c
commit 83e7e67cc5

View File

@ -9,6 +9,7 @@ using System.Threading.Tasks;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
{ {
@ -16,37 +17,36 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
{ {
private readonly Slider slider; private readonly Slider slider;
private readonly bool isEnd; private readonly bool isEnd;
private TextAwesome icon;
public SliderBouncer(Slider slider, bool isEnd) public SliderBouncer(Slider slider, bool isEnd)
{ {
this.slider = slider; this.slider = slider;
this.isEnd = isEnd; this.isEnd = isEnd;
Masking = true;
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
BlendingMode = BlendingMode.Additive; BlendingMode = BlendingMode.Additive;
Origin = Anchor.Centre; Origin = Anchor.Centre;
Children = new Drawable[] Children = new Drawable[]
{ {
new Container icon = new TextAwesome
{ {
Masking = true, Icon = FontAwesome.fa_eercast,
AutoSizeAxes = Axes.Both, Anchor = Anchor.Centre,
Origin = Anchor.Centre,
CornerRadius = 16, TextSize = 24,
Children = new[] }
{
new Box
{
Width = 32,
Height = 32,
},
}
}
}; };
} }
protected override void LoadComplete()
{
base.LoadComplete();
icon.RotateTo(360, 1000);
icon.Loop();
}
public void UpdateProgress(double progress, int repeat) public void UpdateProgress(double progress, int repeat)
{ {
if (Time.Current < slider.StartTime) if (Time.Current < slider.StartTime)