mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 08:22:56 +08:00
Fix minor issues with alpha fading at edges.
This commit is contained in:
parent
5cf5e8c80c
commit
030a20a3f2
@ -22,16 +22,14 @@ namespace osu.Game.Beatmaps.Drawable
|
|||||||
public Panel()
|
public Panel()
|
||||||
{
|
{
|
||||||
Height = MAX_HEIGHT;
|
Height = MAX_HEIGHT;
|
||||||
|
|
||||||
Masking = true;
|
|
||||||
CornerRadius = 10;
|
|
||||||
BorderColour = new Color4(221, 255, 255, 255);
|
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
|
||||||
AddInternal(nestedContainer = new Container
|
AddInternal(nestedContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Masking = true,
|
||||||
|
CornerRadius = 10,
|
||||||
|
BorderColour = new Color4(221, 255, 255, 255),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,9 +75,8 @@ namespace osu.Game.Beatmaps.Drawable
|
|||||||
|
|
||||||
protected virtual void Selected()
|
protected virtual void Selected()
|
||||||
{
|
{
|
||||||
BorderThickness = 2.5f;
|
nestedContainer.BorderThickness = 2.5f;
|
||||||
|
nestedContainer.EdgeEffect = new EdgeEffect
|
||||||
EdgeEffect = new EdgeEffect
|
|
||||||
{
|
{
|
||||||
Type = EdgeEffectType.Glow,
|
Type = EdgeEffectType.Glow,
|
||||||
Colour = new Color4(130, 204, 255, 150),
|
Colour = new Color4(130, 204, 255, 150),
|
||||||
@ -90,9 +87,8 @@ namespace osu.Game.Beatmaps.Drawable
|
|||||||
|
|
||||||
protected virtual void Deselected()
|
protected virtual void Deselected()
|
||||||
{
|
{
|
||||||
BorderThickness = 0;
|
nestedContainer.BorderThickness = 0;
|
||||||
|
nestedContainer.EdgeEffect = new EdgeEffect
|
||||||
EdgeEffect = new EdgeEffect
|
|
||||||
{
|
{
|
||||||
Type = EdgeEffectType.Shadow,
|
Type = EdgeEffectType.Shadow,
|
||||||
Offset = new Vector2(1),
|
Offset = new Vector2(1),
|
||||||
|
@ -176,7 +176,7 @@ namespace osu.Game.Screens.Select
|
|||||||
float halfHeight = drawHeight / 2;
|
float halfHeight = drawHeight / 2;
|
||||||
foreach (Panel panel in scrollableContent.Children)
|
foreach (Panel panel in scrollableContent.Children)
|
||||||
{
|
{
|
||||||
float panelDrawY = panel.Position.Y - Current;
|
float panelDrawY = panel.Position.Y - Current + panel.DrawHeight / 2;
|
||||||
float dist = Math.Abs(1f - panelDrawY / halfHeight);
|
float dist = Math.Abs(1f - panelDrawY / halfHeight);
|
||||||
|
|
||||||
// Setting the origin position serves as an additive position on top of potential
|
// Setting the origin position serves as an additive position on top of potential
|
||||||
|
Loading…
Reference in New Issue
Block a user