Updated TabControl Usage

This commit is contained in:
Kelvin
2017-03-14 19:46:13 -07:00
parent ee3d3b682f
commit 755fb260db
7 changed files with 16 additions and 29 deletions

View File

@ -1,19 +1,11 @@
// 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 System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.UserInterface.Tab;
using osu.Framework.Screens.Testing;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Screens.Select.Filter;
using osu.Game.Screens.Select.Tab;
@ -37,7 +29,7 @@ namespace osu.Desktop.VisualTests.Tests
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
filter = new FilterTabControl<GroupMode>(GroupMode.All, GroupMode.RecentlyPlayed)
filter = new FilterTabControl<GroupMode>
{
Width = 229,
AutoSort = true
@ -49,7 +41,10 @@ namespace osu.Desktop.VisualTests.Tests
}
}
});
filter.PinTab(GroupMode.All);
filter.PinTab(GroupMode.RecentlyPlayed);
filter.ValueChanged += (sender, mode) =>
{
Debug.WriteLine($"Selected {mode}");