1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 22:21:10 +08:00

Merge pull request #30580 from peppy/song-select-less-semi-opaque

Reduce semi-opaque layers at song select
This commit is contained in:
Bartłomiej Dach
2024-11-11 12:23:17 +01:00
committed by GitHub
Unverified
4 changed files with 6 additions and 14 deletions
@@ -1116,11 +1116,6 @@ namespace osu.Game.Screens.Select
// adjusting the item's overall X position can cause it to become masked away when
// child items (difficulties) are still visible.
item.Header.X = offsetX(dist, visibleHalfHeight) - (parent?.X ?? 0);
// We are applying a multiplicative alpha (which is internally done by nesting an
// additional container and setting that container's alpha) such that we can
// layer alpha transformations on top.
item.SetMultiplicativeAlpha(Math.Clamp(1.75f - 1.5f * dist, 0, 1));
}
private enum PendingScrollOperation
@@ -86,8 +86,6 @@ namespace osu.Game.Screens.Select.Carousel
};
}
public void SetMultiplicativeAlpha(float alpha) => Header.BorderContainer.Alpha = alpha;
protected override void LoadComplete()
{
base.LoadComplete();
+2 -3
View File
@@ -28,7 +28,6 @@ using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Select.Filter;
using osuTK;
using osuTK.Graphics;
using osuTK.Input;
namespace osu.Game.Screens.Select
@@ -97,8 +96,8 @@ namespace osu.Game.Screens.Select
{
new Box
{
Colour = Color4.Black,
Alpha = 0.8f,
Colour = OsuColour.Gray(0.05f),
Alpha = 0.96f,
Width = 2,
RelativeSizeAxes = Axes.Both,
},
+4 -4
View File
@@ -6,12 +6,11 @@
using System.Collections.Generic;
using System.Linq;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Select
@@ -82,14 +81,15 @@ namespace osu.Game.Screens.Select
{
RelativeSizeAxes = Axes.Both,
Size = Vector2.One,
Colour = Color4.Black.Opacity(0.5f),
Colour = OsuColour.Gray(0.1f),
Alpha = 0.96f,
},
modeLight = new Box
{
RelativeSizeAxes = Axes.X,
Height = 3,
Position = new Vector2(0, -3),
Colour = Color4.Black,
Colour = OsuColour.Gray(0.1f),
},
new FillFlowContainer
{