bool SceneView3D::MouseInView() { if (!GetInternalWidget()) return false; if (!TBWidget::hovered_widget || TBWidget::hovered_widget->GetDelegate() != this) return false; Input* input = GetSubsystem<Input>(); IntVector2 pos = input->GetMousePosition(); IntRect rect = GetRect(); GetInternalWidget()->ConvertToRoot(rect.left_, rect.top_); GetInternalWidget()->ConvertToRoot(rect.right_, rect.bottom_); return rect.IsInside(pos); }