mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +08:00
Fix ConstrainedIconContainer always using masking
This commit is contained in:
parent
e260e75fac
commit
42e4c933d3
@ -92,7 +92,6 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Colour = Color4.Black.Opacity(0.06f),
|
||||
|
||||
Type = EdgeEffectType.Shadow,
|
||||
Radius = 3,
|
||||
},
|
||||
|
@ -4,7 +4,6 @@
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Graphics.Containers
|
||||
@ -17,21 +16,9 @@ namespace osu.Game.Graphics.Containers
|
||||
public Drawable Icon
|
||||
{
|
||||
get => InternalChild;
|
||||
|
||||
set => InternalChild = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines an edge effect of this <see cref="Container"/>.
|
||||
/// Edge effects are e.g. glow or a shadow.
|
||||
/// Only has an effect when <see cref="CompositeDrawable.Masking"/> is true.
|
||||
/// </summary>
|
||||
public new EdgeEffectParameters EdgeEffect
|
||||
{
|
||||
get => base.EdgeEffect;
|
||||
set => base.EdgeEffect = value;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
@ -49,10 +36,5 @@ namespace osu.Game.Graphics.Containers
|
||||
InternalChild.Origin = Anchor.Centre;
|
||||
}
|
||||
}
|
||||
|
||||
public ConstrainedIconContainer()
|
||||
{
|
||||
Masking = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Effects;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
@ -58,15 +57,7 @@ namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
set => Scheduler.AddOnce(() =>
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
IconContainer.Colour = Color4Extensions.FromHex("#00FFAA");
|
||||
}
|
||||
else
|
||||
{
|
||||
IconContainer.Colour = colours.GrayF;
|
||||
IconContainer.EdgeEffect = new EdgeEffectParameters();
|
||||
}
|
||||
IconContainer.Colour = value ? Color4Extensions.FromHex("#00FFAA") : colours.GrayF;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user