mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-13 11:20:31 +00:00
64 lines
1.9 KiB
C#
64 lines
1.9 KiB
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
|
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Graphics.Sprites;
|
|
using osu.Framework.Testing;
|
|
|
|
namespace osu.Framework.Tests.Visual
|
|
{
|
|
public class TestCaseSpriteText : TestCase
|
|
{
|
|
public TestCaseSpriteText()
|
|
{
|
|
FillFlowContainer flow;
|
|
|
|
Children = new Drawable[]
|
|
{
|
|
new ScrollContainer
|
|
{
|
|
RelativeSizeAxes = Axes.Both,
|
|
Children = new[]
|
|
{
|
|
flow = new FillFlowContainer
|
|
{
|
|
Anchor = Anchor.TopLeft,
|
|
AutoSizeAxes = Axes.Y,
|
|
RelativeSizeAxes = Axes.X,
|
|
Direction = FillDirection.Vertical,
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
flow.Add(new SpriteText
|
|
{
|
|
Text = @"the quick red fox jumps over the lazy brown dog"
|
|
});
|
|
flow.Add(new SpriteText
|
|
{
|
|
Text = @"THE QUICK RED FOX JUMPS OVER THE LAZY BROWN DOG"
|
|
});
|
|
flow.Add(new SpriteText
|
|
{
|
|
Text = @"0123456789!@#$%^&*()_-+-[]{}.,<>;'\"
|
|
});
|
|
|
|
for (int i = 1; i <= 200; i++)
|
|
{
|
|
SpriteText text = new SpriteText
|
|
{
|
|
Text = $@"Font testy at size {i}",
|
|
AllowMultiline = true,
|
|
AutoSizeAxes = Axes.Y,
|
|
RelativeSizeAxes = Axes.X,
|
|
TextSize = i
|
|
};
|
|
|
|
flow.Add(text);
|
|
}
|
|
}
|
|
}
|
|
}
|