mirror of
https://github.com/ppy/osu
synced 2024-12-27 01:12:45 +00:00
Hide sliderend & repeat circles in traceable mod
This commit is contained in:
parent
bab8c7480d
commit
0a23e994e2
@ -6,6 +6,7 @@ using System.Linq;
|
||||
using osu.Framework.Bindables;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
@ -49,9 +50,16 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
case DrawableHitCircle circle:
|
||||
// we only want to see the approach circle
|
||||
using (circle.BeginAbsoluteSequence(h.StartTime - h.TimePreempt, true))
|
||||
circle.CirclePiece.Hide();
|
||||
applyCirclePieceState(circle, circle.CirclePiece);
|
||||
break;
|
||||
|
||||
case DrawableSliderTail sliderTail:
|
||||
applyCirclePieceState(sliderTail);
|
||||
break;
|
||||
|
||||
case DrawableSliderRepeat sliderRepeat:
|
||||
// show only the repeat arrow
|
||||
applyCirclePieceState(sliderRepeat, sliderRepeat.CirclePiece);
|
||||
break;
|
||||
|
||||
case DrawableSlider slider:
|
||||
@ -61,6 +69,13 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
}
|
||||
}
|
||||
|
||||
private void applyCirclePieceState(DrawableOsuHitObject hitObject, IDrawable hitCircle = null)
|
||||
{
|
||||
var h = hitObject.HitObject;
|
||||
using (hitObject.BeginAbsoluteSequence(h.StartTime - h.TimePreempt, true))
|
||||
(hitCircle ?? hitObject).Hide();
|
||||
}
|
||||
|
||||
private void applySliderState(DrawableSlider slider)
|
||||
{
|
||||
((PlaySliderBody)slider.Body.Drawable).AccentColour = slider.AccentColour.Value.Opacity(0);
|
||||
|
Loading…
Reference in New Issue
Block a user