mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Avoid the need for per-settings control classes
This commit is contained in:
@ -11,7 +11,6 @@ using osu.Game.Overlays.Settings;
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
// TODO: make abstract once we finish making each implementation.
|
||||
public class DifficultyAdjustSettingsControl : SettingsItem<float?>
|
||||
{
|
||||
[Resolved]
|
||||
@ -69,14 +68,11 @@ namespace osu.Game.Rulesets.Mods
|
||||
if (Current.Value == null)
|
||||
{
|
||||
isInternalChange = true;
|
||||
CurrentNumber.Value = UpdateFromDifficulty(difficulty);
|
||||
CurrentNumber.Value = difficultyBindable.ReadFromDifficulty(difficulty);
|
||||
isInternalChange = false;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: make abstract
|
||||
protected virtual float UpdateFromDifficulty(BeatmapDifficulty difficulty) => 0;
|
||||
|
||||
private class ControlDrawable : CompositeDrawable, IHasCurrentValue<float?>
|
||||
{
|
||||
private readonly BindableWithCurrent<float?> current = new BindableWithCurrent<float?>();
|
||||
|
Reference in New Issue
Block a user