2017-02-07 12:59:30 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-09-26 13:56:05 +08:00
|
|
|
|
|
2016-10-26 16:26:26 +08:00
|
|
|
|
using System;
|
2017-02-17 17:59:30 +08:00
|
|
|
|
using osu.Framework.Screens.Testing;
|
2016-09-23 23:39:20 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.MathUtils;
|
|
|
|
|
using osu.Game.Graphics;
|
2016-10-26 16:26:26 +08:00
|
|
|
|
using OpenTK;
|
|
|
|
|
using OpenTK.Graphics;
|
2016-09-23 23:39:20 +08:00
|
|
|
|
|
2016-10-26 16:26:26 +08:00
|
|
|
|
namespace osu.Desktop.VisualTests.Tests
|
2016-09-23 23:39:20 +08:00
|
|
|
|
{
|
|
|
|
|
class TestCaseTextAwesome : TestCase
|
|
|
|
|
{
|
|
|
|
|
public override string Name => @"TextAwesome";
|
|
|
|
|
|
|
|
|
|
public override string Description => @"Tests display of icons";
|
|
|
|
|
|
|
|
|
|
public override void Reset()
|
|
|
|
|
{
|
|
|
|
|
base.Reset();
|
|
|
|
|
|
2017-03-02 02:33:01 +08:00
|
|
|
|
FillFlowContainer flow;
|
2016-09-23 23:39:20 +08:00
|
|
|
|
|
2017-03-02 02:33:01 +08:00
|
|
|
|
Add(flow = new FillFlowContainer()
|
2016-09-23 23:39:20 +08:00
|
|
|
|
{
|
2016-10-01 17:40:14 +08:00
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2016-09-23 23:39:20 +08:00
|
|
|
|
Size = new Vector2(0.5f),
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
int i = 50;
|
|
|
|
|
foreach (FontAwesome fa in Enum.GetValues(typeof(FontAwesome)))
|
|
|
|
|
{
|
|
|
|
|
flow.Add(new TextAwesome
|
|
|
|
|
{
|
|
|
|
|
Icon = fa,
|
|
|
|
|
TextSize = 60,
|
|
|
|
|
Colour = new Color4(
|
|
|
|
|
Math.Max(0.5f, RNG.NextSingle()),
|
|
|
|
|
Math.Max(0.5f, RNG.NextSingle()),
|
|
|
|
|
Math.Max(0.5f, RNG.NextSingle()),
|
|
|
|
|
1)
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (i-- == 0) break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|