mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Remove nested types completely.
This commit is contained in:
parent
3dee39346f
commit
b0340f77d8
@ -29,7 +29,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
accentColour = value;
|
accentColour = value;
|
||||||
if (Header != null)
|
if (Header != null)
|
||||||
((OsuDropdownHeader)Header).AccentColour = value;
|
((OsuDropdownHeader)Header).AccentColour = value;
|
||||||
foreach (var item in MenuItems.OfType<OsuDropdownMenuItem<T>>())
|
foreach (var item in MenuItems.OfType<OsuDropdownMenuItem>())
|
||||||
item.AccentColour = value;
|
item.AccentColour = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -41,11 +41,11 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
AccentColour = colours.PinkDarker;
|
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);
|
Foreground.Padding = new MarginPadding(2);
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
{
|
{
|
||||||
protected override Dropdown<T> CreateDropdown() => new OsuTabDropdown();
|
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);
|
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;
|
var dropDown = Dropdown as OsuTabDropdown;
|
||||||
if (dropDown != null)
|
if (dropDown != null)
|
||||||
dropDown.AccentColour = value;
|
dropDown.AccentColour = value;
|
||||||
foreach (var item in TabContainer.Children.OfType<OsuTabItem<T>>())
|
foreach (var item in TabContainer.Children.OfType<OsuTabItem>())
|
||||||
item.AccentColour = value;
|
item.AccentColour = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class OsuTabItem<T1> : TabItem<T1>
|
private class OsuTabItem : TabItem<T>
|
||||||
{
|
{
|
||||||
private SpriteText text;
|
private SpriteText text;
|
||||||
private Box box;
|
private Box box;
|
||||||
@ -74,7 +74,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public new T1 Value
|
public new T Value
|
||||||
{
|
{
|
||||||
get { return base.Value; }
|
get { return base.Value; }
|
||||||
set
|
set
|
||||||
|
Loading…
Reference in New Issue
Block a user