mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 17:12:54 +08:00
Add setting to disable automatic seeking after object placement
This commit is contained in:
parent
79e1dbfb6d
commit
ddd37bb319
@ -178,6 +178,7 @@ namespace osu.Game.Configuration
|
|||||||
SetDefault(OsuSetting.EditorDim, 0.25f, 0f, 0.75f, 0.25f);
|
SetDefault(OsuSetting.EditorDim, 0.25f, 0f, 0.75f, 0.25f);
|
||||||
SetDefault(OsuSetting.EditorWaveformOpacity, 0.25f, 0f, 1f, 0.25f);
|
SetDefault(OsuSetting.EditorWaveformOpacity, 0.25f, 0f, 1f, 0.25f);
|
||||||
SetDefault(OsuSetting.EditorShowHitMarkers, true);
|
SetDefault(OsuSetting.EditorShowHitMarkers, true);
|
||||||
|
SetDefault(OsuSetting.EditorSeekToHitobject, true);
|
||||||
|
|
||||||
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
||||||
|
|
||||||
@ -374,6 +375,7 @@ namespace osu.Game.Configuration
|
|||||||
SeasonalBackgroundMode,
|
SeasonalBackgroundMode,
|
||||||
EditorWaveformOpacity,
|
EditorWaveformOpacity,
|
||||||
EditorShowHitMarkers,
|
EditorShowHitMarkers,
|
||||||
|
EditorSeekToHitobject,
|
||||||
DiscordRichPresence,
|
DiscordRichPresence,
|
||||||
AutomaticallyDownloadWhenSpectating,
|
AutomaticallyDownloadWhenSpectating,
|
||||||
ShowOnlineExplicitContent,
|
ShowOnlineExplicitContent,
|
||||||
|
@ -19,6 +19,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString ShowHitMarkers => new TranslatableString(getKey(@"show_hit_markers"), @"Show hit markers");
|
public static LocalisableString ShowHitMarkers => new TranslatableString(getKey(@"show_hit_markers"), @"Show hit markers");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Seek to Object after placement"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString SeekToHitobject => new TranslatableString(getKey(@"seek_to_hitobject"), @"Seek to Object after placement");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Timing"
|
/// "Timing"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -17,6 +17,7 @@ using osu.Framework.Input;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Rulesets.Configuration;
|
using osu.Game.Rulesets.Configuration;
|
||||||
using osu.Game.Rulesets.Edit.Tools;
|
using osu.Game.Rulesets.Edit.Tools;
|
||||||
@ -70,6 +71,7 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
private FillFlowContainer togglesCollection;
|
private FillFlowContainer togglesCollection;
|
||||||
|
|
||||||
private IBindable<bool> hasTiming;
|
private IBindable<bool> hasTiming;
|
||||||
|
protected Bindable<bool> SeekToHitobject { get; private set; }
|
||||||
|
|
||||||
protected HitObjectComposer(Ruleset ruleset)
|
protected HitObjectComposer(Ruleset ruleset)
|
||||||
: base(ruleset)
|
: base(ruleset)
|
||||||
@ -80,8 +82,10 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
SeekToHitobject = config.GetBindable<bool>(OsuSetting.EditorSeekToHitobject);
|
||||||
|
|
||||||
Config = Dependencies.Get<IRulesetConfigCache>().GetConfigFor(Ruleset);
|
Config = Dependencies.Get<IRulesetConfigCache>().GetConfigFor(Ruleset);
|
||||||
|
|
||||||
try
|
try
|
||||||
@ -365,6 +369,9 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
{
|
{
|
||||||
EditorBeatmap.Add(hitObject);
|
EditorBeatmap.Add(hitObject);
|
||||||
|
|
||||||
|
// conditionally seek based on setting
|
||||||
|
if (!SeekToHitobject.Value) return;
|
||||||
|
|
||||||
if (EditorClock.CurrentTime < hitObject.StartTime)
|
if (EditorClock.CurrentTime < hitObject.StartTime)
|
||||||
EditorClock.SeekSmoothlyTo(hitObject.StartTime);
|
EditorClock.SeekSmoothlyTo(hitObject.StartTime);
|
||||||
}
|
}
|
||||||
|
@ -185,6 +185,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
private Bindable<float> editorBackgroundDim;
|
private Bindable<float> editorBackgroundDim;
|
||||||
private Bindable<bool> editorHitMarkers;
|
private Bindable<bool> editorHitMarkers;
|
||||||
|
private Bindable<bool> editorSeekToHitobject;
|
||||||
|
|
||||||
public Editor(EditorLoader loader = null)
|
public Editor(EditorLoader loader = null)
|
||||||
{
|
{
|
||||||
@ -272,6 +273,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
editorBackgroundDim = config.GetBindable<float>(OsuSetting.EditorDim);
|
editorBackgroundDim = config.GetBindable<float>(OsuSetting.EditorDim);
|
||||||
editorHitMarkers = config.GetBindable<bool>(OsuSetting.EditorShowHitMarkers);
|
editorHitMarkers = config.GetBindable<bool>(OsuSetting.EditorShowHitMarkers);
|
||||||
|
editorSeekToHitobject = config.GetBindable<bool>(OsuSetting.EditorSeekToHitobject);
|
||||||
|
|
||||||
AddInternal(new OsuContextMenuContainer
|
AddInternal(new OsuContextMenuContainer
|
||||||
{
|
{
|
||||||
@ -329,6 +331,10 @@ namespace osu.Game.Screens.Edit
|
|||||||
new ToggleMenuItem(EditorStrings.ShowHitMarkers)
|
new ToggleMenuItem(EditorStrings.ShowHitMarkers)
|
||||||
{
|
{
|
||||||
State = { BindTarget = editorHitMarkers },
|
State = { BindTarget = editorHitMarkers },
|
||||||
|
},
|
||||||
|
new ToggleMenuItem(EditorStrings.SeekToHitobject)
|
||||||
|
{
|
||||||
|
State = { BindTarget = editorSeekToHitobject },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user