Skip to content

Commit 9f198f3

Browse files
authoredMar 13, 2025··
Merge pull request #32349 from bdach/text-flow-broke
Fix `OsuTextFlowContainer.AddArbitraryDrawable()` not aligning the drawable correctly
2 parents 86482bf + 6b786a6 commit 9f198f3

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed
 

‎osu.Android.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.311.0" />
13+
<PackageReference Include="ppy.osu.Framework.Android" Version="2025.313.0" />
1414
</ItemGroup>
1515
<PropertyGroup>
1616
<!-- Fody does not handle Android build well, and warns when unchanged.

‎osu.Game/Graphics/Containers/OsuTextFlowContainer.cs

+11-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,18 @@ public OsuTextFlowContainer(Action<SpriteText> defaultCreationParameters = null)
2121

2222
protected override SpriteText CreateSpriteText() => new OsuSpriteText();
2323

24-
public ITextPart AddArbitraryDrawable(Drawable drawable) => AddPart(new TextPartManual(drawable.Yield()));
24+
public ITextPart AddArbitraryDrawable(Drawable drawable) => AddPart(new TextPartManual(new ArbitraryDrawableWrapper { Child = drawable }.Yield()));
2525

2626
public ITextPart AddIcon(IconUsage icon, Action<SpriteText> creationParameters = null) => AddText(icon.Icon.ToString(), creationParameters);
27+
28+
private partial class ArbitraryDrawableWrapper : Container, IHasLineBaseHeight
29+
{
30+
public float LineBaseHeight => DrawHeight;
31+
32+
public ArbitraryDrawableWrapper()
33+
{
34+
AutoSizeAxes = Axes.Both;
35+
}
36+
}
2737
}
2838
}

‎osu.Game/osu.Game.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
</PackageReference>
3737
<PackageReference Include="Realm" Version="20.1.0" />
38-
<PackageReference Include="ppy.osu.Framework" Version="2025.311.0" />
38+
<PackageReference Include="ppy.osu.Framework" Version="2025.313.0" />
3939
<PackageReference Include="ppy.osu.Game.Resources" Version="2025.307.0" />
4040
<PackageReference Include="Sentry" Version="5.1.1" />
4141
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->

‎osu.iOS.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
<MtouchInterpreter>-all</MtouchInterpreter>
1818
</PropertyGroup>
1919
<ItemGroup>
20-
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.311.0" />
20+
<PackageReference Include="ppy.osu.Framework.iOS" Version="2025.313.0" />
2121
</ItemGroup>
2222
</Project>

0 commit comments

Comments
 (0)
Please sign in to comment.