private void OnPointerMoved(GuiPointerEventArgs args) { CursorPosition = args.Position.ToVector2(); if (Screen == null) { return; } var hoveredControl = FindControlAtPoint(Screen.Controls, args.Position); if (_hoveredControl != hoveredControl) { _hoveredControl?.OnPointerLeave(args); _hoveredControl = hoveredControl; _hoveredControl?.OnPointerEnter(args); } }
private void OnPointerMoved(GuiPointerEventArgs args) { CursorPosition = args.Position.ToVector2(); if (ActiveScreen == null || !ActiveScreen.IsVisible) { return; } var hoveredControl = FindControlAtPoint(args.Position); if (_hoveredControl != hoveredControl) { _hoveredControl?.OnPointerLeave(this, args); _hoveredControl = hoveredControl; _hoveredControl?.OnPointerEnter(this, args); } }