mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09:00
make Screens work
This commit is contained in:
parent
8bc241da3d
commit
9db3fee4b4
@ -71,17 +71,14 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
|
|
||||||
private void searchTooltip(Tooltip tooltip, Vector2 mousePosition, IContainerEnumerable<Drawable> children)
|
private void searchTooltip(Tooltip tooltip, Vector2 mousePosition, IContainerEnumerable<Drawable> children)
|
||||||
{
|
{
|
||||||
IEnumerable<Drawable> next = children.Children.Where(drawable => drawable.Contains(mousePosition) && !(drawable is CursorContainer));
|
IEnumerable<Drawable> next = children.InternalChildren.Where(drawable => drawable.Contains(mousePosition) && !(drawable is CursorContainer));
|
||||||
|
|
||||||
foreach (Drawable drawable in next)
|
foreach (Drawable drawable in next)
|
||||||
{
|
{
|
||||||
string tooltipText = (drawable as IHasTooltip)?.Tooltip ?? "";
|
string tooltipText = (drawable as IHasTooltip)?.Tooltip ?? "";
|
||||||
if (tooltipText != "") tooltip.TooltipText = tooltipText;
|
if (tooltipText != "") tooltip.TooltipText = tooltipText;
|
||||||
|
|
||||||
var childScreen = (drawable as Screen)?.ChildScreen;
|
if (drawable is IContainer)
|
||||||
if (childScreen != null)
|
|
||||||
searchTooltip(tooltip, mousePosition, childScreen);
|
|
||||||
else if (drawable is IContainer)
|
|
||||||
searchTooltip(tooltip, mousePosition, drawable as IContainerEnumerable<Drawable>);
|
searchTooltip(tooltip, mousePosition, drawable as IContainerEnumerable<Drawable>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user