1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 22:37:26 +08:00
osu-lazer/osu.Game.Rulesets.Osu/UI/ReplayAnalysisSettings.cs

56 lines
2.2 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2024-09-03 16:49:50 +08:00
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Configuration;
2024-09-04 15:37:52 +08:00
using osu.Game.Rulesets.Osu.Configuration;
using osu.Game.Screens.Play.PlayerSettings;
namespace osu.Game.Rulesets.Osu.UI
{
2024-09-04 17:43:33 +08:00
public partial class ReplayAnalysisSettings : PlayerSettingsGroup
{
private readonly OsuRulesetConfigManager config;
[SettingSource("Show click markers", SettingControlType = typeof(PlayerCheckbox))]
public BindableBool ShowClickMarkers { get; } = new BindableBool();
[SettingSource("Show frame markers", SettingControlType = typeof(PlayerCheckbox))]
public BindableBool ShowAimMarkers { get; } = new BindableBool();
[SettingSource("Show cursor path", SettingControlType = typeof(PlayerCheckbox))]
public BindableBool ShowCursorPath { get; } = new BindableBool();
2024-02-28 11:03:45 +08:00
[SettingSource("Hide gameplay cursor", SettingControlType = typeof(PlayerCheckbox))]
public BindableBool HideSkinCursor { get; } = new BindableBool();
2024-09-03 16:49:50 +08:00
[SettingSource("Display length", SettingControlType = typeof(PlayerSliderBar<int>))]
public BindableInt DisplayLength { get; } = new BindableInt
{
2024-09-05 15:01:28 +08:00
MinValue = 200,
MaxValue = 2000,
2024-09-05 15:01:28 +08:00
Default = 800,
Precision = 200,
};
public ReplayAnalysisSettings(OsuRulesetConfigManager config)
: base("Analysis Settings")
{
this.config = config;
}
2024-09-03 16:49:50 +08:00
[BackgroundDependencyLoader]
private void load()
2024-09-03 16:49:50 +08:00
{
AddRange(this.CreateSettingsControls());
config.BindWith(OsuRulesetSetting.ReplayClickMarkersEnabled, ShowClickMarkers);
config.BindWith(OsuRulesetSetting.ReplayFrameMarkersEnabled, ShowAimMarkers);
config.BindWith(OsuRulesetSetting.ReplayCursorPathEnabled, ShowCursorPath);
config.BindWith(OsuRulesetSetting.ReplayCursorHideEnabled, HideSkinCursor);
config.BindWith(OsuRulesetSetting.ReplayAnalysisDisplayLength, DisplayLength);
2024-09-03 16:49:50 +08:00
}
}
2024-02-23 08:01:52 +08:00
}