mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Merge branch 'master' into slider-timeline-velcotiy-adjust-v2
This commit is contained in:
@ -10,12 +10,12 @@ namespace osu.Game.Screens.Edit.Components.Menus
|
||||
{
|
||||
public class DifficultyMenuItem : StatefulMenuItem<bool>
|
||||
{
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
public BeatmapInfo BeatmapInfo { get; }
|
||||
|
||||
public DifficultyMenuItem(BeatmapInfo beatmapInfo, bool selected, Action<BeatmapInfo> difficultyChangeFunc)
|
||||
: base(beatmapInfo.Version ?? "(unnamed)", null)
|
||||
{
|
||||
Beatmap = beatmapInfo;
|
||||
BeatmapInfo = beatmapInfo;
|
||||
State.Value = selected;
|
||||
|
||||
if (!selected)
|
||||
|
@ -508,6 +508,7 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
if (isNewBeatmap || HasUnsavedChanges)
|
||||
{
|
||||
samplePlaybackDisabled.Value = true;
|
||||
dialogOverlay?.Push(new PromptForSaveDialog(confirmExit, confirmExitWithSave, cancelExit));
|
||||
return true;
|
||||
}
|
||||
@ -756,7 +757,11 @@ namespace osu.Game.Screens.Edit
|
||||
ClipboardContent = editorBeatmap.BeatmapInfo.RulesetID == nextBeatmap.RulesetID ? clipboard.Value : string.Empty
|
||||
});
|
||||
|
||||
private void cancelExit() => loader?.CancelPendingDifficultySwitch();
|
||||
private void cancelExit()
|
||||
{
|
||||
samplePlaybackDisabled.Value = false;
|
||||
loader?.CancelPendingDifficultySwitch();
|
||||
}
|
||||
|
||||
public double SnapTime(double time, double? referenceTime) => editorBeatmap.SnapTime(time, referenceTime);
|
||||
|
||||
|
@ -113,6 +113,12 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
public BeatmapMetadata Metadata => PlayableBeatmap.Metadata;
|
||||
|
||||
public BeatmapDifficulty Difficulty
|
||||
{
|
||||
get => PlayableBeatmap.Difficulty;
|
||||
set => PlayableBeatmap.Difficulty = value;
|
||||
}
|
||||
|
||||
public ControlPointInfo ControlPointInfo
|
||||
{
|
||||
get => PlayableBeatmap.ControlPointInfo;
|
||||
@ -313,7 +319,7 @@ namespace osu.Game.Screens.Edit
|
||||
/// </summary>
|
||||
public void Clear() => RemoveRange(HitObjects.ToArray());
|
||||
|
||||
private void processHitObject(HitObject hitObject) => hitObject.ApplyDefaults(ControlPointInfo, BeatmapInfo.BaseDifficulty);
|
||||
private void processHitObject(HitObject hitObject) => hitObject.ApplyDefaults(ControlPointInfo, PlayableBeatmap.Difficulty);
|
||||
|
||||
private void trackStartTime(HitObject hitObject)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
new Box
|
||||
{
|
||||
Colour = ColourProvider.Dark4,
|
||||
Colour = ColourProvider.Background3,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
roundedContent = new Container
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
Label = "Object Size",
|
||||
FixedLabelWidth = LABEL_WIDTH,
|
||||
Description = "The size of all hit objects",
|
||||
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.CircleSize)
|
||||
Current = new BindableFloat(Beatmap.Difficulty.CircleSize)
|
||||
{
|
||||
Default = BeatmapDifficulty.DEFAULT_DIFFICULTY,
|
||||
MinValue = 0,
|
||||
@ -43,7 +43,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
Label = "Health Drain",
|
||||
FixedLabelWidth = LABEL_WIDTH,
|
||||
Description = "The rate of passive health drain throughout playable time",
|
||||
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.DrainRate)
|
||||
Current = new BindableFloat(Beatmap.Difficulty.DrainRate)
|
||||
{
|
||||
Default = BeatmapDifficulty.DEFAULT_DIFFICULTY,
|
||||
MinValue = 0,
|
||||
@ -56,7 +56,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
Label = "Approach Rate",
|
||||
FixedLabelWidth = LABEL_WIDTH,
|
||||
Description = "The speed at which objects are presented to the player",
|
||||
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.ApproachRate)
|
||||
Current = new BindableFloat(Beatmap.Difficulty.ApproachRate)
|
||||
{
|
||||
Default = BeatmapDifficulty.DEFAULT_DIFFICULTY,
|
||||
MinValue = 0,
|
||||
@ -69,7 +69,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
Label = "Overall Difficulty",
|
||||
FixedLabelWidth = LABEL_WIDTH,
|
||||
Description = "The harshness of hit windows and difficulty of special objects (ie. spinners)",
|
||||
Current = new BindableFloat(Beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty)
|
||||
Current = new BindableFloat(Beatmap.Difficulty.OverallDifficulty)
|
||||
{
|
||||
Default = BeatmapDifficulty.DEFAULT_DIFFICULTY,
|
||||
MinValue = 0,
|
||||
@ -87,10 +87,10 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
{
|
||||
// for now, update these on commit rather than making BeatmapMetadata bindables.
|
||||
// after switching database engines we can reconsider if switching to bindables is a good direction.
|
||||
Beatmap.BeatmapInfo.BaseDifficulty.CircleSize = circleSizeSlider.Current.Value;
|
||||
Beatmap.BeatmapInfo.BaseDifficulty.DrainRate = healthDrainSlider.Current.Value;
|
||||
Beatmap.BeatmapInfo.BaseDifficulty.ApproachRate = approachRateSlider.Current.Value;
|
||||
Beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
||||
Beatmap.Difficulty.CircleSize = circleSizeSlider.Current.Value;
|
||||
Beatmap.Difficulty.DrainRate = healthDrainSlider.Current.Value;
|
||||
Beatmap.Difficulty.ApproachRate = approachRateSlider.Current.Value;
|
||||
Beatmap.Difficulty.OverallDifficulty = overallDifficultySlider.Current.Value;
|
||||
|
||||
Beatmap.UpdateAllHitObjects();
|
||||
}
|
||||
|
@ -89,6 +89,13 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
{
|
||||
public Action OnFocused;
|
||||
|
||||
protected override bool OnDragStart(DragStartEvent e)
|
||||
{
|
||||
// This text box is intended to be "read only" without actually specifying that.
|
||||
// As such we don't want to allow the user to select its content with a drag.
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void OnFocus(FocusEvent e)
|
||||
{
|
||||
OnFocused?.Invoke();
|
||||
|
Reference in New Issue
Block a user