mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Remove toggle and change method of application to blend with original colour
This commit is contained in:
@ -175,8 +175,7 @@ namespace osu.Game.Configuration
|
|||||||
|
|
||||||
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
||||||
|
|
||||||
SetDefault(OsuSetting.NormaliseComboColourBrightness, false);
|
SetDefault(OsuSetting.ComboColourBrightness, 0f, -1f, 1f, 1f);
|
||||||
SetDefault(OsuSetting.ComboColourBrightness, 0.7f, 0f, 1f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
protected override bool CheckLookupContainsPrivateInformation(OsuSetting lookup)
|
||||||
@ -367,7 +366,6 @@ namespace osu.Game.Configuration
|
|||||||
AutomaticallyDownloadWhenSpectating,
|
AutomaticallyDownloadWhenSpectating,
|
||||||
ShowOnlineExplicitContent,
|
ShowOnlineExplicitContent,
|
||||||
LastProcessedMetadataId,
|
LastProcessedMetadataId,
|
||||||
NormaliseComboColourBrightness,
|
|
||||||
SafeAreaConsiderations,
|
SafeAreaConsiderations,
|
||||||
ComboColourBrightness,
|
ComboColourBrightness,
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
protected override LocalisableString Header => GameplaySettingsStrings.BeatmapHeader;
|
protected override LocalisableString Header => GameplaySettingsStrings.BeatmapHeader;
|
||||||
|
|
||||||
private readonly BindableFloat comboColourBrightness = new BindableFloat();
|
private readonly BindableFloat comboColourBrightness = new BindableFloat();
|
||||||
private readonly BindableBool normaliseComboColourBrightness = new BindableBool();
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
config.BindWith(OsuSetting.ComboColourBrightness, comboColourBrightness);
|
config.BindWith(OsuSetting.ComboColourBrightness, comboColourBrightness);
|
||||||
config.BindWith(OsuSetting.NormaliseComboColourBrightness, normaliseComboColourBrightness);
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -47,11 +45,6 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
LabelText = GraphicsSettingsStrings.StoryboardVideo,
|
LabelText = GraphicsSettingsStrings.StoryboardVideo,
|
||||||
Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard)
|
Current = config.GetBindable<bool>(OsuSetting.ShowStoryboard)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
|
||||||
{
|
|
||||||
LabelText = "Normalise combo colour brightness",
|
|
||||||
Current = normaliseComboColourBrightness
|
|
||||||
},
|
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
LabelText = "Combo colour brightness",
|
LabelText = "Combo colour brightness",
|
||||||
@ -60,12 +53,5 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
base.LoadComplete();
|
|
||||||
|
|
||||||
normaliseComboColourBrightness.BindValueChanged(normalise => comboColourBrightness.Disabled = !normalise.NewValue, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ using osu.Framework.Extensions.TypeExtensions;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Primitives;
|
using osu.Framework.Graphics.Primitives;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -174,7 +175,6 @@ 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.NormaliseComboColourBrightness, normaliseComboColourBrightness);
|
|
||||||
config.BindWith(OsuSetting.ComboColourBrightness, comboColourBrightness);
|
config.BindWith(OsuSetting.ComboColourBrightness, comboColourBrightness);
|
||||||
|
|
||||||
// Explicit non-virtual function call in case a DrawableHitObject overrides AddInternal.
|
// Explicit non-virtual function call in case a DrawableHitObject overrides AddInternal.
|
||||||
@ -522,8 +522,12 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
Color4 colour = combo.GetComboColour(CurrentSkin);
|
Color4 colour = combo.GetComboColour(CurrentSkin);
|
||||||
|
|
||||||
// Normalise the combo colour to the given brightness level.
|
// Normalise the combo colour to the given brightness level.
|
||||||
if (normaliseComboColourBrightness.Value)
|
if (comboColourBrightness.Value != 0)
|
||||||
colour = new HSPAColour(colour) { P = comboColourBrightness.Value }.ToColor4();
|
{
|
||||||
|
float pAdjust = 0.6f + 0.4f * comboColourBrightness.Value;
|
||||||
|
|
||||||
|
colour = Interpolation.ValueAt(Math.Abs(comboColourBrightness.Value), colour, new HSPAColour(colour) { P = pAdjust }.ToColor4(), 0, 1, Easing.Out);
|
||||||
|
}
|
||||||
|
|
||||||
AccentColour.Value = colour;
|
AccentColour.Value = colour;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user