mirror of
https://github.com/ppy/osu
synced 2024-12-14 02:46:27 +00:00
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|||
|
|
|||
|
using osu.Framework.Graphics;
|
|||
|
using osu.Framework.Graphics.Containers;
|
|||
|
using osu.Framework.Testing;
|
|||
|
using osu.Game.Graphics.Sprites;
|
|||
|
using osu.Game.Graphics.UserInterface;
|
|||
|
|
|||
|
namespace osu.Desktop.VisualTests.Tests
|
|||
|
{
|
|||
|
internal class TestCaseTooltip : TestCase
|
|||
|
{
|
|||
|
public override string Description => "tests tooltips on various elements";
|
|||
|
|
|||
|
public override void Reset()
|
|||
|
{
|
|||
|
base.Reset();
|
|||
|
|
|||
|
Children = new Drawable[]
|
|||
|
{
|
|||
|
new FillFlowContainer
|
|||
|
{
|
|||
|
RelativeSizeAxes = Axes.Both,
|
|||
|
Direction = FillDirection.Vertical,
|
|||
|
Children = new[]
|
|||
|
{
|
|||
|
new TooltipSpriteText
|
|||
|
{
|
|||
|
Text = "Text with some tooltip",
|
|||
|
},
|
|||
|
new TooltipSpriteText
|
|||
|
{
|
|||
|
Text = "and another one",
|
|||
|
},
|
|||
|
|
|||
|
},
|
|||
|
},
|
|||
|
};
|
|||
|
}
|
|||
|
|
|||
|
private class TooltipSpriteText : OsuSpriteText, IHasTooltip
|
|||
|
{
|
|||
|
public string Tooltip => Text;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|