This commit is contained in:
CortexCore
2025-02-24 23:02:43 +08:00
parent 41715e4413
commit 8261a458e2
105 changed files with 2934 additions and 696 deletions

View File

@@ -84,7 +84,18 @@ namespace BITKit.UX
return "";
}
var screenPosition = Mouse.current.position.ReadValue();
var screenPosition = Vector2.zero;
if (Mouse.current is not null)
{
screenPosition= Mouse.current.position.ReadValue();
}
if (Touchscreen.current is not null)
{
screenPosition = Touchscreen.current.position.ReadValue();
}
screenPosition.y = Screen.height - screenPosition.y;
VisualElement ve = panel.Pick(RuntimePanelUtils.ScreenToPanel(panel, screenPosition));