mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Update CollectionsDropdown in line with framework
This commit is contained in:
@ -15,13 +15,41 @@ namespace osu.Game.Overlays.Music
|
|||||||
{
|
{
|
||||||
public class CollectionsDropdown<T> : OsuDropdown<T>
|
public class CollectionsDropdown<T> : OsuDropdown<T>
|
||||||
{
|
{
|
||||||
protected override DropdownHeader CreateHeader() => new CollectionsHeader { AccentColour = AccentColour };
|
[BackgroundDependencyLoader]
|
||||||
protected override Menu CreateMenu() => new CollectionsMenu();
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
AccentColour.Value = colours.Gray6;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override DropdownHeader CreateHeader()
|
||||||
|
{
|
||||||
|
var newHeader = new CollectionsHeader();
|
||||||
|
newHeader.AccentColour.BindTo(AccentColour);
|
||||||
|
|
||||||
|
return newHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override DropdownMenu CreateMenu() => new CollectionsMenu();
|
||||||
|
|
||||||
|
private class CollectionsMenu : OsuDropdownMenu
|
||||||
|
{
|
||||||
|
public CollectionsMenu()
|
||||||
|
{
|
||||||
|
CornerRadius = 5;
|
||||||
|
EdgeEffect = new EdgeEffectParameters
|
||||||
|
{
|
||||||
|
Type = EdgeEffectType.Shadow,
|
||||||
|
Colour = Color4.Black.Opacity(0.3f),
|
||||||
|
Radius = 3,
|
||||||
|
Offset = new Vector2(0f, 1f),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
AccentColour = colours.Gray6;
|
BackgroundColour = colours.Gray4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CollectionsHeader : OsuDropdownHeader
|
private class CollectionsHeader : OsuDropdownHeader
|
||||||
@ -48,26 +76,5 @@ namespace osu.Game.Overlays.Music
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CollectionsMenu : OsuMenu
|
|
||||||
{
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(OsuColour colours)
|
|
||||||
{
|
|
||||||
Background.Colour = colours.Gray4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CollectionsMenu()
|
|
||||||
{
|
|
||||||
CornerRadius = 5;
|
|
||||||
EdgeEffect = new EdgeEffectParameters
|
|
||||||
{
|
|
||||||
Type = EdgeEffectType.Shadow,
|
|
||||||
Colour = Color4.Black.Opacity(0.3f),
|
|
||||||
Radius = 3,
|
|
||||||
Offset = new Vector2(0f, 1f),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user