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

Update framework #32330

Merged
merged 9 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.225.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.311.0" />
</ItemGroup>
<PropertyGroup>
<!-- Fody does not handle Android build well, and warns when unchanged.
Expand Down
7 changes: 7 additions & 0 deletions osu.Game.Tests/Visual/Settings/TestSceneTabletSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ public class TestTabletHandler : ITabletHandler

public Bindable<float> Rotation { get; } = new Bindable<float>();

public BindableFloat PressureThreshold { get; } = new BindableFloat
{
MinValue = 0f,
MaxValue = 1f,
Precision = 0.005f,
};

public IBindable<TabletInfo> Tablet => tablet;

private readonly Bindable<TabletInfo> tablet = new Bindable<TabletInfo>();
Expand Down
13 changes: 9 additions & 4 deletions osu.Game/Graphics/Containers/LinkFlowContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,14 @@ protected override IEnumerable<Drawable> CreateDrawablesFor(TextFlowContainer te

protected virtual DrawableLinkCompiler CreateLinkCompiler(ITextPart textPart) => new DrawableLinkCompiler(textPart);

// We want the compilers to always be visible no matter where they are, so RelativeSizeAxes is used.
// However due to https://github.com/ppy/osu-framework/issues/2073, it's possible for the compilers to be relative size in the flow's auto-size axes - an unsupported operation.
// Since the compilers don't display any content and don't affect the layout, it's simplest to exclude them from the flow.
public override IEnumerable<Drawable> FlowingChildren => base.FlowingChildren.Where(c => !(c is DrawableLinkCompiler));
protected override FillFlowContainer CreateFlow() => new LinkFlow();

private partial class LinkFlow : InnerFlow
{
// We want the compilers to always be visible no matter where they are, so RelativeSizeAxes is used.
// However due to https://github.com/ppy/osu-framework/issues/2073, it's possible for the compilers to be relative size in the flow's auto-size axes - an unsupported operation.
// Since the compilers don't display any content and don't affect the layout, it's simplest to exclude them from the flow.
public override IEnumerable<Drawable> FlowingChildren => base.FlowingChildren.Where(c => !(c is DrawableLinkCompiler));
}
}
}
5 changes: 5 additions & 0 deletions osu.Game/Localisation/TabletSettingsStrings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public static class TabletSettingsStrings
/// </summary>
public static LocalisableString LockAspectRatio => new TranslatableString(getKey(@"lock_aspect_ratio"), @"Lock aspect ratio");

/// <summary>
/// "Tip pressure for click"
/// </summary>
public static LocalisableString TipPressureForClick => new TranslatableString(getKey(@"tip_pressure_for_click"), "Tip pressure for click");

private static string getKey(string key) => $@"{prefix}:{key}";
}
}
1 change: 0 additions & 1 deletion osu.Game/Overlays/BeatmapSet/BeatmapAvailability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public BeatmapAvailability()
},
textContainer = new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 14))
{
Direction = FillDirection.Full,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding(10),
Expand Down
1 change: 0 additions & 1 deletion osu.Game/Overlays/Changelog/ChangelogEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ private Drawable createTitle()
},
title = new LinkFlowContainer
{
Direction = FillDirection.Full,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
TextAnchor = Anchor.BottomLeft,
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Chat/ChatLine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public Message Message
}
}

public IReadOnlyCollection<Drawable> DrawableContentFlow => drawableContentFlow;
public IEnumerable<Drawable> DrawableContentFlow => drawableContentFlow.Children;

private const float font_size = 13;

Expand Down
1 change: 0 additions & 1 deletion osu.Game/Overlays/Music/PlaylistItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ protected override void LoadComplete()
{
sprite.Font = OsuFont.GetFont(size: 14, weight: FontWeight.Bold);
sprite.Colour = colours.Gray9;
sprite.Padding = new MarginPadding { Top = 1 };
});

SelectedSet.BindValueChanged(set => updateSelectionState(set.NewValue));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public PreviousUsernamesDisplay()
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Full,
// Prevents the tooltip of having a sudden size reduction and flickering when the text is being faded out.
// Also prevents a potential OnHover/HoverLost feedback loop.
AlwaysPresent = true,
Expand Down
11 changes: 11 additions & 0 deletions osu.Game/Overlays/Settings/Sections/Input/TabletSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public partial class TabletSettings : SettingsSubsection

private readonly BindableNumber<float> rotation = new BindableNumber<float> { MinValue = 0, MaxValue = 360 };

private readonly BindableNumber<float> pressureThreshold = new BindableNumber<float> { MinValue = 0.0f, MaxValue = 1.0f, Precision = 0.005f };

[Resolved]
private GameHost host { get; set; }

Expand Down Expand Up @@ -213,6 +215,13 @@ private void load(OsuColour colours, LocalisationManager localisation)
Current = sizeY,
CanBeShown = { BindTarget = enabled }
},
new SettingsPercentageSlider<float>
{
TransferValueOnCommit = true,
LabelText = TabletSettingsStrings.TipPressureForClick,
Current = pressureThreshold,
CanBeShown = { BindTarget = enabled }
},
}
},
};
Expand Down Expand Up @@ -267,6 +276,8 @@ protected override void LoadComplete()
aspectRatioApplication = Schedule(() => forceAspectRatio(aspect.NewValue));
});

pressureThreshold.BindTo(tabletHandler.PressureThreshold);

tablet.BindTo(tabletHandler.Tablet);
tablet.BindValueChanged(val => Schedule(() =>
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/osu.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Realm" Version="20.1.0" />
<PackageReference Include="ppy.osu.Framework" Version="2025.225.0" />
<PackageReference Include="ppy.osu.Framework" Version="2025.311.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2025.307.0" />
<PackageReference Include="Sentry" Version="5.1.1" />
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
Expand Down
2 changes: 1 addition & 1 deletion osu.iOS.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<MtouchInterpreter>-all</MtouchInterpreter>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.225.0" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.311.0" />
</ItemGroup>
</Project>
Loading