mirror of https://github.com/ppy/osu
Add EditorContextMenu in line with framework changes
To avoid public Menu.
This commit is contained in:
parent
c39bb6e647
commit
4ab209bdce
|
@ -1 +1 @@
|
|||
Subproject commit fbbcd942e262778b166acde2cc89a10782734f2d
|
||||
Subproject commit a5fd0c82c8f86d41c80ac1b0b07727cb312330f1
|
|
@ -126,7 +126,6 @@ public EditorMenuBarItem(string title)
|
|||
private void load(OsuColour colours)
|
||||
{
|
||||
background.Colour = colours.Gray3;
|
||||
ContextMenu.Menu.Background.Colour = colours.Gray3;
|
||||
TitleText.Colour = normalColour = colours.BlueLight;
|
||||
}
|
||||
|
||||
|
@ -148,12 +147,21 @@ public override void Close()
|
|||
|
||||
protected override SpriteText CreateTitleText() => new OsuSpriteText { TextSize = text_size };
|
||||
|
||||
protected override ContextMenu<ContextMenuItem> CreateContextMenu() => new OsuContextMenu<ContextMenuItem>
|
||||
protected override ContextMenu<ContextMenuItem> CreateContextMenu() => new EditorContextMenu
|
||||
{
|
||||
OriginPosition = new Vector2(8, 0)
|
||||
};
|
||||
}
|
||||
|
||||
private class EditorContextMenu : OsuContextMenu<ContextMenuItem>
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Menu.Background.Colour = colours.Gray3;
|
||||
}
|
||||
}
|
||||
|
||||
private class EditorContextMenuSpacer : EditorContextMenuItem
|
||||
{
|
||||
public override bool HandleInput => false;
|
||||
|
|
Loading…
Reference in New Issue