Skip to content

Commit

Permalink
Fix top rank display not showing up on beatmaps with many difficulties
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Nov 11, 2024
1 parent f8ac54d commit e8b6958
Showing 1 changed file with 32 additions and 6 deletions.
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 @@ public BeatmapCarousel(FilterCriteria initialCriteria)
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 @@ protected override bool OnDragStart(DragStartEvent e)

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 / 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

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, 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 (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 (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

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 / 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 / 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
{
if (Precision.AlmostEquals(0, ScrollableExtent))
return 0;

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

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 / 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

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, 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 (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 (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

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 / 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 / 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
{
if (Precision.AlmostEquals(0, ScrollbarMovementExtent))
return 0;

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

protected override void Dispose(bool isDisposing)
Expand Down

0 comments on commit e8b6958

Please sign in to comment.