Add raycast support to the ContainerControl

This commit is contained in:
Amir Alizadeh
2025-01-19 23:55:56 +03:30
parent 55fd198102
commit ec11a79f55

View File

@@ -858,6 +858,14 @@ namespace FlaxEngine.GUI
} }
} }
/// <inheritdoc />
public override bool ContainsPoint(ref Float2 location, bool precise = false)
{
if (precise && this.GetType() == typeof(ContainerControl) && BackgroundColor.A <= 0.0f) // Go through transparency
return false;
return base.ContainsPoint(ref location, precise);
}
/// <inheritdoc /> /// <inheritdoc />
public override void PerformLayout(bool force = false) public override void PerformLayout(bool force = false)
{ {