mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Upodate some tab usages.
This commit is contained in:
parent
b0ebacb06d
commit
f6303d55ec
@ -36,9 +36,9 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
filter.PinItem(GroupMode.All);
|
||||
filter.PinItem(GroupMode.RecentlyPlayed);
|
||||
|
||||
filter.ItemChanged += (sender, mode) =>
|
||||
filter.SelectedItem.ValueChanged += (sender, args) =>
|
||||
{
|
||||
text.Text = "Currently Selected: " + mode.ToString();
|
||||
text.Text = "Currently Selected: " + filter.SelectedItem.ToString();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
protected override Dropdown<T> CreateDropdown() => new OsuTabDropdown();
|
||||
|
||||
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem { Value = value };
|
||||
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem(value);
|
||||
|
||||
protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || Dropdown.Contains(screenSpacePos);
|
||||
|
||||
@ -75,16 +75,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public new T Value
|
||||
{
|
||||
get { return base.Value; }
|
||||
set
|
||||
{
|
||||
base.Value = value;
|
||||
text.Text = (value as Enum)?.GetDescription();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Active
|
||||
{
|
||||
get { return base.Active; }
|
||||
@ -134,7 +124,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
AccentColour = colours.Blue;
|
||||
}
|
||||
|
||||
public OsuTabItem()
|
||||
public OsuTabItem(T value) : base(value)
|
||||
{
|
||||
AutoSizeAxes = Axes.X;
|
||||
RelativeSizeAxes = Axes.Y;
|
||||
@ -146,6 +136,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
Margin = new MarginPadding { Top = 5, Bottom = 5 },
|
||||
Origin = Anchor.BottomLeft,
|
||||
Anchor = Anchor.BottomLeft,
|
||||
Text = (value as Enum)?.GetDescription(),
|
||||
TextSize = 14,
|
||||
Font = @"Exo2.0-Bold", // Font should only turn bold when active?
|
||||
},
|
||||
|
@ -61,10 +61,10 @@ namespace osu.Game.Screens.Select
|
||||
},
|
||||
};
|
||||
|
||||
tabs.ItemChanged += (sender, e) => invokeOnFilter();
|
||||
tabs.SelectedItem.ValueChanged += (sender, e) => invokeOnFilter();
|
||||
modsCheckbox.Action += (sender, e) => invokeOnFilter();
|
||||
|
||||
tabs.SelectedItem = BeatmapDetailTab.Global;
|
||||
tabs.SelectedItem.Value = BeatmapDetailTab.Global;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user