Add Silk.NET.Input handling and hit-testing

This commit is contained in:
Yoshi Askharoun
2026-07-25 19:11:36 -05:00
parent 7d343e646f
commit 2bd15a4562
9 changed files with 443 additions and 23 deletions
+8
View File
@@ -57,5 +57,13 @@ namespace Microsoft.Iris.Render.OpenGL
renderer.DrawColoredQuad(matrix, Size.X, Size.Y, c, alpha);
}
}
internal override GLVisual? HitTest(Vector2 screenPoint, Matrix4X4<float> parentMatrix)
{
if (!Visible || (MouseOptions & MouseOptions.Hittable) == 0)
return null;
Matrix4X4<float> world = LocalMatrix * parentMatrix;
return ContainsPoint(screenPoint, world) ? this : null;
}
}
}