From 9db3fee4b477eb6ec1db1f3a0f8524d26e902e25 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Sun, 2 Apr 2017 21:03:33 +0200 Subject: [PATCH] make Screens work --- osu.Game/Graphics/Cursor/MenuCursor.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 82422765a3..ca462d78cc 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -71,17 +71,14 @@ namespace osu.Game.Graphics.Cursor private void searchTooltip(Tooltip tooltip, Vector2 mousePosition, IContainerEnumerable children) { - IEnumerable next = children.Children.Where(drawable => drawable.Contains(mousePosition) && !(drawable is CursorContainer)); + IEnumerable next = children.InternalChildren.Where(drawable => drawable.Contains(mousePosition) && !(drawable is CursorContainer)); foreach (Drawable drawable in next) { string tooltipText = (drawable as IHasTooltip)?.Tooltip ?? ""; if (tooltipText != "") tooltip.TooltipText = tooltipText; - - var childScreen = (drawable as Screen)?.ChildScreen; - if (childScreen != null) - searchTooltip(tooltip, mousePosition, childScreen); - else if (drawable is IContainer) + + if (drawable is IContainer) searchTooltip(tooltip, mousePosition, drawable as IContainerEnumerable); } }