mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
Rename settings class
This commit is contained in:
parent
750bbc8a19
commit
6f5c468a83
@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
private IDistanceSnapProvider distanceSnapProvider { get; set; }
|
||||
|
||||
[Resolved(CanBeNull = true)]
|
||||
private OsuSliderDrawingSettingsProvider drawingSettingsProvider { get; set; }
|
||||
private FreehandSliderSettingsProvider freehandSettingsProvider { get; set; }
|
||||
|
||||
private readonly IncrementalBSplineBuilder bSplineBuilder = new IncrementalBSplineBuilder();
|
||||
|
||||
@ -80,16 +80,16 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
base.LoadComplete();
|
||||
inputManager = GetContainingInputManager();
|
||||
|
||||
if (drawingSettingsProvider != null)
|
||||
if (freehandSettingsProvider != null)
|
||||
{
|
||||
drawingSettingsProvider.Tolerance.BindValueChanged(e =>
|
||||
freehandSettingsProvider.Tolerance.BindValueChanged(e =>
|
||||
{
|
||||
if (bSplineBuilder.Tolerance != e.NewValue)
|
||||
bSplineBuilder.Tolerance = e.NewValue;
|
||||
updateSliderPathFromBSplineBuilder();
|
||||
});
|
||||
|
||||
drawingSettingsProvider.CornerThreshold.BindValueChanged(e =>
|
||||
freehandSettingsProvider.CornerThreshold.BindValueChanged(e =>
|
||||
{
|
||||
if (bSplineBuilder.CornerThreshold != e.NewValue)
|
||||
bSplineBuilder.CornerThreshold = e.NewValue;
|
||||
|
@ -10,7 +10,7 @@ using osu.Game.Rulesets.Edit;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
public partial class OsuSliderDrawingSettingsProvider : Drawable
|
||||
public partial class FreehandSliderSettingsProvider : Drawable
|
||||
{
|
||||
public BindableFloat Tolerance { get; } = new BindableFloat(1.5f)
|
||||
{
|
||||
@ -19,12 +19,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
Precision = 0.01f
|
||||
};
|
||||
|
||||
private readonly BindableInt sliderTolerance = new BindableInt(40)
|
||||
{
|
||||
MinValue = 5,
|
||||
MaxValue = 100
|
||||
};
|
||||
|
||||
public BindableFloat CornerThreshold { get; } = new BindableFloat(0.4f)
|
||||
{
|
||||
MinValue = 0.05f,
|
||||
@ -32,6 +26,12 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
Precision = 0.01f
|
||||
};
|
||||
|
||||
private readonly BindableInt sliderTolerance = new BindableInt(40)
|
||||
{
|
||||
MinValue = 5,
|
||||
MaxValue = 100
|
||||
};
|
||||
|
||||
private readonly BindableInt sliderCornerThreshold = new BindableInt(40)
|
||||
{
|
||||
MinValue = 5,
|
@ -64,7 +64,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
protected readonly OsuDistanceSnapProvider DistanceSnapProvider = new OsuDistanceSnapProvider();
|
||||
|
||||
[Cached]
|
||||
protected readonly OsuSliderDrawingSettingsProvider SliderDrawingSettingsProvider = new OsuSliderDrawingSettingsProvider();
|
||||
protected readonly FreehandSliderSettingsProvider FreehandSliderSettingsProvider = new FreehandSliderSettingsProvider();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
@ -102,8 +102,8 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
RotationHandler = BlueprintContainer.SelectionHandler.RotationHandler,
|
||||
});
|
||||
|
||||
AddInternal(SliderDrawingSettingsProvider);
|
||||
SliderDrawingSettingsProvider.AttachToToolbox(RightToolbox);
|
||||
AddInternal(FreehandSliderSettingsProvider);
|
||||
FreehandSliderSettingsProvider.AttachToToolbox(RightToolbox);
|
||||
}
|
||||
|
||||
protected override ComposeBlueprintContainer CreateBlueprintContainer()
|
||||
|
Loading…
Reference in New Issue
Block a user