1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:57:24 +08:00
osu-lazer/osu.Game.Rulesets.Osu/UI/OsuAnalysisSettings.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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