1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 03:17:45 +08:00
osu-lazer/osu.Game/Graphics/Containers/OsuTextFlowContainer.cs

25 lines
886 B
C#
Raw Normal View History

2018-04-13 17:19:50 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
2018-06-28 12:04:39 +08:00
using osu.Framework.Graphics;
2018-04-13 17:19:50 +08:00
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Graphics.Containers
{
public class OsuTextFlowContainer : TextFlowContainer
{
public OsuTextFlowContainer(Action<SpriteText> defaultCreationParameters = null) : base(defaultCreationParameters)
{
}
protected override SpriteText CreateSpriteText() => new OsuSpriteText();
2018-06-28 12:04:39 +08:00
public void AddArbitraryDrawable(Drawable drawable) => AddInternal(drawable);
2018-04-13 17:19:50 +08:00
public void AddIcon(FontAwesome icon, Action<SpriteText> creationParameters = null) => AddText(((char)icon).ToString(), creationParameters);
}
}