1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 12:23:21 +08:00

Simplify binding flow in InterpretationSection

This commit is contained in:
Dean Herbert 2021-05-13 13:51:41 +09:00
parent cdcbaf4291
commit c6648112e5

View File

@ -2,7 +2,6 @@
// 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.Beatmaps;
using osu.Game.Overlays.Settings;
@ -16,23 +15,16 @@ namespace osu.Game.Screens.Edit.Verify
protected override string HeaderText => "Interpretation";
private Bindable<DifficultyRating> interpretedDifficulty;
[BackgroundDependencyLoader]
private void load()
{
interpretedDifficulty = verify.InterpretedDifficulty.GetBoundCopy();
var dropdown = new SettingsEnumDropdown<DifficultyRating>
Flow.Add(new SettingsEnumDropdown<DifficultyRating>
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
TooltipText = "Affects checks that depend on difficulty level"
};
dropdown.Current.BindTo(interpretedDifficulty);
Flow.Add(dropdown);
TooltipText = "Affects checks that depend on difficulty level",
Current = verify.InterpretedDifficulty.GetBoundCopy()
});
}
}
}