mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Rename config variables and setting strings
This commit is contained in:
parent
7983a765ab
commit
47a9b345eb
@ -40,9 +40,9 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
settings = new ReplayAnalysisSettings(config),
|
settings = new ReplayAnalysisSettings(config),
|
||||||
};
|
};
|
||||||
|
|
||||||
settings.HitMarkersEnabled.Value = false;
|
settings.ShowClickMarkers.Value = false;
|
||||||
settings.AimMarkersEnabled.Value = false;
|
settings.ShowAimMarkers.Value = false;
|
||||||
settings.AimLinesEnabled.Value = false;
|
settings.ShowCursorPath.Value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,36 +51,36 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
{
|
{
|
||||||
AddStep("enable everything", () =>
|
AddStep("enable everything", () =>
|
||||||
{
|
{
|
||||||
settings.HitMarkersEnabled.Value = true;
|
settings.ShowClickMarkers.Value = true;
|
||||||
settings.AimMarkersEnabled.Value = true;
|
settings.ShowAimMarkers.Value = true;
|
||||||
settings.AimLinesEnabled.Value = true;
|
settings.ShowCursorPath.Value = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestHitMarkers()
|
public void TestHitMarkers()
|
||||||
{
|
{
|
||||||
AddStep("enable hit markers", () => settings.HitMarkersEnabled.Value = true);
|
AddStep("enable hit markers", () => settings.ShowClickMarkers.Value = true);
|
||||||
AddAssert("hit markers visible", () => analysisContainer.HitMarkersVisible);
|
AddAssert("hit markers visible", () => analysisContainer.HitMarkersVisible);
|
||||||
AddStep("disable hit markers", () => settings.HitMarkersEnabled.Value = false);
|
AddStep("disable hit markers", () => settings.ShowClickMarkers.Value = false);
|
||||||
AddAssert("hit markers not visible", () => !analysisContainer.HitMarkersVisible);
|
AddAssert("hit markers not visible", () => !analysisContainer.HitMarkersVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestAimMarker()
|
public void TestAimMarker()
|
||||||
{
|
{
|
||||||
AddStep("enable aim markers", () => settings.AimMarkersEnabled.Value = true);
|
AddStep("enable aim markers", () => settings.ShowAimMarkers.Value = true);
|
||||||
AddAssert("aim markers visible", () => analysisContainer.AimMarkersVisible);
|
AddAssert("aim markers visible", () => analysisContainer.AimMarkersVisible);
|
||||||
AddStep("disable aim markers", () => settings.AimMarkersEnabled.Value = false);
|
AddStep("disable aim markers", () => settings.ShowAimMarkers.Value = false);
|
||||||
AddAssert("aim markers not visible", () => !analysisContainer.AimMarkersVisible);
|
AddAssert("aim markers not visible", () => !analysisContainer.AimMarkersVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestAimLines()
|
public void TestAimLines()
|
||||||
{
|
{
|
||||||
AddStep("enable aim lines", () => settings.AimLinesEnabled.Value = true);
|
AddStep("enable aim lines", () => settings.ShowCursorPath.Value = true);
|
||||||
AddAssert("aim lines visible", () => analysisContainer.AimLinesVisible);
|
AddAssert("aim lines visible", () => analysisContainer.AimLinesVisible);
|
||||||
AddStep("disable aim lines", () => settings.AimLinesEnabled.Value = false);
|
AddStep("disable aim lines", () => settings.ShowCursorPath.Value = false);
|
||||||
AddAssert("aim lines not visible", () => !analysisContainer.AimLinesVisible);
|
AddAssert("aim lines not visible", () => !analysisContainer.AimLinesVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
|||||||
SetDefault(OsuRulesetSetting.ShowCursorRipples, false);
|
SetDefault(OsuRulesetSetting.ShowCursorRipples, false);
|
||||||
SetDefault(OsuRulesetSetting.PlayfieldBorderStyle, PlayfieldBorderStyle.None);
|
SetDefault(OsuRulesetSetting.PlayfieldBorderStyle, PlayfieldBorderStyle.None);
|
||||||
|
|
||||||
SetDefault(OsuRulesetSetting.ReplayHitMarkersEnabled, false);
|
SetDefault(OsuRulesetSetting.ReplayClickMarkersEnabled, false);
|
||||||
SetDefault(OsuRulesetSetting.ReplayAimMarkersEnabled, false);
|
SetDefault(OsuRulesetSetting.ReplayFrameMarkersEnabled, false);
|
||||||
SetDefault(OsuRulesetSetting.ReplayAimLinesEnabled, false);
|
SetDefault(OsuRulesetSetting.ReplayCursorPathEnabled, false);
|
||||||
SetDefault(OsuRulesetSetting.ReplayCursorHideEnabled, false);
|
SetDefault(OsuRulesetSetting.ReplayCursorHideEnabled, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,9 +39,9 @@ namespace osu.Game.Rulesets.Osu.Configuration
|
|||||||
PlayfieldBorderStyle,
|
PlayfieldBorderStyle,
|
||||||
|
|
||||||
// Replay
|
// Replay
|
||||||
ReplayHitMarkersEnabled,
|
ReplayClickMarkersEnabled,
|
||||||
ReplayAimMarkersEnabled,
|
ReplayFrameMarkersEnabled,
|
||||||
ReplayAimLinesEnabled,
|
ReplayCursorPathEnabled,
|
||||||
ReplayCursorHideEnabled,
|
ReplayCursorHideEnabled,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
public partial class ReplayAnalysisOverlay : CompositeDrawable
|
public partial class ReplayAnalysisOverlay : CompositeDrawable
|
||||||
{
|
{
|
||||||
private BindableBool hitMarkersEnabled { get; } = new BindableBool();
|
private BindableBool showClickMarkers { get; } = new BindableBool();
|
||||||
private BindableBool aimMarkersEnabled { get; } = new BindableBool();
|
private BindableBool showFrameMarkers { get; } = new BindableBool();
|
||||||
private BindableBool aimLinesEnabled { get; } = new BindableBool();
|
private BindableBool showCursorPath { get; } = new BindableBool();
|
||||||
|
|
||||||
protected readonly ClickMarkerContainer ClickMarkers;
|
protected readonly ClickMarkerContainer ClickMarkers;
|
||||||
protected readonly FrameMarkerContainer FrameMarkers;
|
protected readonly FrameMarkerContainer FrameMarkers;
|
||||||
@ -43,18 +43,18 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
loadReplay();
|
loadReplay();
|
||||||
|
|
||||||
config.BindWith(OsuRulesetSetting.ReplayHitMarkersEnabled, hitMarkersEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayClickMarkersEnabled, showClickMarkers);
|
||||||
config.BindWith(OsuRulesetSetting.ReplayAimMarkersEnabled, aimMarkersEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayFrameMarkersEnabled, showFrameMarkers);
|
||||||
config.BindWith(OsuRulesetSetting.ReplayAimLinesEnabled, aimLinesEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayCursorPathEnabled, showCursorPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
hitMarkersEnabled.BindValueChanged(enabled => ClickMarkers.FadeTo(enabled.NewValue ? 1 : 0), true);
|
showClickMarkers.BindValueChanged(enabled => ClickMarkers.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||||
aimMarkersEnabled.BindValueChanged(enabled => FrameMarkers.FadeTo(enabled.NewValue ? 1 : 0), true);
|
showFrameMarkers.BindValueChanged(enabled => FrameMarkers.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||||
aimLinesEnabled.BindValueChanged(enabled => CursorPath.FadeTo(enabled.NewValue ? 1 : 0), true);
|
showCursorPath.BindValueChanged(enabled => CursorPath.FadeTo(enabled.NewValue ? 1 : 0), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadReplay()
|
private void loadReplay()
|
||||||
|
@ -13,17 +13,17 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
private readonly OsuRulesetConfigManager config;
|
private readonly OsuRulesetConfigManager config;
|
||||||
|
|
||||||
[SettingSource("Hit markers", SettingControlType = typeof(PlayerCheckbox))]
|
[SettingSource("Show click markers", SettingControlType = typeof(PlayerCheckbox))]
|
||||||
public BindableBool HitMarkersEnabled { get; } = new BindableBool();
|
public BindableBool ShowClickMarkers { get; } = new BindableBool();
|
||||||
|
|
||||||
[SettingSource("Aim markers", SettingControlType = typeof(PlayerCheckbox))]
|
[SettingSource("Show frame markers", SettingControlType = typeof(PlayerCheckbox))]
|
||||||
public BindableBool AimMarkersEnabled { get; } = new BindableBool();
|
public BindableBool ShowAimMarkers { get; } = new BindableBool();
|
||||||
|
|
||||||
[SettingSource("Aim lines", SettingControlType = typeof(PlayerCheckbox))]
|
[SettingSource("Show cursor path", SettingControlType = typeof(PlayerCheckbox))]
|
||||||
public BindableBool AimLinesEnabled { get; } = new BindableBool();
|
public BindableBool ShowCursorPath { get; } = new BindableBool();
|
||||||
|
|
||||||
[SettingSource("Hide cursor", SettingControlType = typeof(PlayerCheckbox))]
|
[SettingSource("Hide gameplay cursor", SettingControlType = typeof(PlayerCheckbox))]
|
||||||
public BindableBool CursorHideEnabled { get; } = new BindableBool();
|
public BindableBool HideSkinCursor { get; } = new BindableBool();
|
||||||
|
|
||||||
public ReplayAnalysisSettings(OsuRulesetConfigManager config)
|
public ReplayAnalysisSettings(OsuRulesetConfigManager config)
|
||||||
: base("Analysis Settings")
|
: base("Analysis Settings")
|
||||||
@ -36,10 +36,10 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
AddRange(this.CreateSettingsControls());
|
AddRange(this.CreateSettingsControls());
|
||||||
|
|
||||||
config.BindWith(OsuRulesetSetting.ReplayHitMarkersEnabled, HitMarkersEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayClickMarkersEnabled, ShowClickMarkers);
|
||||||
config.BindWith(OsuRulesetSetting.ReplayAimMarkersEnabled, AimMarkersEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayFrameMarkersEnabled, ShowAimMarkers);
|
||||||
config.BindWith(OsuRulesetSetting.ReplayAimLinesEnabled, AimLinesEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayCursorPathEnabled, ShowCursorPath);
|
||||||
config.BindWith(OsuRulesetSetting.ReplayCursorHideEnabled, CursorHideEnabled);
|
config.BindWith(OsuRulesetSetting.ReplayCursorHideEnabled, HideSkinCursor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user