mirror of
https://github.com/osukey/osukey.git
synced 2025-06-18 17:57:55 +09:00
Change interpreted difficulty from bindable to regular value
There's no reason for why checks would need this to be bindable. A 1-directional binding is more appropriate.
This commit is contained in:
parent
4eeeaf6a1a
commit
b37cb3bdbe
@ -1,7 +1,6 @@
|
|||||||
// 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.
|
||||||
|
|
||||||
using osu.Framework.Bindables;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Edit
|
namespace osu.Game.Rulesets.Edit
|
||||||
@ -20,12 +19,12 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The difficulty level which the current beatmap is considered to be.
|
/// The difficulty level which the current beatmap is considered to be.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Bindable<DifficultyRating> InterpretedDifficulty;
|
public DifficultyRating InterpretedDifficulty;
|
||||||
|
|
||||||
public BeatmapVerifierContext(IWorkingBeatmap workingBeatmap, DifficultyRating difficultyRating = DifficultyRating.ExpertPlus)
|
public BeatmapVerifierContext(IWorkingBeatmap workingBeatmap, DifficultyRating difficultyRating = DifficultyRating.ExpertPlus)
|
||||||
{
|
{
|
||||||
WorkingBeatmap = workingBeatmap;
|
WorkingBeatmap = workingBeatmap;
|
||||||
InterpretedDifficulty = new Bindable<DifficultyRating>(difficultyRating);
|
InterpretedDifficulty = difficultyRating;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,6 @@ namespace osu.Game.Screens.Edit.Verify
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private VerifyScreen verify { get; set; }
|
private VerifyScreen verify { get; set; }
|
||||||
|
|
||||||
private Bindable<DifficultyRating> interpretedDifficulty;
|
|
||||||
|
|
||||||
private IBeatmapVerifier rulesetVerifier;
|
private IBeatmapVerifier rulesetVerifier;
|
||||||
private BeatmapVerifier generalVerifier;
|
private BeatmapVerifier generalVerifier;
|
||||||
private BeatmapVerifierContext context;
|
private BeatmapVerifierContext context;
|
||||||
@ -47,10 +45,11 @@ namespace osu.Game.Screens.Edit.Verify
|
|||||||
generalVerifier = new BeatmapVerifier();
|
generalVerifier = new BeatmapVerifier();
|
||||||
rulesetVerifier = beatmap.BeatmapInfo.Ruleset?.CreateInstance()?.CreateBeatmapVerifier();
|
rulesetVerifier = beatmap.BeatmapInfo.Ruleset?.CreateInstance()?.CreateBeatmapVerifier();
|
||||||
|
|
||||||
interpretedDifficulty = verify.InterpretedDifficulty.GetBoundCopy();
|
context = new BeatmapVerifierContext(workingBeatmap.Value, verify.InterpretedDifficulty.Value);
|
||||||
|
verify.InterpretedDifficulty.BindValueChanged(change =>
|
||||||
context = new BeatmapVerifierContext(workingBeatmap.Value);
|
{
|
||||||
context.InterpretedDifficulty.BindTo(interpretedDifficulty);
|
context.InterpretedDifficulty = change.NewValue;
|
||||||
|
});
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user