mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 04:12:56 +08:00
Second visual design pass
This commit is contained in:
parent
ee26ff2e29
commit
2d198e57e1
@ -8,40 +8,20 @@ using osu.Game.Rulesets.Objects.Pooling;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class HitMarker : PoolableDrawableWithLifetime<AnalysisFrameEntry>
|
||||
public abstract partial class HitMarker : PoolableDrawableWithLifetime<AnalysisFrameEntry>
|
||||
{
|
||||
public HitMarker()
|
||||
[Resolved]
|
||||
protected OsuColour Colours { get; private set; } = null!;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Origin = Anchor.Centre;
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
|
||||
protected override void OnApply(AnalysisFrameEntry entry)
|
||||
{
|
||||
Position = entry.Position;
|
||||
|
||||
using (BeginAbsoluteSequence(LifetimeStart))
|
||||
Show();
|
||||
|
||||
using (BeginAbsoluteSequence(LifetimeEnd - 200))
|
||||
this.FadeOut(200);
|
||||
|
||||
switch (entry.Action)
|
||||
{
|
||||
case OsuAction.LeftButton:
|
||||
Colour = colours.BlueLight;
|
||||
break;
|
||||
|
||||
case OsuAction.RightButton:
|
||||
Colour = colours.YellowLight;
|
||||
break;
|
||||
|
||||
default:
|
||||
Colour = colours.Pink2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
@ -8,17 +9,30 @@ namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class HitMarkerClick : HitMarker
|
||||
{
|
||||
public HitMarkerClick()
|
||||
private Container clickDisplay = null!;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Circle
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(0.125f),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Blending = BlendingParameters.Additive,
|
||||
Colour = Colours.Gray5,
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(15),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Colours.Gray5,
|
||||
Masking = true,
|
||||
BorderThickness = 2,
|
||||
BorderThickness = 2.2f,
|
||||
BorderColour = Color4.White,
|
||||
Child = new Box
|
||||
{
|
||||
@ -28,7 +42,44 @@ namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
Alpha = 0,
|
||||
},
|
||||
},
|
||||
clickDisplay = new Container
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.CentreRight,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Colours.Yellow,
|
||||
Scale = new Vector2(0.95f),
|
||||
Width = 0.5f,
|
||||
Masking = true,
|
||||
BorderThickness = 2,
|
||||
BorderColour = Color4.White,
|
||||
Child = new CircularContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Width = 2,
|
||||
Masking = true,
|
||||
BorderThickness = 2,
|
||||
BorderColour = Color4.White,
|
||||
Child = new Box
|
||||
{
|
||||
Colour = Color4.Black,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
AlwaysPresent = true,
|
||||
Alpha = 0,
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Size = new Vector2(16);
|
||||
}
|
||||
|
||||
protected override void OnApply(AnalysisFrameEntry entry)
|
||||
{
|
||||
base.OnApply(entry);
|
||||
|
||||
clickDisplay.Alpha = entry.Action != null ? 1 : 0;
|
||||
clickDisplay.Rotation = entry.Action == OsuAction.LeftButton ? 0 : 180;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +1,47 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class HitMarkerMovement : HitMarker
|
||||
{
|
||||
public HitMarkerMovement()
|
||||
private Container clickDisplay = null!;
|
||||
private Circle mainCircle = null!;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Circle
|
||||
mainCircle = new Circle
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Colour = OsuColour.Gray(0.2f),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Size = new Vector2(1.2f)
|
||||
Colour = Colours.Pink2,
|
||||
},
|
||||
new Circle
|
||||
clickDisplay = new Container
|
||||
{
|
||||
Colour = Colours.Yellow,
|
||||
Scale = new Vector2(0.8f),
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Origin = Anchor.CentreRight,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Width = 0.5f,
|
||||
Masking = true,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Circle
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Width = 2,
|
||||
Colour = Color4.White,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
@ -31,8 +49,12 @@ namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
protected override void OnApply(AnalysisFrameEntry entry)
|
||||
{
|
||||
base.OnApply(entry);
|
||||
Size = new Vector2(entry.Action != null ? 4 : 2.5f);
|
||||
|
||||
Size = new Vector2(entry.Action != null ? 4 : 3);
|
||||
mainCircle.Colour = entry.Action != null ? Colours.Gray4 : Colours.Pink2;
|
||||
|
||||
clickDisplay.Alpha = entry.Action != null ? 1 : 0;
|
||||
clickDisplay.Rotation = entry.Action == OsuAction.LeftButton ? 0 : 180;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics.Lines;
|
||||
using osu.Framework.Graphics.Performance;
|
||||
using osu.Game.Graphics;
|
||||
@ -28,6 +29,7 @@ namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Colour = colours.Pink2;
|
||||
BackgroundColour = colours.Pink2.Opacity(0);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
@ -32,8 +32,8 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
ClickMarkers = new ClickMarkerContainer(),
|
||||
MovementPath = new MovementPathContainer(),
|
||||
ClickMarkers = new ClickMarkerContainer(),
|
||||
MovementMarkers = new MovementMarkerContainer(),
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user