osu-framework
osu-framework copied to clipboard
`TextFlowContainer` incorrectly performs text layout with `TextAnchor` = `TopRight` & `CenterRight`
Code:
new Container
{
Size = new Vector2(100, 300),
Children = new Drawable[]
{
new Box
{
Name = "Background",
RelativeSizeAxes = Axes.Both,
Alpha = 0.1f
},
new TextFlowContainer
{
RelativeSizeAxes = Axes.Both,
TextAnchor = Anchor.TopRight,
Text = "This is using TextAnchor TopRight"
},
new TextFlowContainer
{
RelativeSizeAxes = Axes.Both,
TextAnchor = Anchor.CentreRight,
Text = "This is using TextAnchor CentreRight"
},
new TextFlowContainer
{
RelativeSizeAxes = Axes.Both,
TextAnchor = Anchor.BottomRight,
Text = "This is using TextAnchor BottomRight"
},
},
}
Result:
related: https://github.com/ppy/osu/issues/8580