mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
fix config mistake
This commit is contained in:
parent
a549cdd5b9
commit
c89597b060
@ -24,6 +24,11 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
|||||||
SetDefault(OsuRulesetSetting.ShowCursorTrail, true);
|
SetDefault(OsuRulesetSetting.ShowCursorTrail, true);
|
||||||
SetDefault(OsuRulesetSetting.ShowCursorRipples, false);
|
SetDefault(OsuRulesetSetting.ShowCursorRipples, false);
|
||||||
SetDefault(OsuRulesetSetting.PlayfieldBorderStyle, PlayfieldBorderStyle.None);
|
SetDefault(OsuRulesetSetting.PlayfieldBorderStyle, PlayfieldBorderStyle.None);
|
||||||
|
|
||||||
|
SetDefault(OsuRulesetSetting.ReplayHitMarkersEnabled, false);
|
||||||
|
SetDefault(OsuRulesetSetting.ReplayAimMarkersEnabled, false);
|
||||||
|
SetDefault(OsuRulesetSetting.ReplayAimLinesEnabled, false);
|
||||||
|
SetDefault(OsuRulesetSetting.ReplayCursorHideEnabled, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,5 +39,11 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
|||||||
ShowCursorTrail,
|
ShowCursorTrail,
|
||||||
ShowCursorRipples,
|
ShowCursorRipples,
|
||||||
PlayfieldBorderStyle,
|
PlayfieldBorderStyle,
|
||||||
|
|
||||||
|
// Replay
|
||||||
|
ReplayHitMarkersEnabled,
|
||||||
|
ReplayAimMarkersEnabled,
|
||||||
|
ReplayAimLinesEnabled,
|
||||||
|
ReplayCursorHideEnabled,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ using osu.Game.Beatmaps.Legacy;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
using osu.Game.Replays;
|
|
||||||
using osu.Game.Rulesets.Configuration;
|
using osu.Game.Rulesets.Configuration;
|
||||||
using osu.Game.Rulesets.Difficulty;
|
using osu.Game.Rulesets.Difficulty;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
@ -361,8 +360,6 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
return adjustedDifficulty;
|
return adjustedDifficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override OsuAnalysisContainer CreateAnalysisContainer(Replay replay, Playfield playfield) => new OsuAnalysisContainer(replay, playfield);
|
|
||||||
|
|
||||||
public override bool EditorShowScrollSpeed => false;
|
public override bool EditorShowScrollSpeed => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,5 +68,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override AnalysisContainer CreateAnalysisContainer(Replay replay) => new OsuAnalysisContainer(replay, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,14 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
public new OsuAnalysisSettings AnalysisSettings => (OsuAnalysisSettings)base.AnalysisSettings;
|
public new OsuAnalysisSettings AnalysisSettings => (OsuAnalysisSettings)base.AnalysisSettings;
|
||||||
|
|
||||||
protected new OsuPlayfield Playfield => (OsuPlayfield)base.Playfield;
|
protected new DrawableOsuRuleset DrawableRuleset => (DrawableOsuRuleset)base.DrawableRuleset;
|
||||||
|
|
||||||
protected HitMarkersContainer HitMarkers;
|
protected HitMarkersContainer HitMarkers;
|
||||||
protected AimMarkersContainer AimMarkers;
|
protected AimMarkersContainer AimMarkers;
|
||||||
protected AimLinesContainer AimLines;
|
protected AimLinesContainer AimLines;
|
||||||
|
|
||||||
public OsuAnalysisContainer(Replay replay, Playfield playfield)
|
public OsuAnalysisContainer(Replay replay, DrawableRuleset drawableRuleset)
|
||||||
: base(replay, playfield)
|
: base(replay, drawableRuleset)
|
||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -37,12 +37,11 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
HitMarkers = new HitMarkersContainer(),
|
HitMarkers = new HitMarkersContainer(),
|
||||||
AimMarkers = new AimMarkersContainer { Depth = float.MinValue }
|
AimMarkers = new AimMarkersContainer { Depth = float.MinValue }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override OsuAnalysisSettings CreateAnalysisSettings()
|
protected override OsuAnalysisSettings CreateAnalysisSettings(Ruleset ruleset)
|
||||||
{
|
{
|
||||||
var settings = new OsuAnalysisSettings();
|
var settings = new OsuAnalysisSettings((OsuRuleset)ruleset);
|
||||||
settings.HitMarkersEnabled.ValueChanged += e => toggleHitMarkers(e.NewValue);
|
settings.HitMarkersEnabled.ValueChanged += e => toggleHitMarkers(e.NewValue);
|
||||||
settings.AimMarkersEnabled.ValueChanged += e => toggleAimMarkers(e.NewValue);
|
settings.AimMarkersEnabled.ValueChanged += e => toggleAimMarkers(e.NewValue);
|
||||||
settings.AimLinesEnabled.ValueChanged += e => toggleAimLines(e.NewValue);
|
settings.AimLinesEnabled.ValueChanged += e => toggleAimLines(e.NewValue);
|
||||||
@ -67,7 +66,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
|
|
||||||
private void toggleAimLines(bool value) => AimLines.FadeTo(value ? 1 : 0);
|
private void toggleAimLines(bool value) => AimLines.FadeTo(value ? 1 : 0);
|
||||||
|
|
||||||
private void toggleCursorHidden(bool value) => Playfield.Cursor.FadeTo(value ? 0 : 1);
|
private void toggleCursorHidden(bool value) => DrawableRuleset.Playfield.Cursor.FadeTo(value ? 0 : 1);
|
||||||
|
|
||||||
protected void LoadReplay()
|
protected void LoadReplay()
|
||||||
{
|
{
|
||||||
|
@ -4,12 +4,18 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Rulesets.Osu.Configuration;
|
||||||
using osu.Game.Screens.Play.PlayerSettings;
|
using osu.Game.Screens.Play.PlayerSettings;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.UI
|
namespace osu.Game.Rulesets.Osu.UI
|
||||||
{
|
{
|
||||||
public partial class OsuAnalysisSettings : AnalysisSettings
|
public partial class OsuAnalysisSettings : AnalysisSettings
|
||||||
{
|
{
|
||||||
|
public OsuAnalysisSettings(Ruleset ruleset)
|
||||||
|
: base(ruleset)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
[SettingSource("Hit markers", SettingControlType = typeof(PlayerCheckbox))]
|
[SettingSource("Hit markers", SettingControlType = typeof(PlayerCheckbox))]
|
||||||
public BindableBool HitMarkersEnabled { get; } = new BindableBool();
|
public BindableBool HitMarkersEnabled { get; } = new BindableBool();
|
||||||
|
|
||||||
@ -23,12 +29,13 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
public BindableBool CursorHideEnabled { get; } = new BindableBool();
|
public BindableBool CursorHideEnabled { get; } = new BindableBool();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(IRulesetConfigCache cache)
|
||||||
{
|
{
|
||||||
config.BindWith(OsuSetting.ReplayHitMarkersEnabled, HitMarkersEnabled);
|
var config = (OsuRulesetConfigManager)cache.GetConfigFor(Ruleset)!;
|
||||||
config.BindWith(OsuSetting.ReplayAimMarkersEnabled, AimMarkersEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayHitMarkersEnabled, HitMarkersEnabled);
|
||||||
config.BindWith(OsuSetting.ReplayAimLinesEnabled, AimLinesEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayAimMarkersEnabled, AimMarkersEnabled);
|
||||||
config.BindWith(OsuSetting.ReplayCursorHideEnabled, CursorHideEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayAimLinesEnabled, AimLinesEnabled);
|
||||||
|
config.BindWith(OsuRulesetSetting.ReplayCursorHideEnabled, CursorHideEnabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,12 +154,6 @@ namespace osu.Game.Configuration
|
|||||||
SetDefault(OsuSetting.IncreaseFirstObjectVisibility, true);
|
SetDefault(OsuSetting.IncreaseFirstObjectVisibility, true);
|
||||||
SetDefault(OsuSetting.GameplayDisableWinKey, true);
|
SetDefault(OsuSetting.GameplayDisableWinKey, true);
|
||||||
|
|
||||||
// Replay
|
|
||||||
SetDefault(OsuSetting.ReplayHitMarkersEnabled, false);
|
|
||||||
SetDefault(OsuSetting.ReplayAimMarkersEnabled, false);
|
|
||||||
SetDefault(OsuSetting.ReplayAimLinesEnabled, false);
|
|
||||||
SetDefault(OsuSetting.ReplayCursorHideEnabled, false);
|
|
||||||
|
|
||||||
// Update
|
// Update
|
||||||
SetDefault(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
SetDefault(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
|
||||||
|
|
||||||
@ -419,10 +413,6 @@ namespace osu.Game.Configuration
|
|||||||
EditorShowHitMarkers,
|
EditorShowHitMarkers,
|
||||||
EditorAutoSeekOnPlacement,
|
EditorAutoSeekOnPlacement,
|
||||||
DiscordRichPresence,
|
DiscordRichPresence,
|
||||||
ReplayHitMarkersEnabled,
|
|
||||||
ReplayAimMarkersEnabled,
|
|
||||||
ReplayAimLinesEnabled,
|
|
||||||
ReplayCursorHideEnabled,
|
|
||||||
|
|
||||||
ShowOnlineExplicitContent,
|
ShowOnlineExplicitContent,
|
||||||
LastProcessedMetadataId,
|
LastProcessedMetadataId,
|
||||||
|
@ -17,7 +17,6 @@ using osu.Game.Beatmaps.Legacy;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Extensions;
|
using osu.Game.Extensions;
|
||||||
using osu.Game.Overlays.Settings;
|
using osu.Game.Overlays.Settings;
|
||||||
using osu.Game.Replays;
|
|
||||||
using osu.Game.Rulesets.Configuration;
|
using osu.Game.Rulesets.Configuration;
|
||||||
using osu.Game.Rulesets.Difficulty;
|
using osu.Game.Rulesets.Difficulty;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
@ -409,7 +408,5 @@ namespace osu.Game.Rulesets
|
|||||||
public virtual bool EditorShowScrollSpeed => true;
|
public virtual bool EditorShowScrollSpeed => true;
|
||||||
|
|
||||||
public virtual DifficultySection? CreateEditorDifficultySection() => null;
|
public virtual DifficultySection? CreateEditorDifficultySection() => null;
|
||||||
|
|
||||||
public virtual AnalysisContainer? CreateAnalysisContainer(Replay replay, Playfield playfield) => null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,18 +10,18 @@ namespace osu.Game.Rulesets.UI
|
|||||||
public abstract partial class AnalysisContainer : Container
|
public abstract partial class AnalysisContainer : Container
|
||||||
{
|
{
|
||||||
protected Replay Replay;
|
protected Replay Replay;
|
||||||
protected Playfield Playfield;
|
protected DrawableRuleset DrawableRuleset;
|
||||||
|
|
||||||
public AnalysisSettings AnalysisSettings;
|
public AnalysisSettings AnalysisSettings;
|
||||||
|
|
||||||
public AnalysisContainer(Replay replay, Playfield playfield)
|
protected AnalysisContainer(Replay replay, DrawableRuleset drawableRuleset)
|
||||||
{
|
{
|
||||||
Replay = replay;
|
Replay = replay;
|
||||||
Playfield = playfield;
|
DrawableRuleset = drawableRuleset;
|
||||||
|
|
||||||
AnalysisSettings = CreateAnalysisSettings();
|
AnalysisSettings = CreateAnalysisSettings(drawableRuleset.Ruleset);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract AnalysisSettings CreateAnalysisSettings();
|
protected abstract AnalysisSettings CreateAnalysisSettings(Ruleset ruleset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -596,6 +596,8 @@ namespace osu.Game.Rulesets.UI
|
|||||||
/// Invoked when the user requests to pause while the resume overlay is active.
|
/// Invoked when the user requests to pause while the resume overlay is active.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract void CancelResume();
|
public abstract void CancelResume();
|
||||||
|
|
||||||
|
public virtual AnalysisContainer CreateAnalysisContainer(Replay replay) => null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BeatmapInvalidForRulesetException : ArgumentException
|
public class BeatmapInvalidForRulesetException : ArgumentException
|
||||||
|
@ -2,14 +2,19 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play.PlayerSettings
|
namespace osu.Game.Screens.Play.PlayerSettings
|
||||||
{
|
{
|
||||||
public partial class AnalysisSettings : PlayerSettingsGroup
|
public partial class AnalysisSettings : PlayerSettingsGroup
|
||||||
{
|
{
|
||||||
public AnalysisSettings()
|
protected Ruleset Ruleset;
|
||||||
|
|
||||||
|
public AnalysisSettings(Ruleset ruleset)
|
||||||
: base("Analysis Settings")
|
: base("Analysis Settings")
|
||||||
{
|
{
|
||||||
|
Ruleset = ruleset;
|
||||||
|
|
||||||
AddRange(this.CreateSettingsControls());
|
AddRange(this.CreateSettingsControls());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
HUDOverlay.PlayerSettingsOverlay.AddAtStart(playbackSettings);
|
HUDOverlay.PlayerSettingsOverlay.AddAtStart(playbackSettings);
|
||||||
|
|
||||||
var analysisContainer = DrawableRuleset.Ruleset.CreateAnalysisContainer(GameplayState.Score.Replay, DrawableRuleset.Playfield);
|
var analysisContainer = DrawableRuleset.CreateAnalysisContainer(GameplayState.Score.Replay);
|
||||||
|
|
||||||
if (analysisContainer != null)
|
if (analysisContainer != null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user