Remove nested types completely.

This commit is contained in:
Dean Herbert 2017-03-23 08:57:14 +09:00
parent 3dee39346f
commit b0340f77d8
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
2 changed files with 8 additions and 8 deletions

View File

@ -29,7 +29,7 @@ namespace osu.Game.Graphics.UserInterface
accentColour = value;
if (Header != null)
((OsuDropdownHeader)Header).AccentColour = value;
foreach (var item in MenuItems.OfType<OsuDropdownMenuItem<T>>())
foreach (var item in MenuItems.OfType<OsuDropdownMenuItem>())
item.AccentColour = value;
}
}
@ -41,11 +41,11 @@ namespace osu.Game.Graphics.UserInterface
AccentColour = colours.PinkDarker;
}
protected override DropdownMenuItem<T> CreateMenuItem(string text, T value) => new OsuDropdownMenuItem<T>(text, value) { AccentColour = AccentColour };
protected override DropdownMenuItem<T> CreateMenuItem(string text, T value) => new OsuDropdownMenuItem(text, value) { AccentColour = AccentColour };
private class OsuDropdownMenuItem<T1> : DropdownMenuItem<T1>
private class OsuDropdownMenuItem : DropdownMenuItem<T>
{
public OsuDropdownMenuItem(string text, T1 value) : base(text, value)
public OsuDropdownMenuItem(string text, T value) : base(text, value)
{
Foreground.Padding = new MarginPadding(2);

View File

@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
{
protected override Dropdown<T> CreateDropdown() => new OsuTabDropdown();
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem<T> { Value = value };
protected override TabItem<T> CreateTabItem(T value) => new OsuTabItem { Value = value };
protected override bool InternalContains(Vector2 screenSpacePos) => base.InternalContains(screenSpacePos) || Dropdown.Contains(screenSpacePos);
@ -52,12 +52,12 @@ namespace osu.Game.Graphics.UserInterface
var dropDown = Dropdown as OsuTabDropdown;
if (dropDown != null)
dropDown.AccentColour = value;
foreach (var item in TabContainer.Children.OfType<OsuTabItem<T>>())
foreach (var item in TabContainer.Children.OfType<OsuTabItem>())
item.AccentColour = value;
}
}
private class OsuTabItem<T1> : TabItem<T1>
private class OsuTabItem : TabItem<T>
{
private SpriteText text;
private Box box;
@ -74,7 +74,7 @@ namespace osu.Game.Graphics.UserInterface
}
}
public new T1 Value
public new T Value
{
get { return base.Value; }
set