mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix test failures and rename configuration value to match better
This commit is contained in:
@ -31,6 +31,8 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
{
|
{
|
||||||
config.BindWith(OsuSetting.BeatmapSkins, BeatmapSkins);
|
config.BindWith(OsuSetting.BeatmapSkins, BeatmapSkins);
|
||||||
config.BindWith(OsuSetting.BeatmapColours, BeatmapColours);
|
config.BindWith(OsuSetting.BeatmapColours, BeatmapColours);
|
||||||
|
|
||||||
|
config.SetValue(OsuSetting.ComboColourNormalisationAmount, 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(true, true)]
|
[TestCase(true, true)]
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -13,6 +14,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Objects.Legacy;
|
using osu.Game.Rulesets.Objects.Legacy;
|
||||||
using osu.Game.Rulesets.Objects.Types;
|
using osu.Game.Rulesets.Objects.Types;
|
||||||
@ -25,10 +27,20 @@ namespace osu.Game.Tests.Gameplay
|
|||||||
[HeadlessTest]
|
[HeadlessTest]
|
||||||
public class TestSceneHitObjectAccentColour : OsuTestScene
|
public class TestSceneHitObjectAccentColour : OsuTestScene
|
||||||
{
|
{
|
||||||
|
[Resolved]
|
||||||
|
private OsuConfigManager config { get; set; }
|
||||||
|
|
||||||
private Container skinContainer;
|
private Container skinContainer;
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void Setup() => Schedule(() => Child = skinContainer = new SkinProvidingContainer(new TestSkin()));
|
public void Setup()
|
||||||
|
{
|
||||||
|
Schedule(() =>
|
||||||
|
{
|
||||||
|
config.SetValue(OsuSetting.ComboColourNormalisationAmount, 0f);
|
||||||
|
Child = skinContainer = new SkinProvidingContainer(new TestSkin());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestChangeComboIndexBeforeLoad()
|
public void TestChangeComboIndexBeforeLoad()
|
||||||
|
@ -175,7 +175,7 @@ namespace osu.Game.Configuration
|
|||||||
|
|
||||||
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
||||||
|
|
||||||
SetDefault(OsuSetting.ComboColourNormalisation, 0.2f, 0f, 1f, 0.01f);
|
SetDefault(OsuSetting.ComboColourNormalisationAmount, 0.2f, 0f, 1f, 0.01f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
||||||
@ -367,6 +367,6 @@ namespace osu.Game.Configuration
|
|||||||
ShowOnlineExplicitContent,
|
ShowOnlineExplicitContent,
|
||||||
LastProcessedMetadataId,
|
LastProcessedMetadataId,
|
||||||
SafeAreaConsiderations,
|
SafeAreaConsiderations,
|
||||||
ComboColourNormalisation,
|
ComboColourNormalisationAmount,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
config.BindWith(OsuSetting.ComboColourNormalisation, comboColourNormalisation);
|
config.BindWith(OsuSetting.ComboColourNormalisationAmount, comboColourNormalisation);
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
private void load(OsuConfigManager config, ISkinSource skinSource)
|
private void load(OsuConfigManager config, ISkinSource skinSource)
|
||||||
{
|
{
|
||||||
config.BindWith(OsuSetting.PositionalHitsoundsLevel, positionalHitsoundsLevel);
|
config.BindWith(OsuSetting.PositionalHitsoundsLevel, positionalHitsoundsLevel);
|
||||||
config.BindWith(OsuSetting.ComboColourNormalisation, comboColourBrightness);
|
config.BindWith(OsuSetting.ComboColourNormalisationAmount, comboColourBrightness);
|
||||||
|
|
||||||
// Explicit non-virtual function call in case a DrawableHitObject overrides AddInternal.
|
// Explicit non-virtual function call in case a DrawableHitObject overrides AddInternal.
|
||||||
base.AddInternal(Samples = new PausableSkinnableSound());
|
base.AddInternal(Samples = new PausableSkinnableSound());
|
||||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
showStoryboardToggle.Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
showStoryboardToggle.Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard);
|
||||||
beatmapSkinsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
beatmapSkinsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
||||||
beatmapColorsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapColours);
|
beatmapColorsToggle.Current = config.GetBindable<bool>(OsuSetting.BeatmapColours);
|
||||||
comboColourNormalisationSliderBar.Current = config.GetBindable<float>(OsuSetting.ComboColourNormalisation);
|
comboColourNormalisationSliderBar.Current = config.GetBindable<float>(OsuSetting.ComboColourNormalisationAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user