Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix top rank display not showing up on beatmaps with many difficulties #30579

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions osu.Game/Screens/Select/BeatmapCarousel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,6 @@
InternalChild = new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding
{
// Avoid clash between scrollbar and osu! logo.
Top = 10,
Bottom = 100,
},
Children = new Drawable[]
{
setPool,
Expand Down Expand Up @@ -1271,6 +1265,38 @@

return base.OnDragStart(e);
}

protected override ScrollbarContainer CreateScrollbar(Direction direction)
{
return new PaddedScrollbar();
}

protected partial class PaddedScrollbar : OsuScrollbar
{
public PaddedScrollbar()
: base(Direction.Vertical)
{
}
}

private const float top_padding = 10;
private const float bottom_padding = 80;

protected override float ToScrollbarPosition(float scrollPosition)

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override

Check failure on line 1285 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.ToScrollbarPosition(float)': no suitable method found to override
{
if (Precision.AlmostEquals(0, ScrollableExtent))
return 0;

return top_padding + (ScrollbarMovementExtent - bottom_padding) * (scrollPosition / ScrollableExtent);
bdach marked this conversation as resolved.
Show resolved Hide resolved
}

protected override float FromScrollbarPosition(float scrollbarPosition)

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Code Quality

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (iOS)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Build only (Android)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Windows, windows-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, SingleThread)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override

Check failure on line 1293 in osu.Game/Screens/Select/BeatmapCarousel.cs

View workflow job for this annotation

GitHub Actions / Test (Linux, ubuntu-latest, MultiThreaded)

'BeatmapCarousel.CarouselScrollContainer.FromScrollbarPosition(float)': no suitable method found to override
{
if (Precision.AlmostEquals(0, ScrollbarMovementExtent))
return 0;

return ScrollableExtent * ((scrollbarPosition - top_padding) / (ScrollbarMovementExtent - bottom_padding));
}
}

protected override void Dispose(bool isDisposing)
Expand Down
Loading