1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 06:52:55 +08:00
osu-lazer/osu.Game.Tests/Visual/TestCaseTextAwesome.cs

56 lines
1.5 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
using System;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Game.Graphics;
2018-11-20 15:51:59 +08:00
using osuTK;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Tests.Visual
{
[TestFixture]
public class TestCaseTextAwesome : OsuTestCase
{
public TestCaseTextAwesome()
{
FillFlowContainer flow;
Add(new ScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = flow = new FillFlowContainer
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Full,
},
});
foreach (FontAwesome fa in Enum.GetValues(typeof(FontAwesome)))
flow.Add(new Icon(fa));
}
private class Icon : Container, IHasTooltip
{
public string TooltipText { get; }
public Icon(FontAwesome fa)
{
TooltipText = fa.ToString();
AutoSizeAxes = Axes.Both;
Child = new SpriteIcon
{
Icon = fa,
Size = new Vector2(60),
};
}
}
}
}