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
|
|
|
|
{
|
|
|
|
public partial class OsuAnalysisSettings : AnalysisSettings
|
|
|
|
{
|
2024-09-04 07:37:52 +00:00
|
|
|
public OsuAnalysisSettings(Ruleset ruleset)
|
|
|
|
: base(ruleset)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-09-03 04:59:42 +00:00
|
|
|
[SettingSource("Hit markers", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool HitMarkersEnabled { get; } = new BindableBool();
|
2024-02-01 15:19:09 +00:00
|
|
|
|
2024-09-03 04:59:42 +00:00
|
|
|
[SettingSource("Aim markers", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool AimMarkersEnabled { get; } = new BindableBool();
|
2024-02-01 15:19:09 +00:00
|
|
|
|
2024-09-03 04:59:42 +00:00
|
|
|
[SettingSource("Aim lines", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool AimLinesEnabled { get; } = new BindableBool();
|
2024-02-28 03:03:45 +00:00
|
|
|
|
2024-09-03 04:59:42 +00:00
|
|
|
[SettingSource("Hide cursor", SettingControlType = typeof(PlayerCheckbox))]
|
|
|
|
public BindableBool CursorHideEnabled { get; } = new BindableBool();
|
2024-09-03 08:49:50 +00:00
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2024-09-04 07:37:52 +00:00
|
|
|
private void load(IRulesetConfigCache cache)
|
2024-09-03 08:49:50 +00:00
|
|
|
{
|
2024-09-04 07:37:52 +00:00
|
|
|
var config = (OsuRulesetConfigManager)cache.GetConfigFor(Ruleset)!;
|
|
|
|
config.BindWith(OsuRulesetSetting.ReplayHitMarkersEnabled, HitMarkersEnabled);
|
|
|
|
config.BindWith(OsuRulesetSetting.ReplayAimMarkersEnabled, AimMarkersEnabled);
|
|
|
|
config.BindWith(OsuRulesetSetting.ReplayAimLinesEnabled, AimLinesEnabled);
|
|
|
|
config.BindWith(OsuRulesetSetting.ReplayCursorHideEnabled, CursorHideEnabled);
|
2024-09-03 08:49:50 +00:00
|
|
|
}
|
2024-02-01 15:19:09 +00:00
|
|
|
}
|
2024-02-23 00:01:52 +00:00
|
|
|
}
|