2017-02-07 04:59:30 +00: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 05:56:05 +00:00
|
|
|
|
|
2016-10-26 08:26:26 +00:00
|
|
|
|
using System;
|
2016-09-23 15:39:20 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.MathUtils;
|
|
|
|
|
using osu.Game.Graphics;
|
2016-10-26 08:26:26 +00:00
|
|
|
|
using OpenTK;
|
|
|
|
|
using OpenTK.Graphics;
|
2016-09-23 15:39:20 +00:00
|
|
|
|
|
2017-08-04 06:37:31 +00:00
|
|
|
|
namespace osu.Desktop.Tests.Visual
|
2016-09-23 15:39:20 +00:00
|
|
|
|
{
|
2017-08-04 06:37:31 +00:00
|
|
|
|
internal class TestCaseTextAwesome : OsuTestCase
|
2016-09-23 15:39:20 +00:00
|
|
|
|
{
|
|
|
|
|
public override string Description => @"Tests display of icons";
|
|
|
|
|
|
2017-07-07 12:05:55 +00:00
|
|
|
|
public TestCaseTextAwesome()
|
2016-09-23 15:39:20 +00:00
|
|
|
|
{
|
2017-03-01 18:33:01 +00:00
|
|
|
|
FillFlowContainer flow;
|
2016-09-23 15:39:20 +00:00
|
|
|
|
|
2017-03-07 01:59:19 +00:00
|
|
|
|
Add(flow = new FillFlowContainer
|
2016-09-23 15:39:20 +00:00
|
|
|
|
{
|
2016-10-01 09:40:14 +00:00
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
2016-09-23 15:39:20 +00:00
|
|
|
|
Size = new Vector2(0.5f),
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
int i = 50;
|
|
|
|
|
foreach (FontAwesome fa in Enum.GetValues(typeof(FontAwesome)))
|
|
|
|
|
{
|
2017-08-03 05:36:21 +00:00
|
|
|
|
flow.Add(new SpriteIcon
|
2016-09-23 15:39:20 +00:00
|
|
|
|
{
|
|
|
|
|
Icon = fa,
|
2017-08-03 05:36:21 +00:00
|
|
|
|
Size = new Vector2(60),
|
2016-09-23 15:39:20 +00:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|