mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:32:55 +08:00
Move ShowIssueTypes
to VerifyScreen
This commit is contained in:
parent
d2e0e8ad94
commit
56bd897666
@ -35,8 +35,6 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
[Resolved]
|
||||
private VerifyScreen verify { get; set; }
|
||||
|
||||
public Dictionary<IssueType, Bindable<bool>> ShowType { get; set; }
|
||||
|
||||
public Bindable<DifficultyRating> InterpretedDifficulty { get; set; }
|
||||
|
||||
private IBeatmapVerifier rulesetVerifier;
|
||||
@ -45,14 +43,6 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colours)
|
||||
{
|
||||
// Reflects the user interface. Only types in this dictionary have configurable visibility.
|
||||
ShowType = new Dictionary<IssueType, Bindable<bool>>
|
||||
{
|
||||
{ IssueType.Warning, new Bindable<bool>(true) },
|
||||
{ IssueType.Error, new Bindable<bool>(true) },
|
||||
{ IssueType.Negligible, new Bindable<bool>(false) }
|
||||
};
|
||||
|
||||
generalVerifier = new BeatmapVerifier();
|
||||
rulesetVerifier = beatmap.BeatmapInfo.Ruleset?.CreateInstance()?.CreateBeatmapVerifier();
|
||||
|
||||
@ -116,9 +106,9 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
|
||||
private IEnumerable<Issue> filter(IEnumerable<Issue> issues)
|
||||
{
|
||||
foreach (IssueType issueType in ShowType.Keys)
|
||||
foreach (var issueType in verify.ShowIssueType.Keys)
|
||||
{
|
||||
if (!ShowType[issueType].Value)
|
||||
if (!verify.ShowIssueType[issueType].Value)
|
||||
issues = issues.Where(issue => issue.Template.Type != issueType);
|
||||
}
|
||||
|
||||
|
@ -1,6 +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.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
@ -17,6 +18,13 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
|
||||
public readonly Bindable<DifficultyRating> InterpretedDifficulty = new Bindable<DifficultyRating>();
|
||||
|
||||
public readonly Dictionary<IssueType, Bindable<bool>> ShowIssueType = new Dictionary<IssueType, Bindable<bool>>
|
||||
{
|
||||
{ IssueType.Warning, new Bindable<bool>(true) },
|
||||
{ IssueType.Error, new Bindable<bool>(true) },
|
||||
{ IssueType.Negligible, new Bindable<bool>(false) }
|
||||
};
|
||||
|
||||
public IssueList IssueList { get; private set; }
|
||||
|
||||
public VerifyScreen()
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colours)
|
||||
{
|
||||
foreach (IssueType issueType in verify.IssueList.ShowType.Keys)
|
||||
foreach (IssueType issueType in verify.ShowIssueType.Keys)
|
||||
{
|
||||
var checkbox = new SettingsCheckbox
|
||||
{
|
||||
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Edit.Verify
|
||||
LabelText = issueType.ToString()
|
||||
};
|
||||
|
||||
checkbox.Current.BindTo(verify.IssueList.ShowType[issueType]);
|
||||
checkbox.Current.BindTo(verify.ShowIssueType[issueType]);
|
||||
checkbox.Current.BindValueChanged(_ => verify.IssueList.Refresh());
|
||||
Flow.Add(checkbox);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user