osu/osu.Game/Beatmaps/Drawables/DifficultyIcon.cs

32 lines
898 B
C#
Raw Normal View History

2016-10-27 02:55:55 +00:00
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2016-11-23 02:59:50 +00:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
2017-01-30 04:35:40 +00:00
using osu.Game.Database;
2016-11-23 02:59:50 +00:00
using osu.Game.Graphics;
2017-01-30 04:35:40 +00:00
using osu.Game.Modes;
2016-11-23 02:59:50 +00:00
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Beatmaps.Drawables
2016-10-27 02:55:55 +00:00
{
class DifficultyIcon : Container
{
2017-01-30 04:35:40 +00:00
public DifficultyIcon(BeatmapInfo beatmap)
2016-10-27 02:55:55 +00:00
{
const float size = 20;
Size = new Vector2(size);
Children = new[]
{
new TextAwesome
{
Anchor = Anchor.Centre,
TextSize = size,
2017-01-30 04:35:40 +00:00
Colour = new Color4(159, 198, 0, 255),
Icon = Ruleset.GetRuleset(beatmap.Mode).Icon
2016-10-27 02:55:55 +00:00
}
};
}
}
}