Skip to content

Commit

Permalink
Reduce semi-opaque layers at song select
Browse files Browse the repository at this point in the history
I made these changes while working on
ppy#30579. Basically, it's hard to fix the
ranks not loading while underneath the footer, and the transaprency 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 transaprency adjustments on the beatmap
panels. This always looked bad due to being applied per-layer, and I
don't think it added much.
  • Loading branch information
peppy committed Nov 11, 2024
1 parent f8ac54d commit b046f7c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions osu.Game/Screens/Select/BeatmapCarousel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,11 +1116,6 @@ private void updateItem(DrawableCarouselItem item, DrawableCarouselItem? parent
// 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
Expand Down
2 changes: 0 additions & 2 deletions osu.Game/Screens/Select/Carousel/DrawableCarouselItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ protected DrawableCarouselItem()
};
}

public void SetMultiplicativeAlpha(float alpha) => Header.BorderContainer.Alpha = alpha;

protected override void LoadComplete()
{
base.LoadComplete();
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Screens/Select/FilterControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ private void load(OsuColour colours, OsuConfigManager config)
{
new Box
{
Colour = Color4.Black,
Alpha = 0.8f,
Colour = OsuColour.Gray(0.05f),
Alpha = 0.96f,
Width = 2,
RelativeSizeAxes = Axes.Both,
},
Expand Down
6 changes: 4 additions & 2 deletions osu.Game/Screens/Select/Footer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
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
Expand Down Expand Up @@ -82,14 +83,15 @@ public Footer()
{
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
{
Expand Down

0 comments on commit b046f7c

Please sign in to comment.