Add text hints to accuracy heat map to better describe travel direction

This commit is contained in:
Dean Herbert 2023-05-17 15:22:48 +09:00
parent 9fe787acd8
commit 3054348c73
1 changed files with 59 additions and 21 deletions

View File

@ -11,6 +11,7 @@
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Utils; using osu.Framework.Utils;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Scoring; using osu.Game.Scoring;
using osuTK; using osuTK;
@ -63,6 +64,11 @@ private void load()
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit, FillMode = FillMode.Fit,
Children = new Drawable[] Children = new Drawable[]
{
new Container
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{ {
new CircularContainer new CircularContainer
{ {
@ -79,19 +85,16 @@ private void load()
Colour = Color4Extensions.FromHex("#202624") Colour = Color4Extensions.FromHex("#202624")
} }
}, },
new Container
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding(1), Padding = new MarginPadding(1),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Rotation = rotation,
Child = new Container Child = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Masking = true,
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
@ -100,9 +103,9 @@ private void load()
Origin = Anchor.Centre, Origin = Anchor.Centre,
EdgeSmoothness = new Vector2(1), EdgeSmoothness = new Vector2(1),
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Height = 2, // We're rotating along a diagonal - we don't really care how big this is. Width = line_thickness / 2, // adjust for edgesmoothness
Width = line_thickness / 2, Height = MathF.Sqrt(2),
Rotation = -rotation, Rotation = -rotation * 2,
Alpha = 0.3f, Alpha = 0.3f,
}, },
new Box new Box
@ -111,9 +114,44 @@ private void load()
Origin = Anchor.Centre, Origin = Anchor.Centre,
EdgeSmoothness = new Vector2(1), EdgeSmoothness = new Vector2(1),
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Height = 2, // We're rotating along a diagonal - we don't really care how big this is.
Width = line_thickness / 2, // adjust for edgesmoothness Width = line_thickness / 2, // adjust for edgesmoothness
Rotation = rotation Height = MathF.Sqrt(2),
},
new OsuSpriteText
{
Text = "Next",
Anchor = Anchor.Centre,
Origin = Anchor.BottomRight,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both,
Y = -inner_portion / 2,
},
new OsuSpriteText
{
Text = "object",
Anchor = Anchor.Centre,
Origin = Anchor.BottomLeft,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both,
Y = -inner_portion / 2,
},
new OsuSpriteText
{
Text = "Last",
Anchor = Anchor.Centre,
Origin = Anchor.TopRight,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both,
Y = inner_portion / 2,
},
new OsuSpriteText
{
Text = "object",
Anchor = Anchor.Centre,
Origin = Anchor.TopLeft,
Padding = new MarginPadding(3),
RelativePositionAxes = Axes.Both,
Y = inner_portion / 2,
}, },
} }
}, },