1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 13:47:24 +08:00

Reduce semi-opaque layers at song select

I made these changes while working on
https://github.com/ppy/osu/pull/30579. Basically, it's hard to fix the
ranks not loading while underneath the footer, and the transparency both
looks bad, and is going away in the redesign.

I've chosen values here that are moving *in the direction* of the new
design without overhauling everything.

- I know that there's still some transparency. I did this because it
helps keep all current elements / colours contrasting without too much
effort.
- I completely removed the transparency adjustments on the beatmap
panels. This always looked bad due to being applied per-layer, and I
don't think it added much.
This commit is contained in:
Dean Herbert 2024-11-11 17:54:43 +09:00
parent f8ac54d61c
commit f84ee3996f
No known key found for this signature in database
4 changed files with 6 additions and 11 deletions

View File

@ -1116,11 +1116,6 @@ namespace osu.Game.Screens.Select
// adjusting the item's overall X position can cause it to become masked away when // adjusting the item's overall X position can cause it to become masked away when
// child items (difficulties) are still visible. // child items (difficulties) are still visible.
item.Header.X = offsetX(dist, visibleHalfHeight) - (parent?.X ?? 0); 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 private enum PendingScrollOperation

View File

@ -86,8 +86,6 @@ namespace osu.Game.Screens.Select.Carousel
}; };
} }
public void SetMultiplicativeAlpha(float alpha) => Header.BorderContainer.Alpha = alpha;
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();

View File

@ -97,8 +97,8 @@ namespace osu.Game.Screens.Select
{ {
new Box new Box
{ {
Colour = Color4.Black, Colour = OsuColour.Gray(0.05f),
Alpha = 0.8f, Alpha = 0.96f,
Width = 2, Width = 2,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },

View File

@ -12,6 +12,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Select namespace osu.Game.Screens.Select
@ -82,14 +83,15 @@ namespace osu.Game.Screens.Select
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Size = Vector2.One, Size = Vector2.One,
Colour = Color4.Black.Opacity(0.5f), Colour = OsuColour.Gray(0.1f),
Alpha = 0.96f,
}, },
modeLight = new Box modeLight = new Box
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 3, Height = 3,
Position = new Vector2(0, -3), Position = new Vector2(0, -3),
Colour = Color4.Black, Colour = OsuColour.Gray(0.1f),
}, },
new FillFlowContainer new FillFlowContainer
{ {