-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24550 from smoogipoo/mania-edit-disable-sv
Adjust osu!taiko and osu!mania editors to not visualise velocity changes by default
- Loading branch information
Showing
22 changed files
with
193 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
osu.Game.Rulesets.Taiko/Edit/DrawableTaikoEditorRuleset.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System.Collections.Generic; | ||
using osu.Framework.Bindables; | ||
using osu.Game.Beatmaps; | ||
using osu.Game.Configuration; | ||
using osu.Game.Rulesets.Mods; | ||
using osu.Game.Rulesets.Taiko.UI; | ||
using osu.Game.Rulesets.UI.Scrolling; | ||
|
||
namespace osu.Game.Rulesets.Taiko.Edit | ||
{ | ||
public partial class DrawableTaikoEditorRuleset : DrawableTaikoRuleset, ISupportConstantAlgorithmToggle | ||
{ | ||
public BindableBool ShowSpeedChanges { get; set; } = new BindableBool(); | ||
|
||
public DrawableTaikoEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods) | ||
: base(ruleset, beatmap, mods) | ||
{ | ||
} | ||
|
||
protected override void LoadComplete() | ||
{ | ||
base.LoadComplete(); | ||
|
||
ShowSpeedChanges.BindValueChanged(showChanges => VisualisationMethod = showChanges.NewValue ? ScrollVisualisationMethod.Overlapping : ScrollVisualisationMethod.Constant, true); | ||
} | ||
|
||
protected override double ComputeTimeRange() | ||
{ | ||
// Adjust when we're using constant algorithm to not be sluggish. | ||
double multiplier = ShowSpeedChanges.Value ? 1 : 4; | ||
return base.ComputeTimeRange() / multiplier; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Allocation; | ||
using osu.Framework.Bindables; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Containers; | ||
using osu.Framework.Graphics.Sprites; | ||
using osu.Game.Graphics.UserInterface; | ||
using osu.Game.Rulesets.Objects; | ||
using osu.Game.Rulesets.UI.Scrolling; | ||
using osu.Game.Screens.Edit.Components.TernaryButtons; | ||
using osuTK; | ||
|
||
namespace osu.Game.Rulesets.Edit | ||
{ | ||
public abstract partial class ScrollingHitObjectComposer<TObject> : HitObjectComposer<TObject> | ||
where TObject : HitObject | ||
{ | ||
private readonly Bindable<TernaryState> showSpeedChanges = new Bindable<TernaryState>(); | ||
|
||
protected ScrollingHitObjectComposer(Ruleset ruleset) | ||
: base(ruleset) | ||
{ | ||
} | ||
|
||
[BackgroundDependencyLoader] | ||
private void load() | ||
{ | ||
if (DrawableRuleset is ISupportConstantAlgorithmToggle toggleRuleset) | ||
{ | ||
LeftToolbox.Add(new EditorToolboxGroup("playfield") | ||
{ | ||
Child = new FillFlowContainer | ||
{ | ||
RelativeSizeAxes = Axes.X, | ||
AutoSizeAxes = Axes.Y, | ||
Direction = FillDirection.Vertical, | ||
Spacing = new Vector2(0, 5), | ||
Children = new[] | ||
{ | ||
new DrawableTernaryButton(new TernaryButton(showSpeedChanges, "Show speed changes", () => new SpriteIcon { Icon = FontAwesome.Solid.TachometerAlt })) | ||
} | ||
}, | ||
}); | ||
|
||
showSpeedChanges.BindValueChanged(state => toggleRuleset.ShowSpeedChanges.Value = state.NewValue == TernaryState.True, true); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.