diff --git a/osu.Game.Tests/Visual/Editing/TestSceneComposeSelectBox.cs b/osu.Game.Tests/Visual/Editing/TestSceneComposeSelectBox.cs
index e383aa8008..d5cfeb1878 100644
--- a/osu.Game.Tests/Visual/Editing/TestSceneComposeSelectBox.cs
+++ b/osu.Game.Tests/Visual/Editing/TestSceneComposeSelectBox.cs
@@ -167,5 +167,21 @@ namespace osu.Game.Tests.Visual.Editing
AddStep("move mouse away", () => InputManager.MoveMouseTo(selectionBox, new Vector2(20)));
AddUntilStep("rotation handle hidden", () => rotationHandle.Alpha == 0);
}
+
+ ///
+ /// Tests that hovering over two handles instantaneously from one to another does not crash or cause issues to the visibility state.
+ ///
+ [Test]
+ public void TestHoverOverTwoHandlesInstantaneously()
+ {
+ AddStep("hover over top-left scale handle", () =>
+ InputManager.MoveMouseTo(this.ChildrenOfType().Single(s => s.Anchor == Anchor.TopLeft)));
+ AddStep("hover over top-right scale handle", () =>
+ InputManager.MoveMouseTo(this.ChildrenOfType().Single(s => s.Anchor == Anchor.TopRight)));
+ AddUntilStep("top-left rotation handle hidden", () =>
+ this.ChildrenOfType().Single(r => r.Anchor == Anchor.TopLeft).Alpha == 0);
+ AddUntilStep("top-right rotation handle shown", () =>
+ this.ChildrenOfType().Single(r => r.Anchor == Anchor.TopRight).Alpha == 1);
+ }
}
}
diff --git a/osu.Game/Rulesets/Edit/Checks/Components/IssueType.cs b/osu.Game/Rulesets/Edit/Checks/Components/IssueType.cs
index 1241e058ad..1f708209fe 100644
--- a/osu.Game/Rulesets/Edit/Checks/Components/IssueType.cs
+++ b/osu.Game/Rulesets/Edit/Checks/Components/IssueType.cs
@@ -18,7 +18,6 @@ namespace osu.Game.Rulesets.Edit.Checks.Components
/// An error occurred and a complete check could not be made.
Error,
- // TODO: Negligible issues should be hidden by default.
/// A possible mistake so minor/unlikely that it can often be safely ignored.
Negligible,
}
diff --git a/osu.Game/Screens/Edit/Compose/Components/SelectionBoxDragHandleContainer.cs b/osu.Game/Screens/Edit/Compose/Components/SelectionBoxDragHandleContainer.cs
index 456f72878d..397158b9f6 100644
--- a/osu.Game/Screens/Edit/Compose/Components/SelectionBoxDragHandleContainer.cs
+++ b/osu.Game/Screens/Edit/Compose/Components/SelectionBoxDragHandleContainer.cs
@@ -84,8 +84,8 @@ namespace osu.Game.Screens.Edit.Compose.Components
if (activeHandle?.IsHeld == true)
return;
- activeHandle = rotationHandles.SingleOrDefault(h => h.IsHeld || h.IsHovered);
- activeHandle ??= allDragHandles.SingleOrDefault(h => h.IsHovered);
+ activeHandle = rotationHandles.FirstOrDefault(h => h.IsHeld || h.IsHovered);
+ activeHandle ??= allDragHandles.FirstOrDefault(h => h.IsHovered);
if (activeHandle != null)
{
diff --git a/osu.Game/Screens/Edit/RoundedContentEditorScreen.cs b/osu.Game/Screens/Edit/EditorRoundedScreen.cs
similarity index 93%
rename from osu.Game/Screens/Edit/RoundedContentEditorScreen.cs
rename to osu.Game/Screens/Edit/EditorRoundedScreen.cs
index a55ae3f635..c6ced02021 100644
--- a/osu.Game/Screens/Edit/RoundedContentEditorScreen.cs
+++ b/osu.Game/Screens/Edit/EditorRoundedScreen.cs
@@ -10,7 +10,7 @@ using osu.Game.Overlays;
namespace osu.Game.Screens.Edit
{
- public class RoundedContentEditorScreen : EditorScreen
+ public class EditorRoundedScreen : EditorScreen
{
public const int HORIZONTAL_PADDING = 100;
@@ -24,7 +24,7 @@ namespace osu.Game.Screens.Edit
protected override Container Content => roundedContent;
- public RoundedContentEditorScreen(EditorScreenMode mode)
+ public EditorRoundedScreen(EditorScreenMode mode)
: base(mode)
{
ColourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
diff --git a/osu.Game/Screens/Edit/EditorRoundedScreenSettings.cs b/osu.Game/Screens/Edit/EditorRoundedScreenSettings.cs
new file mode 100644
index 0000000000..cb17484d27
--- /dev/null
+++ b/osu.Game/Screens/Edit/EditorRoundedScreenSettings.cs
@@ -0,0 +1,44 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System.Collections.Generic;
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
+using osu.Game.Graphics.Containers;
+using osu.Game.Overlays;
+
+namespace osu.Game.Screens.Edit
+{
+ public abstract class EditorRoundedScreenSettings : CompositeDrawable
+ {
+ [BackgroundDependencyLoader]
+ private void load(OverlayColourProvider colours)
+ {
+ RelativeSizeAxes = Axes.Both;
+
+ InternalChildren = new Drawable[]
+ {
+ new Box
+ {
+ Colour = colours.Background4,
+ RelativeSizeAxes = Axes.Both,
+ },
+ new OsuScrollContainer
+ {
+ RelativeSizeAxes = Axes.Both,
+ Child = new FillFlowContainer
+ {
+ RelativeSizeAxes = Axes.X,
+ AutoSizeAxes = Axes.Y,
+ Direction = FillDirection.Vertical,
+ Children = CreateSections()
+ },
+ }
+ };
+ }
+
+ protected abstract IReadOnlyList CreateSections();
+ }
+}
diff --git a/osu.Game/Screens/Edit/EditorRoundedScreenSettingsSection.cs b/osu.Game/Screens/Edit/EditorRoundedScreenSettingsSection.cs
new file mode 100644
index 0000000000..e17114ebcb
--- /dev/null
+++ b/osu.Game/Screens/Edit/EditorRoundedScreenSettingsSection.cs
@@ -0,0 +1,61 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Sprites;
+using osu.Game.Graphics.Sprites;
+using osu.Game.Overlays;
+using osuTK;
+
+namespace osu.Game.Screens.Edit
+{
+ public abstract class EditorRoundedScreenSettingsSection : CompositeDrawable
+ {
+ private const int header_height = 50;
+
+ protected abstract string HeaderText { get; }
+
+ protected FillFlowContainer Flow { get; private set; }
+
+ [BackgroundDependencyLoader]
+ private void load(OverlayColourProvider colours)
+ {
+ RelativeSizeAxes = Axes.X;
+ AutoSizeAxes = Axes.Y;
+ Masking = true;
+
+ InternalChildren = new Drawable[]
+ {
+ new Container
+ {
+ RelativeSizeAxes = Axes.X,
+ Height = header_height,
+ Padding = new MarginPadding { Horizontal = 20 },
+ Child = new OsuSpriteText
+ {
+ Anchor = Anchor.CentreLeft,
+ Origin = Anchor.CentreLeft,
+ Text = HeaderText,
+ Font = new FontUsage(size: 25, weight: "bold")
+ }
+ },
+ new Container
+ {
+ Y = header_height,
+ RelativeSizeAxes = Axes.X,
+ AutoSizeAxes = Axes.Y,
+ Child = Flow = new FillFlowContainer
+ {
+ Padding = new MarginPadding { Horizontal = 20 },
+ Spacing = new Vector2(10),
+ RelativeSizeAxes = Axes.X,
+ AutoSizeAxes = Axes.Y,
+ Direction = FillDirection.Vertical,
+ }
+ }
+ };
+ }
+ }
+}
diff --git a/osu.Game/Screens/Edit/Setup/SetupScreen.cs b/osu.Game/Screens/Edit/Setup/SetupScreen.cs
index 0af7cf095b..5bbec2574f 100644
--- a/osu.Game/Screens/Edit/Setup/SetupScreen.cs
+++ b/osu.Game/Screens/Edit/Setup/SetupScreen.cs
@@ -7,7 +7,7 @@ using osu.Game.Graphics.Containers;
namespace osu.Game.Screens.Edit.Setup
{
- public class SetupScreen : RoundedContentEditorScreen
+ public class SetupScreen : EditorRoundedScreen
{
[Cached]
private SectionsContainer sections = new SectionsContainer();
diff --git a/osu.Game/Screens/Edit/Setup/SetupScreenHeader.cs b/osu.Game/Screens/Edit/Setup/SetupScreenHeader.cs
index 10daacc359..2d0afda001 100644
--- a/osu.Game/Screens/Edit/Setup/SetupScreenHeader.cs
+++ b/osu.Game/Screens/Edit/Setup/SetupScreenHeader.cs
@@ -93,7 +93,7 @@ namespace osu.Game.Screens.Edit.Setup
public SetupScreenTabControl()
{
- TabContainer.Margin = new MarginPadding { Horizontal = RoundedContentEditorScreen.HORIZONTAL_PADDING };
+ TabContainer.Margin = new MarginPadding { Horizontal = EditorRoundedScreen.HORIZONTAL_PADDING };
AddInternal(background = new Box
{
diff --git a/osu.Game/Screens/Edit/Setup/SetupSection.cs b/osu.Game/Screens/Edit/Setup/SetupSection.cs
index b3ae15900f..8964e651df 100644
--- a/osu.Game/Screens/Edit/Setup/SetupSection.cs
+++ b/osu.Game/Screens/Edit/Setup/SetupSection.cs
@@ -33,7 +33,7 @@ namespace osu.Game.Screens.Edit.Setup
Padding = new MarginPadding
{
Vertical = 10,
- Horizontal = RoundedContentEditorScreen.HORIZONTAL_PADDING
+ Horizontal = EditorRoundedScreen.HORIZONTAL_PADDING
};
InternalChild = new FillFlowContainer
diff --git a/osu.Game/Screens/Edit/Timing/ControlPointSettings.cs b/osu.Game/Screens/Edit/Timing/ControlPointSettings.cs
index 921fa675b3..48639789af 100644
--- a/osu.Game/Screens/Edit/Timing/ControlPointSettings.cs
+++ b/osu.Game/Screens/Edit/Timing/ControlPointSettings.cs
@@ -2,44 +2,13 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
-using osu.Framework.Allocation;
using osu.Framework.Graphics;
-using osu.Framework.Graphics.Containers;
-using osu.Framework.Graphics.Shapes;
-using osu.Game.Graphics.Containers;
-using osu.Game.Overlays;
namespace osu.Game.Screens.Edit.Timing
{
- public class ControlPointSettings : CompositeDrawable
+ public class ControlPointSettings : EditorRoundedScreenSettings
{
- [BackgroundDependencyLoader]
- private void load(OverlayColourProvider colours)
- {
- RelativeSizeAxes = Axes.Both;
-
- InternalChildren = new Drawable[]
- {
- new Box
- {
- Colour = colours.Background4,
- RelativeSizeAxes = Axes.Both,
- },
- new OsuScrollContainer
- {
- RelativeSizeAxes = Axes.Both,
- Child = new FillFlowContainer
- {
- RelativeSizeAxes = Axes.X,
- AutoSizeAxes = Axes.Y,
- Direction = FillDirection.Vertical,
- Children = createSections()
- },
- }
- };
- }
-
- private IReadOnlyList createSections() => new Drawable[]
+ protected override IReadOnlyList CreateSections() => new Drawable[]
{
new GroupSection(),
new TimingSection(),
diff --git a/osu.Game/Screens/Edit/Timing/TimingScreen.cs b/osu.Game/Screens/Edit/Timing/TimingScreen.cs
index 9f26dece08..a4193d5084 100644
--- a/osu.Game/Screens/Edit/Timing/TimingScreen.cs
+++ b/osu.Game/Screens/Edit/Timing/TimingScreen.cs
@@ -15,7 +15,7 @@ using osuTK;
namespace osu.Game.Screens.Edit.Timing
{
- public class TimingScreen : RoundedContentEditorScreen
+ public class TimingScreen : EditorRoundedScreen
{
[Cached]
private Bindable selectedGroup = new Bindable();
diff --git a/osu.Game/Screens/Edit/Verify/InterpretationSection.cs b/osu.Game/Screens/Edit/Verify/InterpretationSection.cs
new file mode 100644
index 0000000000..9548f8aaa9
--- /dev/null
+++ b/osu.Game/Screens/Edit/Verify/InterpretationSection.cs
@@ -0,0 +1,27 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Game.Beatmaps;
+using osu.Game.Overlays.Settings;
+
+namespace osu.Game.Screens.Edit.Verify
+{
+ internal class InterpretationSection : EditorRoundedScreenSettingsSection
+ {
+ protected override string HeaderText => "Interpretation";
+
+ [BackgroundDependencyLoader]
+ private void load(VerifyScreen verify)
+ {
+ Flow.Add(new SettingsEnumDropdown
+ {
+ Anchor = Anchor.CentreLeft,
+ Origin = Anchor.CentreLeft,
+ TooltipText = "Affects checks that depend on difficulty level",
+ Current = verify.InterpretedDifficulty.GetBoundCopy()
+ });
+ }
+ }
+}
diff --git a/osu.Game/Screens/Edit/Verify/IssueList.cs b/osu.Game/Screens/Edit/Verify/IssueList.cs
new file mode 100644
index 0000000000..407c1e3bc7
--- /dev/null
+++ b/osu.Game/Screens/Edit/Verify/IssueList.cs
@@ -0,0 +1,111 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using System.Collections.Generic;
+using System.Linq;
+using osu.Framework.Allocation;
+using osu.Framework.Bindables;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
+using osu.Game.Beatmaps;
+using osu.Game.Graphics.Containers;
+using osu.Game.Graphics.UserInterface;
+using osu.Game.Overlays;
+using osu.Game.Rulesets.Edit;
+using osu.Game.Rulesets.Edit.Checks.Components;
+using osuTK;
+
+namespace osu.Game.Screens.Edit.Verify
+{
+ [Cached]
+ public class IssueList : CompositeDrawable
+ {
+ private IssueTable table;
+
+ [Resolved]
+ private EditorClock clock { get; set; }
+
+ [Resolved]
+ private IBindable workingBeatmap { get; set; }
+
+ [Resolved]
+ private EditorBeatmap beatmap { get; set; }
+
+ [Resolved]
+ private VerifyScreen verify { get; set; }
+
+ private IBeatmapVerifier rulesetVerifier;
+ private BeatmapVerifier generalVerifier;
+
+ [BackgroundDependencyLoader]
+ private void load(OverlayColourProvider colours)
+ {
+ generalVerifier = new BeatmapVerifier();
+ rulesetVerifier = beatmap.BeatmapInfo.Ruleset?.CreateInstance()?.CreateBeatmapVerifier();
+
+ RelativeSizeAxes = Axes.Both;
+
+ InternalChildren = new Drawable[]
+ {
+ new Box
+ {
+ Colour = colours.Background2,
+ RelativeSizeAxes = Axes.Both,
+ },
+ new OsuScrollContainer
+ {
+ RelativeSizeAxes = Axes.Both,
+ Child = table = new IssueTable(),
+ },
+ new FillFlowContainer
+ {
+ AutoSizeAxes = Axes.Both,
+ Anchor = Anchor.BottomRight,
+ Origin = Anchor.BottomRight,
+ Margin = new MarginPadding(20),
+ Children = new Drawable[]
+ {
+ new TriangleButton
+ {
+ Text = "Refresh",
+ Action = refresh,
+ Size = new Vector2(120, 40),
+ Anchor = Anchor.BottomRight,
+ Origin = Anchor.BottomRight,
+ },
+ }
+ },
+ };
+ }
+
+ protected override void LoadComplete()
+ {
+ base.LoadComplete();
+
+ verify.InterpretedDifficulty.BindValueChanged(_ => refresh());
+ verify.HiddenIssueTypes.BindCollectionChanged((_, __) => refresh());
+
+ refresh();
+ }
+
+ private void refresh()
+ {
+ var issues = generalVerifier.Run(beatmap, workingBeatmap.Value);
+
+ if (rulesetVerifier != null)
+ issues = issues.Concat(rulesetVerifier.Run(beatmap, workingBeatmap.Value));
+
+ issues = filter(issues);
+
+ table.Issues = issues
+ .OrderBy(issue => issue.Template.Type)
+ .ThenBy(issue => issue.Check.Metadata.Category);
+ }
+
+ private IEnumerable filter(IEnumerable issues)
+ {
+ return issues.Where(issue => !verify.HiddenIssueTypes.Contains(issue.Template.Type));
+ }
+ }
+}
diff --git a/osu.Game/Screens/Edit/Verify/IssueSettings.cs b/osu.Game/Screens/Edit/Verify/IssueSettings.cs
index 4519231cd2..ae3ef7e0b0 100644
--- a/osu.Game/Screens/Edit/Verify/IssueSettings.cs
+++ b/osu.Game/Screens/Edit/Verify/IssueSettings.cs
@@ -2,45 +2,16 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
-using osu.Framework.Allocation;
using osu.Framework.Graphics;
-using osu.Framework.Graphics.Containers;
-using osu.Framework.Graphics.Shapes;
-using osu.Game.Graphics;
-using osu.Game.Graphics.Containers;
namespace osu.Game.Screens.Edit.Verify
{
- public class IssueSettings : CompositeDrawable
+ public class IssueSettings : EditorRoundedScreenSettings
{
- [BackgroundDependencyLoader]
- private void load(OsuColour colours)
- {
- RelativeSizeAxes = Axes.Both;
-
- InternalChildren = new Drawable[]
- {
- new Box
- {
- Colour = colours.Gray3,
- RelativeSizeAxes = Axes.Both,
- },
- new OsuScrollContainer
- {
- RelativeSizeAxes = Axes.Both,
- Child = new FillFlowContainer
- {
- RelativeSizeAxes = Axes.X,
- AutoSizeAxes = Axes.Y,
- Direction = FillDirection.Vertical,
- Children = createSections()
- },
- }
- };
- }
-
- private IReadOnlyList createSections() => new Drawable[]
+ protected override IReadOnlyList CreateSections() => new Drawable[]
{
+ new InterpretationSection(),
+ new VisibilitySection()
};
}
}
diff --git a/osu.Game/Screens/Edit/Verify/IssueTable.cs b/osu.Game/Screens/Edit/Verify/IssueTable.cs
index 44244028c9..05a8fdd26d 100644
--- a/osu.Game/Screens/Edit/Verify/IssueTable.cs
+++ b/osu.Game/Screens/Edit/Verify/IssueTable.cs
@@ -18,7 +18,9 @@ namespace osu.Game.Screens.Edit.Verify
public class IssueTable : EditorTable
{
[Resolved]
- private Bindable selectedIssue { get; set; }
+ private VerifyScreen verify { get; set; }
+
+ private Bindable selectedIssue;
[Resolved]
private EditorClock clock { get; set; }
@@ -71,6 +73,7 @@ namespace osu.Game.Screens.Edit.Verify
{
base.LoadComplete();
+ selectedIssue = verify.SelectedIssue.GetBoundCopy();
selectedIssue.BindValueChanged(issue =>
{
foreach (var b in BackgroundFlow) b.Selected = b.Item == issue.NewValue;
diff --git a/osu.Game/Screens/Edit/Verify/VerifyScreen.cs b/osu.Game/Screens/Edit/Verify/VerifyScreen.cs
index 9de1f04271..6d7a4a72e2 100644
--- a/osu.Game/Screens/Edit/Verify/VerifyScreen.cs
+++ b/osu.Game/Screens/Edit/Verify/VerifyScreen.cs
@@ -1,26 +1,25 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
-using osu.Framework.Graphics.Shapes;
using osu.Game.Beatmaps;
-using osu.Game.Graphics.Containers;
-using osu.Game.Graphics.UserInterface;
-using osu.Game.Overlays;
-using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Checks.Components;
-using osuTK;
namespace osu.Game.Screens.Edit.Verify
{
- public class VerifyScreen : RoundedContentEditorScreen
+ [Cached]
+ public class VerifyScreen : EditorRoundedScreen
{
- [Cached]
- private Bindable selectedIssue = new Bindable();
+ public readonly Bindable SelectedIssue = new Bindable();
+
+ public readonly Bindable InterpretedDifficulty = new Bindable();
+
+ public readonly BindableList HiddenIssueTypes = new BindableList { IssueType.Negligible };
+
+ public IssueList IssueList { get; private set; }
public VerifyScreen()
: base(EditorScreenMode.Verify)
@@ -30,6 +29,10 @@ namespace osu.Game.Screens.Edit.Verify
[BackgroundDependencyLoader]
private void load()
{
+ InterpretedDifficulty.Default = EditorBeatmap.BeatmapInfo.DifficultyRating;
+ InterpretedDifficulty.SetDefault();
+
+ IssueList = new IssueList();
Child = new Container
{
RelativeSizeAxes = Axes.Both,
@@ -45,92 +48,12 @@ namespace osu.Game.Screens.Edit.Verify
{
new Drawable[]
{
- new IssueList(),
+ IssueList,
new IssueSettings(),
},
}
}
};
}
-
- public class IssueList : CompositeDrawable
- {
- private IssueTable table;
-
- [Resolved]
- private EditorClock clock { get; set; }
-
- [Resolved]
- private IBindable workingBeatmap { get; set; }
-
- [Resolved]
- private EditorBeatmap beatmap { get; set; }
-
- [Resolved]
- private Bindable selectedIssue { get; set; }
-
- private IBeatmapVerifier rulesetVerifier;
- private BeatmapVerifier generalVerifier;
-
- [BackgroundDependencyLoader]
- private void load(OverlayColourProvider colours)
- {
- generalVerifier = new BeatmapVerifier();
- rulesetVerifier = beatmap.BeatmapInfo.Ruleset?.CreateInstance()?.CreateBeatmapVerifier();
-
- RelativeSizeAxes = Axes.Both;
-
- InternalChildren = new Drawable[]
- {
- new Box
- {
- Colour = colours.Background2,
- RelativeSizeAxes = Axes.Both,
- },
- new OsuScrollContainer
- {
- RelativeSizeAxes = Axes.Both,
- Child = table = new IssueTable(),
- },
- new FillFlowContainer
- {
- AutoSizeAxes = Axes.Both,
- Anchor = Anchor.BottomRight,
- Origin = Anchor.BottomRight,
- Margin = new MarginPadding(20),
- Children = new Drawable[]
- {
- new TriangleButton
- {
- Text = "Refresh",
- Action = refresh,
- Size = new Vector2(120, 40),
- Anchor = Anchor.BottomRight,
- Origin = Anchor.BottomRight,
- },
- }
- },
- };
- }
-
- protected override void LoadComplete()
- {
- base.LoadComplete();
-
- refresh();
- }
-
- private void refresh()
- {
- var issues = generalVerifier.Run(beatmap, workingBeatmap.Value);
-
- if (rulesetVerifier != null)
- issues = issues.Concat(rulesetVerifier.Run(beatmap, workingBeatmap.Value));
-
- table.Issues = issues
- .OrderBy(issue => issue.Template.Type)
- .ThenBy(issue => issue.Check.Metadata.Category);
- }
- }
}
}
diff --git a/osu.Game/Screens/Edit/Verify/VisibilitySection.cs b/osu.Game/Screens/Edit/Verify/VisibilitySection.cs
new file mode 100644
index 0000000000..d049436376
--- /dev/null
+++ b/osu.Game/Screens/Edit/Verify/VisibilitySection.cs
@@ -0,0 +1,54 @@
+// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
+// See the LICENCE file in the repository root for full licence text.
+
+using osu.Framework.Allocation;
+using osu.Framework.Bindables;
+using osu.Framework.Graphics;
+using osu.Game.Overlays;
+using osu.Game.Overlays.Settings;
+using osu.Game.Rulesets.Edit.Checks.Components;
+
+namespace osu.Game.Screens.Edit.Verify
+{
+ internal class VisibilitySection : EditorRoundedScreenSettingsSection
+ {
+ private readonly IssueType[] configurableIssueTypes =
+ {
+ IssueType.Warning,
+ IssueType.Error,
+ IssueType.Negligible
+ };
+
+ private BindableList hiddenIssueTypes;
+
+ protected override string HeaderText => "Visibility";
+
+ [BackgroundDependencyLoader]
+ private void load(OverlayColourProvider colours, VerifyScreen verify)
+ {
+ hiddenIssueTypes = verify.HiddenIssueTypes.GetBoundCopy();
+
+ foreach (IssueType issueType in configurableIssueTypes)
+ {
+ var checkbox = new SettingsCheckbox
+ {
+ Anchor = Anchor.CentreLeft,
+ Origin = Anchor.CentreLeft,
+ LabelText = issueType.ToString(),
+ Current = { Default = !hiddenIssueTypes.Contains(issueType) }
+ };
+
+ checkbox.Current.SetDefault();
+ checkbox.Current.BindValueChanged(state =>
+ {
+ if (!state.NewValue)
+ hiddenIssueTypes.Add(issueType);
+ else
+ hiddenIssueTypes.Remove(issueType);
+ });
+
+ Flow.Add(checkbox);
+ }
+ }
+ }
+}
diff --git a/osu.Game/Skinning/Editor/SkinEditor.cs b/osu.Game/Skinning/Editor/SkinEditor.cs
index 67285987ef..cb27a84a75 100644
--- a/osu.Game/Skinning/Editor/SkinEditor.cs
+++ b/osu.Game/Skinning/Editor/SkinEditor.cs
@@ -166,7 +166,7 @@ namespace osu.Game.Skinning.Editor
private void placeComponent(Type type)
{
if (!(Activator.CreateInstance(type) is ISkinnableDrawable component))
- throw new InvalidOperationException("Attempted to instantiate a component for placement which was not an {typeof(ISkinnableComponent)}.");
+ throw new InvalidOperationException($"Attempted to instantiate a component for placement which was not an {typeof(ISkinnableDrawable)}.");
getTarget(SkinnableTarget.MainHUDComponents)?.Add(component);