Add OsuTextFlowContainer.

This commit is contained in:
Huo Yaoyuan
2017-06-13 00:51:06 +08:00
parent 53da671b60
commit fcd137ced2
3 changed files with 24 additions and 8 deletions

View File

@ -0,0 +1,14 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Sprites;
namespace osu.Game.Graphics.Containers
{
public class OsuTextFlowContainer: TextFlowContainer
{
protected override SpriteText CreateSpriteText() => new OsuSpriteText();
}
}

View File

@ -2,15 +2,16 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using System.Collections.Generic;
using OpenTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
using osu.Game.Database; using osu.Game.Database;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK.Graphics; using osu.Game.Graphics.Containers;
using osu.Framework.Localisation;
using osu.Framework.Graphics.Sprites;
using System.Collections.Generic;
namespace osu.Game.Overlays.Music namespace osu.Game.Overlays.Music
{ {
@ -77,7 +78,7 @@ namespace osu.Game.Overlays.Music
Margin = new MarginPadding { Left = 5 }, Margin = new MarginPadding { Left = 5 },
Padding = new MarginPadding { Top = 2 }, Padding = new MarginPadding { Top = 2 },
}, },
text = new TextFlowContainer text = new OsuTextFlowContainer
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,

View File

@ -75,6 +75,7 @@
<Compile Include="Audio\SampleInfoList.cs" /> <Compile Include="Audio\SampleInfoList.cs" />
<Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" /> <Compile Include="Beatmaps\Drawables\BeatmapBackgroundSprite.cs" />
<Compile Include="Beatmaps\DifficultyCalculator.cs" /> <Compile Include="Beatmaps\DifficultyCalculator.cs" />
<Compile Include="Graphics\Containers\OsuTextFlowContainer.cs" />
<Compile Include="Graphics\UserInterface\IconButton.cs" /> <Compile Include="Graphics\UserInterface\IconButton.cs" />
<Compile Include="Configuration\SelectionRandomType.cs" /> <Compile Include="Configuration\SelectionRandomType.cs" />
<Compile Include="Online\API\Requests\GetUsersRequest.cs" /> <Compile Include="Online\API\Requests\GetUsersRequest.cs" />