mirror of
https://github.com/ppy/osu.git
synced 2025-03-16 07:47:18 +08:00
One more rename pass
This commit is contained in:
parent
2d198e57e1
commit
4f719b9fec
osu.Game.Rulesets.Osu.Tests
osu.Game.Rulesets.Osu/UI
@ -124,8 +124,8 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
}
|
||||
|
||||
public bool HitMarkersVisible => ClickMarkers.Alpha > 0 && ClickMarkers.Entries.Any();
|
||||
public bool AimMarkersVisible => MovementMarkers.Alpha > 0 && MovementMarkers.Entries.Any();
|
||||
public bool AimLinesVisible => MovementPath.Alpha > 0 && MovementPath.Vertices.Count > 1;
|
||||
public bool AimMarkersVisible => FrameMarkers.Alpha > 0 && FrameMarkers.Entries.Any();
|
||||
public bool AimLinesVisible => CursorPath.Alpha > 0 && CursorPath.Vertices.Count > 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ using osu.Game.Rulesets.Objects.Pooling;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public abstract partial class HitMarker : PoolableDrawableWithLifetime<AnalysisFrameEntry>
|
||||
public abstract partial class AnalysisMarker : PoolableDrawableWithLifetime<AnalysisFrameEntry>
|
||||
{
|
||||
[Resolved]
|
||||
protected OsuColour Colours { get; private set; } = null!;
|
@ -7,7 +7,10 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class HitMarkerClick : HitMarker
|
||||
/// <summary>
|
||||
/// A marker which shows one click, with visuals focusing on the button which was clicked and the precise location of the click.
|
||||
/// </summary>
|
||||
public partial class ClickMarker : AnalysisMarker
|
||||
{
|
||||
private Container clickDisplay = null!;
|
||||
|
@ -6,15 +6,15 @@ using osu.Game.Rulesets.Objects.Pooling;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class ClickMarkerContainer : PooledDrawableWithLifetimeContainer<AnalysisFrameEntry, HitMarker>
|
||||
public partial class ClickMarkerContainer : PooledDrawableWithLifetimeContainer<AnalysisFrameEntry, AnalysisMarker>
|
||||
{
|
||||
private readonly DrawablePool<HitMarkerClick> clickMarkerPool;
|
||||
private readonly DrawablePool<ClickMarker> clickMarkerPool;
|
||||
|
||||
public ClickMarkerContainer()
|
||||
{
|
||||
AddInternal(clickMarkerPool = new DrawablePool<HitMarkerClick>(30));
|
||||
AddInternal(clickMarkerPool = new DrawablePool<ClickMarker>(30));
|
||||
}
|
||||
|
||||
protected override HitMarker GetDrawable(AnalysisFrameEntry entry) => clickMarkerPool.Get(d => d.Apply(entry));
|
||||
protected override AnalysisMarker GetDrawable(AnalysisFrameEntry entry) => clickMarkerPool.Get(d => d.Apply(entry));
|
||||
}
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class MovementPathContainer : Path
|
||||
public partial class CursorPathContainer : Path
|
||||
{
|
||||
private readonly LifetimeEntryManager lifetimeManager = new LifetimeEntryManager();
|
||||
private readonly SortedSet<AnalysisFrameEntry> aliveEntries = new SortedSet<AnalysisFrameEntry>(new AimLinePointComparator());
|
||||
|
||||
public MovementPathContainer()
|
||||
public CursorPathContainer()
|
||||
{
|
||||
lifetimeManager.EntryBecameAlive += entryBecameAlive;
|
||||
lifetimeManager.EntryBecameDead += entryBecameDead;
|
@ -7,7 +7,10 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class HitMarkerMovement : HitMarker
|
||||
/// <summary>
|
||||
/// A marker which shows one movement frame, include any buttons which are pressed.
|
||||
/// </summary>
|
||||
public partial class FrameMarker : AnalysisMarker
|
||||
{
|
||||
private Container clickDisplay = null!;
|
||||
private Circle mainCircle = null!;
|
@ -0,0 +1,20 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics.Pooling;
|
||||
using osu.Game.Rulesets.Objects.Pooling;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class FrameMarkerContainer : PooledDrawableWithLifetimeContainer<AnalysisFrameEntry, AnalysisMarker>
|
||||
{
|
||||
private readonly DrawablePool<FrameMarker> pool;
|
||||
|
||||
public FrameMarkerContainer()
|
||||
{
|
||||
AddInternal(pool = new DrawablePool<FrameMarker>(80));
|
||||
}
|
||||
|
||||
protected override AnalysisMarker GetDrawable(AnalysisFrameEntry entry) => pool.Get(d => d.Apply(entry));
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics.Pooling;
|
||||
using osu.Game.Rulesets.Objects.Pooling;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI.ReplayAnalysis
|
||||
{
|
||||
public partial class MovementMarkerContainer : PooledDrawableWithLifetimeContainer<AnalysisFrameEntry, HitMarker>
|
||||
{
|
||||
private readonly DrawablePool<HitMarkerMovement> pool;
|
||||
|
||||
public MovementMarkerContainer()
|
||||
{
|
||||
AddInternal(pool = new DrawablePool<HitMarkerMovement>(80));
|
||||
}
|
||||
|
||||
protected override HitMarker GetDrawable(AnalysisFrameEntry entry) => pool.Get(d => d.Apply(entry));
|
||||
}
|
||||
}
|
@ -19,8 +19,8 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
private BindableBool aimLinesEnabled { get; } = new BindableBool();
|
||||
|
||||
protected readonly ClickMarkerContainer ClickMarkers;
|
||||
protected readonly MovementMarkerContainer MovementMarkers;
|
||||
protected readonly MovementPathContainer MovementPath;
|
||||
protected readonly FrameMarkerContainer FrameMarkers;
|
||||
protected readonly CursorPathContainer CursorPath;
|
||||
|
||||
private readonly Replay replay;
|
||||
|
||||
@ -32,9 +32,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
MovementPath = new MovementPathContainer(),
|
||||
CursorPath = new CursorPathContainer(),
|
||||
ClickMarkers = new ClickMarkerContainer(),
|
||||
MovementMarkers = new MovementMarkerContainer(),
|
||||
FrameMarkers = new FrameMarkerContainer(),
|
||||
};
|
||||
}
|
||||
|
||||
@ -53,8 +53,8 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
base.LoadComplete();
|
||||
|
||||
hitMarkersEnabled.BindValueChanged(enabled => ClickMarkers.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||
aimMarkersEnabled.BindValueChanged(enabled => MovementMarkers.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||
aimLinesEnabled.BindValueChanged(enabled => MovementPath.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||
aimMarkersEnabled.BindValueChanged(enabled => FrameMarkers.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||
aimLinesEnabled.BindValueChanged(enabled => CursorPath.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||
}
|
||||
|
||||
private void loadReplay()
|
||||
@ -92,8 +92,8 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
if (!leftButton && !rightButton)
|
||||
lastAction = null;
|
||||
|
||||
MovementMarkers.Add(new AnalysisFrameEntry(osuFrame.Time, osuFrame.Position, lastAction));
|
||||
MovementPath.Add(new AnalysisFrameEntry(osuFrame.Time, osuFrame.Position));
|
||||
FrameMarkers.Add(new AnalysisFrameEntry(osuFrame.Time, osuFrame.Position, lastAction));
|
||||
CursorPath.Add(new AnalysisFrameEntry(osuFrame.Time, osuFrame.Position));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user