1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-22 04:32:55 +08:00

Merge pull request #31474 from peppy/scroll-container-double-precision

Update game `ScrollContainer` usage in line with framework changes
This commit is contained in:
Bartłomiej Dach 2025-01-14 10:56:55 +01:00 committed by GitHub
commit 459577cc32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 66 additions and 54 deletions

View File

@ -10,7 +10,7 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2024.1224.0" /> <PackageReference Include="ppy.osu.Framework.Android" Version="2025.114.1" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<!-- Fody does not handle Android build well, and warns when unchanged. <!-- Fody does not handle Android build well, and warns when unchanged.

View File

@ -138,7 +138,7 @@ namespace osu.Game.Tests.Visual.UserInterface
AddUntilStep("section top is visible", () => AddUntilStep("section top is visible", () =>
{ {
var scrollContainer = container.ChildrenOfType<UserTrackingScrollContainer>().Single(); var scrollContainer = container.ChildrenOfType<UserTrackingScrollContainer>().Single();
float sectionPosition = scrollContainer.GetChildPosInContent(container.Children[scrollIndex]); double sectionPosition = scrollContainer.GetChildPosInContent(container.Children[scrollIndex]);
return scrollContainer.Current < sectionPosition; return scrollContainer.Current < sectionPosition;
}); });
} }

View File

@ -59,11 +59,11 @@ namespace osu.Game.Graphics.Containers
/// <param name="extraScroll">An added amount to scroll beyond the requirement to bring the target into view.</param> /// <param name="extraScroll">An added amount to scroll beyond the requirement to bring the target into view.</param>
public void ScrollIntoView(Drawable d, bool animated = true, float extraScroll = 0) public void ScrollIntoView(Drawable d, bool animated = true, float extraScroll = 0)
{ {
float childPos0 = GetChildPosInContent(d); double childPos0 = GetChildPosInContent(d);
float childPos1 = GetChildPosInContent(d, d.DrawSize); double childPos1 = GetChildPosInContent(d, d.DrawSize);
float minPos = Math.Min(childPos0, childPos1); double minPos = Math.Min(childPos0, childPos1);
float maxPos = Math.Max(childPos0, childPos1); double maxPos = Math.Max(childPos0, childPos1);
if (minPos < Current || (minPos > Current && d.DrawSize[ScrollDim] > DisplayableContent)) if (minPos < Current || (minPos > Current && d.DrawSize[ScrollDim] > DisplayableContent))
ScrollTo(minPos - extraScroll, animated); ScrollTo(minPos - extraScroll, animated);

View File

@ -208,7 +208,7 @@ namespace osu.Game.Graphics.Containers
private float getScrollTargetForDrawable(Drawable target) private float getScrollTargetForDrawable(Drawable target)
{ {
// implementation similar to ScrollIntoView but a bit more nuanced. // implementation similar to ScrollIntoView but a bit more nuanced.
return scrollContainer.GetChildPosInContent(target) - scrollContainer.DisplayableContent * scroll_y_centre; return (float)(scrollContainer.GetChildPosInContent(target) - scrollContainer.DisplayableContent * scroll_y_centre);
} }
public void ScrollToTop() => scrollContainer.ScrollTo(0); public void ScrollToTop() => scrollContainer.ScrollTo(0);
@ -259,7 +259,7 @@ namespace osu.Game.Graphics.Containers
updateSectionsMargin(); updateSectionsMargin();
} }
float currentScroll = scrollContainer.Current; float currentScroll = (float)scrollContainer.Current;
if (currentScroll != lastKnownScroll) if (currentScroll != lastKnownScroll)
{ {

View File

@ -35,7 +35,7 @@ namespace osu.Game.Graphics.Containers
{ {
} }
protected override void OnUserScroll(float value, bool animated = true, double? distanceDecay = default) protected override void OnUserScroll(double value, bool animated = true, double? distanceDecay = default)
{ {
UserScrolling = true; UserScrolling = true;
base.OnUserScroll(value, animated, distanceDecay); base.OnUserScroll(value, animated, distanceDecay);
@ -53,7 +53,7 @@ namespace osu.Game.Graphics.Containers
base.ScrollFromMouseEvent(e); base.ScrollFromMouseEvent(e);
} }
public new void ScrollTo(float value, bool animated = true, double? distanceDecay = null) public new void ScrollTo(double value, bool animated = true, double? distanceDecay = null)
{ {
UserScrolling = false; UserScrolling = false;
base.ScrollTo(value, animated, distanceDecay); base.ScrollTo(value, animated, distanceDecay);

View File

@ -1,17 +1,17 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Input;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
public partial class OsuNumberBox : OsuTextBox public partial class OsuNumberBox : OsuTextBox
{ {
protected override bool AllowIme => false;
public OsuNumberBox() public OsuNumberBox()
{ {
InputProperties = new TextInputProperties(TextInputType.Number, false);
SelectAllOnFocus = true; SelectAllOnFocus = true;
} }
protected override bool CanAddCharacter(char character) => char.IsAsciiDigit(character);
} }
} }

View File

@ -18,7 +18,7 @@ using osu.Game.Localisation;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
public partial class OsuPasswordTextBox : OsuTextBox, ISuppressKeyEventLogging public partial class OsuPasswordTextBox : OsuTextBox
{ {
protected override Drawable GetDrawableCharacter(char c) => new FallingDownContainer protected override Drawable GetDrawableCharacter(char c) => new FallingDownContainer
{ {
@ -28,12 +28,6 @@ namespace osu.Game.Graphics.UserInterface
protected override bool AllowUniqueCharacterSamples => false; protected override bool AllowUniqueCharacterSamples => false;
protected override bool AllowClipboardExport => false;
protected override bool AllowWordNavigation => false;
protected override bool AllowIme => false;
private readonly CapsWarning warning; private readonly CapsWarning warning;
[Resolved] [Resolved]
@ -41,6 +35,8 @@ namespace osu.Game.Graphics.UserInterface
public OsuPasswordTextBox() public OsuPasswordTextBox()
{ {
InputProperties = new TextInputProperties(TextInputType.Password, false);
Add(warning = new CapsWarning Add(warning = new CapsWarning
{ {
Size = new Vector2(20), Size = new Vector2(20),

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System.Globalization; using System.Globalization;
using osu.Framework.Input;
namespace osu.Game.Graphics.UserInterfaceV2 namespace osu.Game.Graphics.UserInterfaceV2
{ {
@ -19,6 +20,11 @@ namespace osu.Game.Graphics.UserInterfaceV2
{ {
public bool AllowDecimals { get; init; } public bool AllowDecimals { get; init; }
public InnerNumberBox()
{
InputProperties = new TextInputProperties(TextInputType.Number, false);
}
protected override bool CanAddCharacter(char character) protected override bool CanAddCharacter(char character)
=> char.IsAsciiDigit(character) || (AllowDecimals && CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.Contains(character)); => char.IsAsciiDigit(character) || (AllowDecimals && CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.Contains(character));
} }

View File

@ -375,8 +375,8 @@ namespace osu.Game.Online.Leaderboards
{ {
base.UpdateAfterChildren(); base.UpdateAfterChildren();
float fadeBottom = scrollContainer.Current + scrollContainer.DrawHeight; float fadeBottom = (float)(scrollContainer.Current + scrollContainer.DrawHeight);
float fadeTop = scrollContainer.Current + LeaderboardScore.HEIGHT; float fadeTop = (float)(scrollContainer.Current + LeaderboardScore.HEIGHT);
if (!scrollContainer.IsScrolledToEnd()) if (!scrollContainer.IsScrolledToEnd())
fadeBottom -= LeaderboardScore.HEIGHT; fadeBottom -= LeaderboardScore.HEIGHT;

View File

@ -41,13 +41,13 @@ namespace osu.Game.Overlays.Chat
#region Scroll handling #region Scroll handling
protected override void OnUserScroll(float value, bool animated = true, double? distanceDecay = null) protected override void OnUserScroll(double value, bool animated = true, double? distanceDecay = null)
{ {
base.OnUserScroll(value, animated, distanceDecay); base.OnUserScroll(value, animated, distanceDecay);
updateTrackState(); updateTrackState();
} }
public new void ScrollTo(float value, bool animated = true, double? distanceDecay = null) public new void ScrollTo(double value, bool animated = true, double? distanceDecay = null)
{ {
base.ScrollTo(value, animated, distanceDecay); base.ScrollTo(value, animated, distanceDecay);
updateTrackState(); updateTrackState();

View File

@ -117,7 +117,7 @@ namespace osu.Game.Overlays.Chat
if (chatLine == null) if (chatLine == null)
return; return;
float center = scroll.GetChildPosInContent(chatLine, chatLine.DrawSize / 2) - scroll.DisplayableContent / 2; double center = scroll.GetChildPosInContent(chatLine, chatLine.DrawSize / 2) - scroll.DisplayableContent / 2;
scroll.ScrollTo(Math.Clamp(center, 0, scroll.ScrollableExtent)); scroll.ScrollTo(Math.Clamp(center, 0, scroll.ScrollableExtent));
chatLine.Highlight(); chatLine.Highlight();

View File

@ -7,6 +7,7 @@ using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -63,6 +64,7 @@ namespace osu.Game.Overlays.Login
}, },
username = new OsuTextBox username = new OsuTextBox
{ {
InputProperties = new TextInputProperties(TextInputType.Username, false),
PlaceholderText = UsersStrings.LoginUsername.ToLower(), PlaceholderText = UsersStrings.LoginUsername.ToLower(),
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Text = api.ProvidedUsername, Text = api.ProvidedUsername,

View File

@ -710,13 +710,13 @@ namespace osu.Game.Overlays.Mods
// the bounds below represent the horizontal range of scroll items to be considered fully visible/active, in the scroll's internal coordinate space. // the bounds below represent the horizontal range of scroll items to be considered fully visible/active, in the scroll's internal coordinate space.
// note that clamping is applied to the left scroll bound to ensure scrolling past extents does not change the set of active columns. // note that clamping is applied to the left scroll bound to ensure scrolling past extents does not change the set of active columns.
float leftVisibleBound = Math.Clamp(Current, 0, ScrollableExtent); double leftVisibleBound = Math.Clamp(Current, 0, ScrollableExtent);
float rightVisibleBound = leftVisibleBound + DrawWidth; double rightVisibleBound = leftVisibleBound + DrawWidth;
// if a movement is occurring at this time, the bounds below represent the full range of columns that the scroll movement will encompass. // if a movement is occurring at this time, the bounds below represent the full range of columns that the scroll movement will encompass.
// this will be used to ensure that columns do not change state from active to inactive back and forth until they are fully scrolled past. // this will be used to ensure that columns do not change state from active to inactive back and forth until they are fully scrolled past.
float leftMovementBound = Math.Min(Current, Target); double leftMovementBound = Math.Min(Current, Target);
float rightMovementBound = Math.Max(Current, Target) + DrawWidth; double rightMovementBound = Math.Max(Current, Target) + DrawWidth;
foreach (var column in Child) foreach (var column in Child)
{ {

View File

@ -136,7 +136,7 @@ namespace osu.Game.Overlays
{ {
base.UpdateAfterChildren(); base.UpdateAfterChildren();
sidebarContainer.Height = DrawHeight; sidebarContainer.Height = DrawHeight;
sidebarContainer.Y = Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0)); sidebarContainer.Y = (float)Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0));
} }
private void loadListing(int? year = null) private void loadListing(int? year = null)

View File

@ -88,7 +88,7 @@ namespace osu.Game.Overlays
base.UpdateAfterChildren(); base.UpdateAfterChildren();
// don't block header by applying padding equal to the visible header height // don't block header by applying padding equal to the visible header height
loadingContainer.Padding = new MarginPadding { Top = Math.Max(0, Header.Height - ScrollFlow.Current) }; loadingContainer.Padding = new MarginPadding { Top = (float)Math.Max(0, Header.Height - ScrollFlow.Current) };
} }
} }
} }

View File

@ -35,7 +35,7 @@ namespace osu.Game.Overlays
public ScrollBackButton Button { get; private set; } public ScrollBackButton Button { get; private set; }
private readonly Bindable<float?> lastScrollTarget = new Bindable<float?>(); private readonly Bindable<double?> lastScrollTarget = new Bindable<double?>();
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
@ -63,7 +63,7 @@ namespace osu.Game.Overlays
Button.State = Target > button_scroll_position || lastScrollTarget.Value != null ? Visibility.Visible : Visibility.Hidden; Button.State = Target > button_scroll_position || lastScrollTarget.Value != null ? Visibility.Visible : Visibility.Hidden;
} }
protected override void OnUserScroll(float value, bool animated = true, double? distanceDecay = default) protected override void OnUserScroll(double value, bool animated = true, double? distanceDecay = default)
{ {
base.OnUserScroll(value, animated, distanceDecay); base.OnUserScroll(value, animated, distanceDecay);
@ -112,7 +112,7 @@ namespace osu.Game.Overlays
private readonly Box background; private readonly Box background;
private readonly SpriteIcon spriteIcon; private readonly SpriteIcon spriteIcon;
public Bindable<float?> LastScrollTarget = new Bindable<float?>(); public Bindable<double?> LastScrollTarget = new Bindable<double?>();
protected override HoverSounds CreateHoverSounds(HoverSampleSet sampleSet) => new HoverSounds(); protected override HoverSounds CreateHoverSounds(HoverSampleSet sampleSet) => new HoverSounds();

View File

@ -5,6 +5,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
namespace osu.Game.Overlays.Settings namespace osu.Game.Overlays.Settings
{ {
@ -66,7 +67,10 @@ namespace osu.Game.Overlays.Settings
private partial class OutlinedNumberBox : OutlinedTextBox private partial class OutlinedNumberBox : OutlinedTextBox
{ {
protected override bool AllowIme => false; public OutlinedNumberBox()
{
InputProperties = new TextInputProperties(TextInputType.Number, false);
}
protected override bool CanAddCharacter(char character) => char.IsAsciiDigit(character); protected override bool CanAddCharacter(char character) => char.IsAsciiDigit(character);

View File

@ -100,7 +100,7 @@ namespace osu.Game.Overlays
if (articlePage != null) if (articlePage != null)
{ {
articlePage.SidebarContainer.Height = DrawHeight; articlePage.SidebarContainer.Height = DrawHeight;
articlePage.SidebarContainer.Y = Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0)); articlePage.SidebarContainer.Y = (float)Math.Clamp(ScrollFlow.Current - Header.DrawHeight, 0, Math.Max(ScrollFlow.ScrollContent.DrawHeight - DrawHeight - Header.DrawHeight, 0));
} }
} }

View File

@ -55,7 +55,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
/// <summary> /// <summary>
/// The timeline's scroll position in the last frame. /// The timeline's scroll position in the last frame.
/// </summary> /// </summary>
private float lastScrollPosition; private double lastScrollPosition;
/// <summary> /// <summary>
/// The track time in the last frame. /// The track time in the last frame.
@ -322,7 +322,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
/// </summary> /// </summary>
public double VisibleRange => editorClock.TrackLength / Zoom; public double VisibleRange => editorClock.TrackLength / Zoom;
public double TimeAtPosition(float x) public double TimeAtPosition(double x)
{ {
return x / Content.DrawWidth * editorClock.TrackLength; return x / Content.DrawWidth * editorClock.TrackLength;
} }

View File

@ -182,7 +182,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
} }
private void transformZoomTo(float newZoom, float focusPoint, double duration = 0, Easing easing = Easing.None) private void transformZoomTo(float newZoom, float focusPoint, double duration = 0, Easing easing = Easing.None)
=> this.TransformTo(this.PopulateTransform(new TransformZoom(focusPoint, zoomedContent.DrawWidth, Current), newZoom, duration, easing)); => this.TransformTo(this.PopulateTransform(new TransformZoom(focusPoint, zoomedContent.DrawWidth, (float)Current), newZoom, duration, easing));
/// <summary> /// <summary>
/// Invoked when <see cref="Zoom"/> has changed. /// Invoked when <see cref="Zoom"/> has changed.

View File

@ -4,6 +4,7 @@
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterfaceV2; using osu.Game.Graphics.UserInterfaceV2;
@ -136,7 +137,10 @@ namespace osu.Game.Screens.Edit.Setup
private partial class RomanisedTextBox : InnerTextBox private partial class RomanisedTextBox : InnerTextBox
{ {
protected override bool AllowIme => false; public RomanisedTextBox()
{
InputProperties = new TextInputProperties(TextInputType.Text, false);
}
protected override bool CanAddCharacter(char character) protected override bool CanAddCharacter(char character)
=> MetadataUtils.IsRomanised(character); => MetadataUtils.IsRomanised(character);

View File

@ -114,15 +114,15 @@ namespace osu.Game.Screens.Play.HUD
if (requiresScroll && TrackedScore != null) if (requiresScroll && TrackedScore != null)
{ {
float scrollTarget = scroll.GetChildPosInContent(TrackedScore) + TrackedScore.DrawHeight / 2 - scroll.DrawHeight / 2; double scrollTarget = scroll.GetChildPosInContent(TrackedScore) + TrackedScore.DrawHeight / 2 - scroll.DrawHeight / 2;
scroll.ScrollTo(scrollTarget); scroll.ScrollTo(scrollTarget);
} }
const float panel_height = GameplayLeaderboardScore.PANEL_HEIGHT; const float panel_height = GameplayLeaderboardScore.PANEL_HEIGHT;
float fadeBottom = scroll.Current + scroll.DrawHeight; float fadeBottom = (float)(scroll.Current + scroll.DrawHeight);
float fadeTop = scroll.Current + panel_height; float fadeTop = (float)(scroll.Current + panel_height);
if (scroll.IsScrolledToStart()) fadeTop -= panel_height; if (scroll.IsScrolledToStart()) fadeTop -= panel_height;
if (!scroll.IsScrolledToEnd()) fadeBottom -= panel_height; if (!scroll.IsScrolledToEnd()) fadeBottom -= panel_height;

View File

@ -334,7 +334,7 @@ namespace osu.Game.Screens.Ranking
private partial class Scroll : OsuScrollContainer private partial class Scroll : OsuScrollContainer
{ {
public new float Target => base.Target; public new double Target => base.Target;
public Scroll() public Scroll()
: base(Direction.Horizontal) : base(Direction.Horizontal)
@ -344,7 +344,7 @@ namespace osu.Game.Screens.Ranking
/// <summary> /// <summary>
/// The target that will be scrolled to instantaneously next frame. /// The target that will be scrolled to instantaneously next frame.
/// </summary> /// </summary>
public float? InstantScrollTarget; public double? InstantScrollTarget;
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()
{ {

View File

@ -611,12 +611,12 @@ namespace osu.Game.Screens.Select
/// <summary> /// <summary>
/// The position of the lower visible bound with respect to the current scroll position. /// The position of the lower visible bound with respect to the current scroll position.
/// </summary> /// </summary>
private float visibleBottomBound => Scroll.Current + DrawHeight + BleedBottom; private float visibleBottomBound => (float)(Scroll.Current + DrawHeight + BleedBottom);
/// <summary> /// <summary>
/// The position of the upper visible bound with respect to the current scroll position. /// The position of the upper visible bound with respect to the current scroll position.
/// </summary> /// </summary>
private float visibleUpperBound => Scroll.Current - BleedTop; private float visibleUpperBound => (float)(Scroll.Current - BleedTop);
public void FlushPendingFilterOperations() public void FlushPendingFilterOperations()
{ {
@ -1006,7 +1006,7 @@ namespace osu.Game.Screens.Select
// we take the difference in scroll height and apply to all visible panels. // we take the difference in scroll height and apply to all visible panels.
// this avoids edge cases like when the visible panels is reduced suddenly, causing ScrollContainer // this avoids edge cases like when the visible panels is reduced suddenly, causing ScrollContainer
// to enter clamp-special-case mode where it animates completely differently to normal. // to enter clamp-special-case mode where it animates completely differently to normal.
float scrollChange = scrollTarget.Value - Scroll.Current; float scrollChange = (float)(scrollTarget.Value - Scroll.Current);
Scroll.ScrollTo(scrollTarget.Value, false); Scroll.ScrollTo(scrollTarget.Value, false);
foreach (var i in Scroll) foreach (var i in Scroll)
i.Y += scrollChange; i.Y += scrollChange;
@ -1217,12 +1217,12 @@ namespace osu.Game.Screens.Select
private const float top_padding = 10; private const float top_padding = 10;
private const float bottom_padding = 70; private const float bottom_padding = 70;
protected override float ToScrollbarPosition(float scrollPosition) protected override float ToScrollbarPosition(double scrollPosition)
{ {
if (Precision.AlmostEquals(0, ScrollableExtent)) if (Precision.AlmostEquals(0, ScrollableExtent))
return 0; return 0;
return top_padding + (ScrollbarMovementExtent - (top_padding + bottom_padding)) * (scrollPosition / ScrollableExtent); return (float)(top_padding + (ScrollbarMovementExtent - (top_padding + bottom_padding)) * (scrollPosition / ScrollableExtent));
} }
protected override float FromScrollbarPosition(float scrollbarPosition) protected override float FromScrollbarPosition(float scrollbarPosition)
@ -1230,7 +1230,7 @@ namespace osu.Game.Screens.Select
if (Precision.AlmostEquals(0, ScrollbarMovementExtent)) if (Precision.AlmostEquals(0, ScrollbarMovementExtent))
return 0; return 0;
return ScrollableExtent * ((scrollbarPosition - top_padding) / (ScrollbarMovementExtent - (top_padding + bottom_padding))); return (float)(ScrollableExtent * ((scrollbarPosition - top_padding) / (ScrollbarMovementExtent - (top_padding + bottom_padding))));
} }
} }
} }

View File

@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Realm" Version="20.1.0" /> <PackageReference Include="Realm" Version="20.1.0" />
<PackageReference Include="ppy.osu.Framework" Version="2024.1224.0" /> <PackageReference Include="ppy.osu.Framework" Version="2025.114.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2024.1224.0" /> <PackageReference Include="ppy.osu.Game.Resources" Version="2024.1224.0" />
<PackageReference Include="Sentry" Version="5.0.0" /> <PackageReference Include="Sentry" Version="5.0.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. -->

View File

@ -17,6 +17,6 @@
<MtouchInterpreter>-all</MtouchInterpreter> <MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2024.1224.0" /> <PackageReference Include="ppy.osu.Framework.iOS" Version="2025.114.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>