mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Fix traceable sliders incorrectly being opaque
Closes https://github.com/ppy/osu/issues/14449. Regressed in https://github.com/ppy/osu/pull/14205.
This commit is contained in:
parent
d6a0d2aa44
commit
3f93aa1507
@ -22,8 +22,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
// Roughly matches osu!stable's slider border portions.
|
||||
=> base.CalculatedBorderPortion * 0.77f;
|
||||
|
||||
public new Color4 AccentColour => new Color4(base.AccentColour.R, base.AccentColour.G, base.AccentColour.B, 0.7f);
|
||||
|
||||
protected override Color4 ColourAt(float position)
|
||||
{
|
||||
float realBorderPortion = shadow_portion + CalculatedBorderPortion;
|
||||
|
@ -3,9 +3,11 @@
|
||||
|
||||
using System;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
{
|
||||
@ -118,8 +120,23 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
{
|
||||
switch (lookup)
|
||||
{
|
||||
case OsuSkinColour colour:
|
||||
return base.GetConfig<SkinCustomColourLookup, TValue>(new SkinCustomColourLookup(colour));
|
||||
case OsuSkinColour colourLookup:
|
||||
var colour = base.GetConfig<SkinCustomColourLookup, TValue>(new SkinCustomColourLookup(colourLookup));
|
||||
|
||||
if (colour == null)
|
||||
return null;
|
||||
|
||||
switch (colourLookup)
|
||||
{
|
||||
case OsuSkinColour.SliderTrackOverride:
|
||||
var bindableColour = ((Bindable<Color4>)colour);
|
||||
|
||||
// legacy skins use a constant value for slider track alpha, regardless of the source colour.
|
||||
bindableColour.Value = bindableColour.Value.Opacity(0.7f);
|
||||
break;
|
||||
}
|
||||
|
||||
return colour;
|
||||
|
||||
case OsuSkinConfiguration osuLookup:
|
||||
switch (osuLookup)
|
||||
|
Loading…
Reference in New Issue
Block a user