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 NUnit.Framework;
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Graphics.UserInterface;
|
|
|
|
|
|
2019-03-25 00:02:36 +08:00
|
|
|
|
namespace osu.Game.Tests.Visual.UserInterface
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class TestCaseBreadcrumbs : OsuTestCase
|
|
|
|
|
{
|
|
|
|
|
private readonly BreadcrumbControl<BreadcrumbTab> breadcrumbs;
|
|
|
|
|
|
|
|
|
|
public TestCaseBreadcrumbs()
|
|
|
|
|
{
|
|
|
|
|
Add(breadcrumbs = new BreadcrumbControl<BreadcrumbTab>
|
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private enum BreadcrumbTab
|
|
|
|
|
{
|
|
|
|
|
Click,
|
|
|
|
|
The,
|
|
|
|
|
Circles,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|