2019-01-24 16:43:03 +08:00
|
|
|
|
// 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;
|
2019-01-22 13:22:38 +08:00
|
|
|
|
using System.Collections.Generic;
|
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
|
|
|
|
|
{
|
2019-02-28 12:31:40 +08:00
|
|
|
|
public OsuTextFlowContainer(Action<SpriteText> defaultCreationParameters = null)
|
|
|
|
|
: base(defaultCreationParameters)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override SpriteText CreateSpriteText() => new OsuSpriteText();
|
|
|
|
|
|
2018-06-28 12:04:39 +08:00
|
|
|
|
public void AddArbitraryDrawable(Drawable drawable) => AddInternal(drawable);
|
|
|
|
|
|
2019-03-27 18:29:27 +08:00
|
|
|
|
public IEnumerable<Drawable> AddIcon(IconUsage icon, Action<SpriteText> creationParameters = null) => AddText(icon.Icon.ToString(), creationParameters);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|