mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +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 osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Edit.Checks.Components;
|
||||
using osu.Game.Rulesets.Osu.Edit.Checks;
|
||||
using osu.Game.Screens.Edit.Verify.Components;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
|
@ -4,8 +4,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Checks;
|
||||
using osu.Game.Screens.Edit.Verify.Components;
|
||||
using osu.Game.Rulesets.Edit.Checks;
|
||||
using osu.Game.Rulesets.Edit.Checks.Components;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
|
@ -4,7 +4,7 @@
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Beatmaps;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Verify.Components
|
||||
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
{
|
||||
public abstract class BeatmapCheck : Check<IBeatmap>
|
||||
{
|
@ -3,7 +3,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Verify.Components
|
||||
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
{
|
||||
public abstract class Check
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
// 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.
|
||||
|
||||
namespace osu.Game.Screens.Edit.Verify
|
||||
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
{
|
||||
public class CheckMetadata
|
||||
{
|
@ -7,7 +7,7 @@ using System.Linq;
|
||||
using osu.Game.Extensions;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Verify.Components
|
||||
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
{
|
||||
public class Issue
|
||||
{
|
||||
@ -39,7 +39,7 @@ namespace osu.Game.Screens.Edit.Verify.Components
|
||||
public Issue(IssueTemplate template, params object[] args)
|
||||
{
|
||||
Time = null;
|
||||
HitObjects = System.Array.Empty<HitObject>();
|
||||
HitObjects = Array.Empty<HitObject>();
|
||||
Template = template;
|
||||
Arguments = args;
|
||||
|
||||
@ -57,11 +57,20 @@ namespace osu.Game.Screens.Edit.Verify.Components
|
||||
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)
|
||||
: this(template, args)
|
||||
{
|
||||
Time = hitObjects.FirstOrDefault()?.StartTime;
|
||||
HitObjects = hitObjects.ToArray();
|
||||
var hitObjectList = hitObjects.ToList();
|
||||
|
||||
Time = hitObjectList.FirstOrDefault()?.StartTime;
|
||||
HitObjects = hitObjectList;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@ -71,13 +80,7 @@ namespace osu.Game.Screens.Edit.Verify.Components
|
||||
|
||||
public string GetEditorTimestamp()
|
||||
{
|
||||
// TODO: Editor timestamp formatting is handled in https://github.com/ppy/osu/pull/12030
|
||||
// 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();
|
||||
return Time == null ? string.Empty : Time.Value.ToEditorFormattedString();
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ using Humanizer;
|
||||
using osu.Framework.Graphics;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Verify.Components
|
||||
namespace osu.Game.Rulesets.Edit.Checks.Components
|
||||
{
|
||||
public class IssueTemplate
|
||||
{
|
@ -13,7 +13,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Screens.Edit.Verify.Components;
|
||||
using osu.Game.Rulesets.Edit.Checks.Components;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Verify
|
||||
|
Loading…
Reference in New Issue
Block a user