mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Add "base velocity" adjustment to difficulty setup screen
This commit is contained in:
@ -126,6 +126,16 @@ namespace osu.Game.Localisation
|
|||||||
public static LocalisableString OverallDifficultyDescription =>
|
public static LocalisableString OverallDifficultyDescription =>
|
||||||
new TranslatableString(getKey(@"overall_difficulty_description"), @"The harshness of hit windows and difficulty of special objects (ie. spinners)");
|
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>
|
/// <summary>
|
||||||
/// "Metadata"
|
/// "Metadata"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -19,6 +19,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
private LabelledSliderBar<float> healthDrainSlider = null!;
|
private LabelledSliderBar<float> healthDrainSlider = null!;
|
||||||
private LabelledSliderBar<float> approachRateSlider = null!;
|
private LabelledSliderBar<float> approachRateSlider = null!;
|
||||||
private LabelledSliderBar<float> overallDifficultySlider = null!;
|
private LabelledSliderBar<float> overallDifficultySlider = null!;
|
||||||
|
private LabelledSliderBar<double> baseVelocitySlider = null!;
|
||||||
|
|
||||||
public override LocalisableString Title => EditorSetupStrings.DifficultyHeader;
|
public override LocalisableString Title => EditorSetupStrings.DifficultyHeader;
|
||||||
|
|
||||||
@ -79,6 +80,19 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
Precision = 0.1f,
|
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>>())
|
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.DrainRate = healthDrainSlider.Current.Value;
|
||||||
Beatmap.Difficulty.ApproachRate = approachRateSlider.Current.Value;
|
Beatmap.Difficulty.ApproachRate = approachRateSlider.Current.Value;
|
||||||
Beatmap.Difficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
Beatmap.Difficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
||||||
|
Beatmap.Difficulty.BaseSliderVelocity = baseVelocitySlider.Current.Value;
|
||||||
|
|
||||||
Beatmap.UpdateAllHitObjects();
|
Beatmap.UpdateAllHitObjects();
|
||||||
Beatmap.SaveState();
|
Beatmap.SaveState();
|
||||||
|
Reference in New Issue
Block a user