mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 03:27:20 +08:00
Add "base velocity" adjustment to difficulty setup screen
This commit is contained in:
parent
f7d44c3013
commit
b109ee74a6
@ -126,6 +126,16 @@ namespace osu.Game.Localisation
|
||||
public static LocalisableString OverallDifficultyDescription =>
|
||||
new TranslatableString(getKey(@"overall_difficulty_description"), @"The harshness of hit windows and difficulty of special objects (ie. spinners)");
|
||||
|
||||
/// <summary>
|
||||
/// "Base Velocity"
|
||||
/// </summary>
|
||||
public static LocalisableString BaseVelocity => new TranslatableString(getKey(@"base_velocity"), @"Base Velocity");
|
||||
|
||||
/// <summary>
|
||||
/// "The base velocity of the beatmap, affecting things like slider velocity and scroll speed in some rulesets."
|
||||
/// </summary>
|
||||
public static LocalisableString BaseVelocityDescription => new TranslatableString(getKey(@"base_velocity_description"), @"The base velocity of the beatmap, affecting things like slider velocity and scroll speed in some rulesets.");
|
||||
|
||||
/// <summary>
|
||||
/// "Metadata"
|
||||
/// </summary>
|
||||
|
@ -19,6 +19,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
private LabelledSliderBar<float> healthDrainSlider = null!;
|
||||
private LabelledSliderBar<float> approachRateSlider = null!;
|
||||
private LabelledSliderBar<float> overallDifficultySlider = null!;
|
||||
private LabelledSliderBar<double> baseVelocitySlider = null!;
|
||||
|
||||
public override LocalisableString Title => EditorSetupStrings.DifficultyHeader;
|
||||
|
||||
@ -79,6 +80,19 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
Precision = 0.1f,
|
||||
}
|
||||
},
|
||||
baseVelocitySlider = new LabelledSliderBar<double>
|
||||
{
|
||||
Label = EditorSetupStrings.BaseVelocity,
|
||||
FixedLabelWidth = LABEL_WIDTH,
|
||||
Description = EditorSetupStrings.BaseVelocityDescription,
|
||||
Current = new BindableDouble(Beatmap.Difficulty.BaseSliderVelocity)
|
||||
{
|
||||
Default = 1,
|
||||
MinValue = 0.01,
|
||||
MaxValue = 10,
|
||||
Precision = 0.1f,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
foreach (var item in Children.OfType<LabelledSliderBar<float>>())
|
||||
@ -93,6 +107,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
Beatmap.Difficulty.DrainRate = healthDrainSlider.Current.Value;
|
||||
Beatmap.Difficulty.ApproachRate = approachRateSlider.Current.Value;
|
||||
Beatmap.Difficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
||||
Beatmap.Difficulty.BaseSliderVelocity = baseVelocitySlider.Current.Value;
|
||||
|
||||
Beatmap.UpdateAllHitObjects();
|
||||
Beatmap.SaveState();
|
||||
|
Loading…
x
Reference in New Issue
Block a user