1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-19 05:22:57 +08:00
osu-lazer/osu.Game.Tests/Visual/TestCaseBreadcrumbs.cs

47 lines
1.3 KiB
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-09-18 21:32:49 +08:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-03-02 14:34:31 +08:00
using NUnit.Framework;
using osu.Framework.Allocation;
2017-09-18 21:32:49 +08:00
using osu.Framework.Graphics;
using osu.Game.Graphics;
2017-09-18 21:32:49 +08:00
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Tests.Visual
{
2018-03-02 14:34:31 +08:00
[TestFixture]
2017-12-20 20:47:45 +08:00
public class TestCaseBreadcrumbs : OsuTestCase
2017-09-18 21:32:49 +08:00
{
private readonly BreadcrumbControl<BreadcrumbTab> breadcrumbs;
2017-09-18 21:32:49 +08:00
public TestCaseBreadcrumbs()
{
Add(breadcrumbs = new BreadcrumbControl<BreadcrumbTab>
2017-09-18 21:32:49 +08:00
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
Width = 0.5f,
});
AddStep(@"first", () => breadcrumbs.Current.Value = BreadcrumbTab.Click);
AddStep(@"second", () => breadcrumbs.Current.Value = BreadcrumbTab.The);
AddStep(@"third", () => breadcrumbs.Current.Value = BreadcrumbTab.Circles);
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
breadcrumbs.StripColour = colours.Blue;
2017-09-18 21:32:49 +08:00
}
private enum BreadcrumbTab
{
Click,
The,
Circles,
}
}
}