Skip to content

Commit

Permalink
Merge pull request #30580 from peppy/song-select-less-semi-opaque
Browse files Browse the repository at this point in the history
Reduce semi-opaque layers at song select
  • Loading branch information
bdach authored Nov 11, 2024
2 parents f746999 + b430ac2 commit bca42e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 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
5 changes: 2 additions & 3 deletions osu.Game/Screens/Select/FilterControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Select.Filter;
using osuTK;
using osuTK.Graphics;
using osuTK.Input;

namespace osu.Game.Screens.Select
Expand Down Expand Up @@ -97,8 +96,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
8 changes: 4 additions & 4 deletions osu.Game/Screens/Select/Footer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -82,14 +81,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 bca42e9

Please sign in to comment.