mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 23:23:12 +08:00
Merge pull request #30579 from peppy/fix-rank-display-song-select
Fix top rank display not showing up on beatmaps with many difficulties
This commit is contained in:
commit
c25215d2cf
@ -26,7 +26,7 @@
|
|||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="System.IO.Packaging" Version="8.0.1" />
|
<PackageReference Include="System.IO.Packaging" Version="8.0.1" />
|
||||||
<PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
|
<PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
|
||||||
<PackageReference Include="Velopack" Version="0.0.630-g9c52e40" />
|
<PackageReference Include="Velopack" Version="0.0.869" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Resources">
|
<ItemGroup Label="Resources">
|
||||||
<EmbeddedResource Include="lazer.ico" />
|
<EmbeddedResource Include="lazer.ico" />
|
||||||
|
@ -222,12 +222,6 @@ namespace osu.Game.Screens.Select
|
|||||||
InternalChild = new Container
|
InternalChild = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding
|
|
||||||
{
|
|
||||||
// Avoid clash between scrollbar and osu! logo.
|
|
||||||
Top = 10,
|
|
||||||
Bottom = 100,
|
|
||||||
},
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
setPool,
|
setPool,
|
||||||
@ -1266,6 +1260,38 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
return base.OnDragStart(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 = 70;
|
||||||
|
|
||||||
|
protected override float ToScrollbarPosition(float scrollPosition)
|
||||||
|
{
|
||||||
|
if (Precision.AlmostEquals(0, ScrollableExtent))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return top_padding + (ScrollbarMovementExtent - (top_padding + bottom_padding)) * (scrollPosition / ScrollableExtent);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override float FromScrollbarPosition(float scrollbarPosition)
|
||||||
|
{
|
||||||
|
if (Precision.AlmostEquals(0, ScrollbarMovementExtent))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return ScrollableExtent * ((scrollbarPosition - top_padding) / (ScrollbarMovementExtent - (top_padding + bottom_padding)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||||
<PackageReference Include="DiffPlex" Version="1.7.2" />
|
<PackageReference Include="DiffPlex" Version="1.7.2" />
|
||||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.67" />
|
<PackageReference Include="HtmlAgilityPack" Version="1.11.70" />
|
||||||
<PackageReference Include="Humanizer" Version="2.14.1" />
|
<PackageReference Include="Humanizer" Version="2.14.1" />
|
||||||
<PackageReference Include="MessagePack" Version="2.5.187" />
|
<PackageReference Include="MessagePack" Version="2.5.187" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.10" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.10" />
|
||||||
@ -35,9 +35,9 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Realm" Version="11.5.0" />
|
<PackageReference Include="Realm" Version="11.5.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2024.1025.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2024.1111.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2024.1106.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2024.1106.0" />
|
||||||
<PackageReference Include="Sentry" Version="4.12.1" />
|
<PackageReference Include="Sentry" Version="4.13.0" />
|
||||||
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
|
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
|
||||||
<PackageReference Include="SharpCompress" Version="0.38.0" />
|
<PackageReference Include="SharpCompress" Version="0.38.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.14.0" />
|
<PackageReference Include="NUnit" Version="3.14.0" />
|
||||||
|
Loading…
Reference in New Issue
Block a user