mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Move alpha adjustment back to LegacySliderBody
to correctly handle default legacy skin
This commit is contained in:
@ -5,6 +5,7 @@ using System;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osu.Game.Rulesets.Osu.Skinning.Default;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Utils;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -14,6 +15,12 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
{
|
||||
protected override DrawableSliderPath CreateSliderPath() => new LegacyDrawableSliderPath();
|
||||
|
||||
protected override Color4 GetBodyAccentColour(ISkinSource skin, Color4 hitObjectAccentColour)
|
||||
{
|
||||
// legacy skins use a constant value for slider track alpha, regardless of the source colour.
|
||||
return base.GetBodyAccentColour(skin, hitObjectAccentColour).Opacity(0.7f);
|
||||
}
|
||||
|
||||
private class LegacyDrawableSliderPath : DrawableSliderPath
|
||||
{
|
||||
private const float shadow_portion = 1 - (OsuLegacySkinTransformer.LEGACY_CIRCLE_RADIUS / OsuHitObject.OBJECT_RADIUS);
|
||||
|
@ -3,11 +3,9 @@
|
||||
|
||||
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
|
||||
{
|
||||
@ -120,23 +118,8 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
{
|
||||
switch (lookup)
|
||||
{
|
||||
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 OsuSkinColour colour:
|
||||
return base.GetConfig<SkinCustomColourLookup, TValue>(new SkinCustomColourLookup(colour));
|
||||
|
||||
case OsuSkinConfiguration osuLookup:
|
||||
switch (osuLookup)
|
||||
|
Reference in New Issue
Block a user