mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Change range to 0-100% and rename to "normalisation"
This commit is contained in:
@ -175,7 +175,7 @@ namespace osu.Game.Configuration
|
|||||||
|
|
||||||
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
SetDefault(OsuSetting.LastProcessedMetadataId, -1);
|
||||||
|
|
||||||
SetDefault(OsuSetting.ComboColourBrightness, 0f, -1f, 1f, 1f);
|
SetDefault(OsuSetting.ComboColourNormalisation, 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,
|
||||||
ComboColourBrightness,
|
ComboColourNormalisation,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,12 +16,12 @@ 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 comboColourNormalisation = new BindableFloat();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
config.BindWith(OsuSetting.ComboColourBrightness, comboColourBrightness);
|
config.BindWith(OsuSetting.ComboColourNormalisation, comboColourNormalisation);
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -47,8 +47,8 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
},
|
},
|
||||||
new SettingsSlider<float>
|
new SettingsSlider<float>
|
||||||
{
|
{
|
||||||
LabelText = "Combo colour brightness",
|
LabelText = "Combo colour normalisation",
|
||||||
Current = comboColourBrightness,
|
Current = comboColourNormalisation,
|
||||||
DisplayAsPercentage = true,
|
DisplayAsPercentage = true,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -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.ComboColourBrightness, comboColourBrightness);
|
config.BindWith(OsuSetting.ComboColourNormalisation, 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());
|
||||||
@ -524,9 +524,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
// Normalise the combo colour to the given brightness level.
|
// Normalise the combo colour to the given brightness level.
|
||||||
if (comboColourBrightness.Value != 0)
|
if (comboColourBrightness.Value != 0)
|
||||||
{
|
{
|
||||||
float pAdjust = 0.6f + 0.4f * comboColourBrightness.Value;
|
colour = Interpolation.ValueAt(Math.Abs(comboColourBrightness.Value), colour, new HSPAColour(colour) { P = 0.6f }.ToColor4(), 0, 1);
|
||||||
|
|
||||||
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