Add RayCast utility to UI controls

#1952
This commit is contained in:
Wojtek Figat
2024-02-26 16:22:56 +01:00
parent 996a2cb09e
commit f1fe83ca81
16 changed files with 168 additions and 12 deletions

View File

@@ -360,15 +360,15 @@ namespace FlaxEditor.GUI.ContextMenu
}
/// <inheritdoc />
public override bool ContainsPoint(ref Float2 location)
public override bool ContainsPoint(ref Float2 location, bool precise)
{
if (base.ContainsPoint(ref location))
if (base.ContainsPoint(ref location, precise))
return true;
var cLocation = location - Location;
for (int i = 0; i < _panel.Children.Count; i++)
{
if (_panel.Children[i].ContainsPoint(ref cLocation))
if (_panel.Children[i].ContainsPoint(ref cLocation, precise))
return true;
}