2024-02-01 15:19:09 +00:00
|
|
|
// 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 08:49:50 +00:00
|
|
|
using osu.Framework.Allocation;
|
2024-02-01 15:19:09 +00:00
|
|
|
using osu.Framework.Bindables;
|
2024-09-03 04:59:42 +00:00
|
|
|
using osu.Game.Configuration;
|
2024-09-04 07:37:52 +00:00
|
|
|
using osu.Game.Rulesets.Osu.Configuration;
|
2024-02-01 15:19:09 +00:00
|
|
|
using osu.Game.Screens.Play.PlayerSettings;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.UI
|
|
|
|
{
|
2024-09-04 09:43:33 +00:00
|
|
|
public partial class ReplayAnalysisSettings : PlayerSettingsGroup
|
2024-02-01 15:19:09 +00:00
|
|
|
{
|
2024-09-04 10:28:07 +00:00
|
|
|
private readonly OsuRulesetConfigManager config;
|
|
|
|
|
2024-09-05 06:15:15 +00:00
|
|
|
[SettingSource("Show click markers", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool ShowClickMarkers { get; } = new BindableBool();
|
2024-02-01 15:19:09 +00:00
|
|
|
|
2024-09-05 06:15:15 +00:00
|
|
|
[SettingSource("Show frame markers", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool ShowAimMarkers { get; } = new BindableBool();
|
2024-02-01 15:19:09 +00:00
|
|
|
|
2024-09-05 06:15:15 +00:00
|
|
|
[SettingSource("Show cursor path", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool ShowCursorPath { get; } = new BindableBool();
|
2024-02-28 03:03:45 +00:00
|
|
|
|
2024-09-05 06:15:15 +00:00
|
|
|
[SettingSource("Hide gameplay cursor", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool HideSkinCursor { get; } = new BindableBool();
|
2024-09-03 08:49:50 +00:00
|
|
|
|
2024-09-05 06:53:53 +00:00
|
|
|
[SettingSource("Display length", SettingControlType = typeof(PlayerSliderBar<int>))]
|
|
|
|
public BindableInt DisplayLength { get; } = new BindableInt
|
|
|
|
{
|
2024-09-05 07:01:28 +00:00
|
|
|
MinValue = 200,
|
2024-09-05 06:53:53 +00:00
|
|
|
MaxValue = 2000,
|
2024-09-05 07:01:28 +00:00
|
|
|
Default = 800,
|
|
|
|
Precision = 200,
|
2024-09-05 06:53:53 +00:00
|
|
|
};
|
|
|
|
|
2024-09-04 10:28:07 +00:00
|
|
|
public ReplayAnalysisSettings(OsuRulesetConfigManager config)
|
2024-09-04 09:35:27 +00:00
|
|
|
: base("Analysis Settings")
|
|
|
|
{
|
2024-09-04 10:28:07 +00:00
|
|
|
this.config = config;
|
2024-09-04 09:35:27 +00:00
|
|
|
}
|
|
|
|
|
2024-09-03 08:49:50 +00:00
|
|
|
[BackgroundDependencyLoader]
|
2024-09-04 10:28:07 +00:00
|
|
|
private void load()
|
2024-09-03 08:49:50 +00:00
|
|
|
{
|
2024-09-04 09:35:27 +00:00
|
|
|
AddRange(this.CreateSettingsControls());
|
|
|
|
|
2024-09-05 06:15:15 +00:00
|
|
|
config.BindWith(OsuRulesetSetting.ReplayClickMarkersEnabled, ShowClickMarkers);
|
|
|
|
config.BindWith(OsuRulesetSetting.ReplayFrameMarkersEnabled, ShowAimMarkers);
|
|
|
|
config.BindWith(OsuRulesetSetting.ReplayCursorPathEnabled, ShowCursorPath);
|
|
|
|
config.BindWith(OsuRulesetSetting.ReplayCursorHideEnabled, HideSkinCursor);
|
2024-09-05 06:53:53 +00:00
|
|
|
config.BindWith(OsuRulesetSetting.ReplayAnalysisDisplayLength, DisplayLength);
|
2024-09-03 08:49:50 +00:00
|
|
|
}
|
2024-02-01 15:19:09 +00:00
|
|
|
}
|
2024-02-23 00:01:52 +00:00
|
|
|
}
|