2024-09-04 19:25:29 +08:00
|
|
|
using System;
|
|
|
|
using osu.Framework.Allocation;
|
2024-09-04 19:07:31 +08:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2024-09-04 19:25:29 +08:00
|
|
|
using osu.Game.Graphics;
|
2024-09-04 19:07:31 +08:00
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
|
|
|
{
|
2024-09-04 19:25:29 +08:00
|
|
|
public partial class HitMarkerClick : HitMarker
|
2024-09-04 19:07:31 +08:00
|
|
|
{
|
2024-09-04 19:25:29 +08:00
|
|
|
public HitMarkerClick()
|
2024-09-04 19:07:31 +08:00
|
|
|
{
|
|
|
|
const float length = 20;
|
2024-09-04 19:25:29 +08:00
|
|
|
const float border_size = 3;
|
2024-09-04 19:07:31 +08:00
|
|
|
|
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
{
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
2024-09-04 19:25:29 +08:00
|
|
|
Size = new Vector2(border_size, length + border_size),
|
2024-09-04 19:07:31 +08:00
|
|
|
Colour = Colour4.Black.Opacity(0.5F)
|
|
|
|
},
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
2024-09-04 19:25:29 +08:00
|
|
|
Size = new Vector2(border_size, length + border_size),
|
2024-09-04 19:07:31 +08:00
|
|
|
Rotation = 90,
|
|
|
|
Colour = Colour4.Black.Opacity(0.5F)
|
|
|
|
},
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Size = new Vector2(1, length),
|
|
|
|
},
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Size = new Vector2(1, length),
|
|
|
|
Rotation = 90,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2024-09-04 19:25:29 +08:00
|
|
|
|
|
|
|
[Resolved]
|
|
|
|
private OsuColour colours { get; set; } = null!;
|
|
|
|
|
|
|
|
protected override void OnApply(AnalysisFrameEntry entry)
|
|
|
|
{
|
|
|
|
base.OnApply(entry);
|
|
|
|
|
|
|
|
switch (entry.Action)
|
|
|
|
{
|
|
|
|
case OsuAction.LeftButton:
|
|
|
|
Colour = colours.BlueLight;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case OsuAction.RightButton:
|
|
|
|
Colour = colours.YellowLight;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
throw new ArgumentOutOfRangeException();
|
|
|
|
}
|
|
|
|
}
|
2024-09-04 19:07:31 +08:00
|
|
|
}
|
|
|
|
}
|