mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 18:47:27 +08:00
Move components to more appropriate spot
This commit is contained in:
parent
43174b708c
commit
d1007ff26a
@ -5,8 +5,8 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
|
using osu.Game.Rulesets.Edit.Checks.Components;
|
||||||
using osu.Game.Rulesets.Osu.Edit.Checks;
|
using osu.Game.Rulesets.Osu.Edit.Checks;
|
||||||
using osu.Game.Screens.Edit.Verify.Components;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Edit
|
namespace osu.Game.Rulesets.Osu.Edit
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Checks;
|
using osu.Game.Rulesets.Edit.Checks;
|
||||||
using osu.Game.Screens.Edit.Verify.Components;
|
using osu.Game.Rulesets.Edit.Checks.Components;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Edit
|
namespace osu.Game.Rulesets.Edit
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Verify.Components
|
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||||
{
|
{
|
||||||
public abstract class BeatmapCheck : Check<IBeatmap>
|
public abstract class BeatmapCheck : Check<IBeatmap>
|
||||||
{
|
{
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Verify.Components
|
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||||
{
|
{
|
||||||
public abstract class Check
|
public abstract class Check
|
||||||
{
|
{
|
@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Verify
|
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||||
{
|
{
|
||||||
public class CheckMetadata
|
public class CheckMetadata
|
||||||
{
|
{
|
@ -7,7 +7,7 @@ using System.Linq;
|
|||||||
using osu.Game.Extensions;
|
using osu.Game.Extensions;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Verify.Components
|
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||||
{
|
{
|
||||||
public class Issue
|
public class Issue
|
||||||
{
|
{
|
||||||
@ -39,7 +39,7 @@ namespace osu.Game.Screens.Edit.Verify.Components
|
|||||||
public Issue(IssueTemplate template, params object[] args)
|
public Issue(IssueTemplate template, params object[] args)
|
||||||
{
|
{
|
||||||
Time = null;
|
Time = null;
|
||||||
HitObjects = System.Array.Empty<HitObject>();
|
HitObjects = Array.Empty<HitObject>();
|
||||||
Template = template;
|
Template = template;
|
||||||
Arguments = args;
|
Arguments = args;
|
||||||
|
|
||||||
@ -57,11 +57,20 @@ namespace osu.Game.Screens.Edit.Verify.Components
|
|||||||
Time = time;
|
Time = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Issue(HitObject hitObject, IssueTemplate template, params object[] args)
|
||||||
|
: this(template, args)
|
||||||
|
{
|
||||||
|
Time = hitObject.StartTime;
|
||||||
|
HitObjects = new[] { hitObject };
|
||||||
|
}
|
||||||
|
|
||||||
public Issue(IEnumerable<HitObject> hitObjects, IssueTemplate template, params object[] args)
|
public Issue(IEnumerable<HitObject> hitObjects, IssueTemplate template, params object[] args)
|
||||||
: this(template, args)
|
: this(template, args)
|
||||||
{
|
{
|
||||||
Time = hitObjects.FirstOrDefault()?.StartTime;
|
var hitObjectList = hitObjects.ToList();
|
||||||
HitObjects = hitObjects.ToArray();
|
|
||||||
|
Time = hitObjectList.FirstOrDefault()?.StartTime;
|
||||||
|
HitObjects = hitObjectList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
@ -71,13 +80,7 @@ namespace osu.Game.Screens.Edit.Verify.Components
|
|||||||
|
|
||||||
public string GetEditorTimestamp()
|
public string GetEditorTimestamp()
|
||||||
{
|
{
|
||||||
// TODO: Editor timestamp formatting is handled in https://github.com/ppy/osu/pull/12030
|
return Time == null ? string.Empty : Time.Value.ToEditorFormattedString();
|
||||||
// We may be able to use that here too (if we decouple it from the HitObjectComposer class).
|
|
||||||
|
|
||||||
if (Time == null)
|
|
||||||
return string.Empty;
|
|
||||||
|
|
||||||
return Time.Value.ToEditorFormattedString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,7 +5,7 @@ using Humanizer;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Verify.Components
|
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||||
{
|
{
|
||||||
public class IssueTemplate
|
public class IssueTemplate
|
||||||
{
|
{
|
@ -13,7 +13,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Screens.Edit.Verify.Components;
|
using osu.Game.Rulesets.Edit.Checks.Components;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit.Verify
|
namespace osu.Game.Screens.Edit.Verify
|
||||||
|
Loading…
Reference in New Issue
Block a user