mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Update to support new framework VisualTests structure
This commit is contained in:
42
osu.Desktop.Tests/Visual/TestCaseTabControl.cs
Normal file
42
osu.Desktop.Tests/Visual/TestCaseTabControl.cs
Normal file
@ -0,0 +1,42 @@
|
||||
// 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.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Select.Filter;
|
||||
using OpenTK;
|
||||
|
||||
namespace osu.Desktop.Tests.Visual
|
||||
{
|
||||
public class TestCaseTabControl : OsuTestCase
|
||||
{
|
||||
public override string Description => @"Filter for song select";
|
||||
|
||||
public TestCaseTabControl()
|
||||
{
|
||||
OsuSpriteText text;
|
||||
OsuTabControl<GroupMode> filter;
|
||||
Add(filter = new OsuTabControl<GroupMode>
|
||||
{
|
||||
Margin = new MarginPadding(4),
|
||||
Size = new Vector2(229, 24),
|
||||
AutoSort = true
|
||||
});
|
||||
Add(text = new OsuSpriteText
|
||||
{
|
||||
Text = "None",
|
||||
Margin = new MarginPadding(4),
|
||||
Position = new Vector2(275, 5)
|
||||
});
|
||||
|
||||
filter.PinItem(GroupMode.All);
|
||||
filter.PinItem(GroupMode.RecentlyPlayed);
|
||||
|
||||
filter.Current.ValueChanged += newFilter =>
|
||||
{
|
||||
text.Text = "Currently Selected: " + newFilter.ToString();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user