mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
Add support to EditorBeatmap to update all hitobjects
This commit is contained in:
parent
6d7f12ad4b
commit
7a20a34aff
@ -258,5 +258,14 @@ namespace osu.Game.Screens.Edit
|
|||||||
public double GetBeatLengthAtTime(double referenceTime) => ControlPointInfo.TimingPointAt(referenceTime).BeatLength / BeatDivisor;
|
public double GetBeatLengthAtTime(double referenceTime) => ControlPointInfo.TimingPointAt(referenceTime).BeatLength / BeatDivisor;
|
||||||
|
|
||||||
public int BeatDivisor => beatDivisor?.Value ?? 1;
|
public int BeatDivisor => beatDivisor?.Value ?? 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update all hit objects with potentially changed difficulty or control point data.
|
||||||
|
/// </summary>
|
||||||
|
public void UpdateBeatmap()
|
||||||
|
{
|
||||||
|
foreach (var h in HitObjects)
|
||||||
|
pendingUpdates.Add(h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,9 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
{
|
{
|
||||||
internal class DifficultySection : SetupSection
|
internal class DifficultySection : SetupSection
|
||||||
{
|
{
|
||||||
|
[Resolved]
|
||||||
|
private EditorBeatmap editorBeatmap { get; set; }
|
||||||
|
|
||||||
private LabelledSliderBar<float> circleSizeSlider;
|
private LabelledSliderBar<float> circleSizeSlider;
|
||||||
private LabelledSliderBar<float> healthDrainSlider;
|
private LabelledSliderBar<float> healthDrainSlider;
|
||||||
private LabelledSliderBar<float> approachRateSlider;
|
private LabelledSliderBar<float> approachRateSlider;
|
||||||
@ -81,6 +84,8 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
Beatmap.Value.BeatmapInfo.BaseDifficulty.DrainRate = healthDrainSlider.Current.Value;
|
Beatmap.Value.BeatmapInfo.BaseDifficulty.DrainRate = healthDrainSlider.Current.Value;
|
||||||
Beatmap.Value.BeatmapInfo.BaseDifficulty.ApproachRate = approachRateSlider.Current.Value;
|
Beatmap.Value.BeatmapInfo.BaseDifficulty.ApproachRate = approachRateSlider.Current.Value;
|
||||||
Beatmap.Value.BeatmapInfo.BaseDifficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
Beatmap.Value.BeatmapInfo.BaseDifficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
||||||
|
|
||||||
|
editorBeatmap.UpdateBeatmap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user