mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 14:02:55 +08:00
Updated usage for DropDownHeader of FilterTabControl
This commit is contained in:
parent
40bcc63a90
commit
ee3d3b682f
@ -11,7 +11,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
public class OsuDropDownMenu<U> : DropDownMenu<U>
|
public class OsuDropDownMenu<U> : DropDownMenu<U>
|
||||||
{
|
{
|
||||||
protected override BasicDropDownHeader CreateHeader() => new OsuDropDownHeader();
|
protected override DropDownHeader CreateHeader() => new OsuDropDownHeader();
|
||||||
|
|
||||||
public OsuDropDownMenu()
|
public OsuDropDownMenu()
|
||||||
{
|
{
|
||||||
|
@ -8,16 +8,19 @@ using osu.Game.Graphics;
|
|||||||
|
|
||||||
namespace osu.Game.Screens.Select.Tab
|
namespace osu.Game.Screens.Select.Tab
|
||||||
{
|
{
|
||||||
public class FilterTabDropDownHeader : BasicDropDownHeader
|
public class FilterTabDropDownHeader : DropDownHeader
|
||||||
{
|
{
|
||||||
protected override string Label { get; set; }
|
protected override string Label { get; set; }
|
||||||
|
|
||||||
private TextAwesome ellipses;
|
private TextAwesome ellipses;
|
||||||
|
|
||||||
public FilterTabDropDownHeader()
|
public FilterTabDropDownHeader() {
|
||||||
{
|
Background.Hide(); // don't need a background
|
||||||
|
RelativeSizeAxes = Axes.None;
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Children = new Drawable[]
|
Foreground.RelativeSizeAxes = Axes.None;
|
||||||
|
Foreground.AutoSizeAxes = Axes.Both;
|
||||||
|
Foreground.Children = new Drawable[]
|
||||||
{
|
{
|
||||||
ellipses = new TextAwesome
|
ellipses = new TextAwesome
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Screens.Select.Tab
|
|||||||
public override float HeaderWidth => 14;
|
public override float HeaderWidth => 14;
|
||||||
public override float HeaderHeight => 24;
|
public override float HeaderHeight => 24;
|
||||||
|
|
||||||
protected override BasicDropDownHeader CreateHeader() => new FilterTabDropDownHeader();
|
protected override DropDownHeader CreateHeader() => new FilterTabDropDownHeader();
|
||||||
|
|
||||||
protected override IEnumerable<DropDownMenuItem<T>> GetDropDownItems(IEnumerable<KeyValuePair<string, T>> values)
|
protected override IEnumerable<DropDownMenuItem<T>> GetDropDownItems(IEnumerable<KeyValuePair<string, T>> values)
|
||||||
=> values.Select(v => new FilterTabDropDownMenuItem<T>(v.Key, v.Value));
|
=> values.Select(v => new FilterTabDropDownMenuItem<T>(v.Key, v.Value));
|
||||||
|
Loading…
Reference in New Issue
Block a user