1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-17 22:17:25 +08:00

Use tooltip and context menu containers as newly required

This commit is contained in:
Thomas Müller 2017-07-06 15:15:12 +03:00
parent 7162de09f9
commit d68f17b697
4 changed files with 11 additions and 17 deletions

@ -1 +1 @@
Subproject commit 672e318d541f6a7106a0a2b088dd3ec5e8bff5db
Subproject commit 47ad455b7160b9b936bac1610e4bae8db0c74165

@ -1 +1 @@
Subproject commit 900f47563f5598eef7cbf203f0b3f2166508b6d5
Subproject commit 76656c51f281e7934159e9ed4414378fef24d130

View File

@ -10,9 +10,5 @@ namespace osu.Game.Graphics.Cursor
public class OsuContextMenuContainer : ContextMenuContainer
{
protected override ContextMenu<ContextMenuItem> CreateContextMenu() => new OsuContextMenu<ContextMenuItem>();
public OsuContextMenuContainer(CursorContainer cursor) : base(cursor)
{
}
}
}

View File

@ -37,9 +37,9 @@ namespace osu.Game
public APIAccess API;
protected override Container<Drawable> Content => ratioContainer;
private Container content;
private RatioAdjust ratioContainer;
protected override Container<Drawable> Content => content;
protected MenuCursor Cursor;
@ -146,21 +146,19 @@ namespace osu.Game
{
base.LoadComplete();
base.Content.Add(ratioContainer = new RatioAdjust
base.Content.Add(new RatioAdjust
{
Children = new Drawable[]
{
new Container
Cursor = new MenuCursor(),
new OsuTooltipContainer(Cursor)
{
RelativeSizeAxes = Axes.Both,
Depth = float.MinValue,
Children = new Drawable[]
Child = content = new OsuContextMenuContainer
{
Cursor = new MenuCursor(),
new OsuContextMenuContainer(Cursor) { Depth = -2 },
new OsuTooltipContainer(Cursor) { Depth = -1 },
}
},
RelativeSizeAxes = Axes.Both,
},
}
}
});