1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-16 04:32:57 +08:00

Only show replay cursor when replay input is present.

This commit is contained in:
Dean Herbert 2017-03-06 15:24:00 +09:00
parent 2de25c23b4
commit 610de4a34c
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
8 changed files with 22 additions and 9 deletions

View File

@ -9,6 +9,7 @@ using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.UI; using osu.Game.Modes.UI;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Screens.Play;
namespace osu.Game.Modes.Catch namespace osu.Game.Modes.Catch
{ {
@ -16,7 +17,7 @@ namespace osu.Game.Modes.Catch
{ {
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(Beatmap beatmap, InputManager input = null) => new CatchHitRenderer public override HitRenderer CreateHitRendererWith(Beatmap beatmap, PlayerInputManager input = null) => new CatchHitRenderer
{ {
Beatmap = beatmap, Beatmap = beatmap,
InputManager = input, InputManager = input,

View File

@ -9,6 +9,7 @@ using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.UI; using osu.Game.Modes.UI;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Screens.Play;
namespace osu.Game.Modes.Mania namespace osu.Game.Modes.Mania
{ {
@ -16,7 +17,7 @@ namespace osu.Game.Modes.Mania
{ {
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(Beatmap beatmap, InputManager input = null) => new ManiaHitRenderer public override HitRenderer CreateHitRendererWith(Beatmap beatmap, PlayerInputManager input = null) => new ManiaHitRenderer
{ {
Beatmap = beatmap, Beatmap = beatmap,
InputManager = input, InputManager = input,

View File

@ -10,6 +10,7 @@ using osu.Game.Modes.Objects;
using osu.Game.Modes.Osu.Objects; using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.UI; using osu.Game.Modes.UI;
using osu.Game.Screens.Play;
namespace osu.Game.Modes.Osu namespace osu.Game.Modes.Osu
{ {
@ -17,7 +18,7 @@ namespace osu.Game.Modes.Osu
{ {
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(Beatmap beatmap, InputManager input = null) => new OsuHitRenderer public override HitRenderer CreateHitRendererWith(Beatmap beatmap, PlayerInputManager input = null) => new OsuHitRenderer
{ {
Beatmap = beatmap, Beatmap = beatmap,
InputManager = input InputManager = input

View File

@ -11,7 +11,7 @@ using osu.Game.Modes.Osu.Objects.Drawables.Connections;
using osu.Game.Modes.UI; using osu.Game.Modes.UI;
using System.Linq; using System.Linq;
using osu.Game.Graphics.Cursor; using osu.Game.Graphics.Cursor;
using osu.Game.Modes.Objects; using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.UI namespace osu.Game.Modes.Osu.UI
{ {
@ -56,10 +56,16 @@ namespace osu.Game.Modes.Osu.UI
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Depth = -1, Depth = -1,
}, },
new OsuCursorContainer()
}); });
} }
protected override void LoadComplete()
{
base.LoadComplete();
if (InputManager.ReplayInputHandler != null)
Add(new OsuCursorContainer { Colour = Color4.LightYellow });
}
public override void Add(DrawableHitObject<OsuHitObject> h) public override void Add(DrawableHitObject<OsuHitObject> h)
{ {
h.Depth = (float)h.HitObject.StartTime; h.Depth = (float)h.HitObject.StartTime;

View File

@ -9,6 +9,7 @@ using osu.Game.Modes.Osu.UI;
using osu.Game.Modes.Taiko.UI; using osu.Game.Modes.Taiko.UI;
using osu.Game.Modes.UI; using osu.Game.Modes.UI;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Screens.Play;
namespace osu.Game.Modes.Taiko namespace osu.Game.Modes.Taiko
{ {
@ -16,7 +17,7 @@ namespace osu.Game.Modes.Taiko
{ {
public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay(); public override ScoreOverlay CreateScoreOverlay() => new OsuScoreOverlay();
public override HitRenderer CreateHitRendererWith(Beatmap beatmap, InputManager input = null) => new TaikoHitRenderer public override HitRenderer CreateHitRendererWith(Beatmap beatmap, PlayerInputManager input = null) => new TaikoHitRenderer
{ {
Beatmap = beatmap, Beatmap = beatmap,
InputManager = input, InputManager = input,

View File

@ -9,6 +9,7 @@ using System.Collections.Concurrent;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Screens.Play;
namespace osu.Game.Modes namespace osu.Game.Modes
{ {
@ -31,7 +32,7 @@ namespace osu.Game.Modes
public abstract ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0); public abstract ScoreProcessor CreateScoreProcessor(int hitObjectCount = 0);
public abstract HitRenderer CreateHitRendererWith(Beatmap beatmap, InputManager input = null); public abstract HitRenderer CreateHitRendererWith(Beatmap beatmap, PlayerInputManager input = null);
public abstract HitObjectParser CreateHitObjectParser(); public abstract HitObjectParser CreateHitObjectParser();

View File

@ -11,6 +11,7 @@ using osu.Framework.Input;
using osu.Game.Modes.Objects; using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Screens.Play;
namespace osu.Game.Modes.UI namespace osu.Game.Modes.UI
{ {
@ -35,7 +36,7 @@ namespace osu.Game.Modes.UI
{ {
private List<TObject> objects; private List<TObject> objects;
public InputManager InputManager; public PlayerInputManager InputManager;
protected Playfield<TObject> Playfield; protected Playfield<TObject> Playfield;

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Game.Modes.Objects; using osu.Game.Modes.Objects;
using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Objects.Drawables;
using osu.Game.Screens.Play;
namespace osu.Game.Modes.UI namespace osu.Game.Modes.UI
{ {
@ -55,7 +56,7 @@ namespace osu.Game.Modes.UI
/// <summary> /// <summary>
/// An optional inputManager to provide interactivity etc. /// An optional inputManager to provide interactivity etc.
/// </summary> /// </summary>
public InputManager InputManager; public PlayerInputManager InputManager;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()