FReply SImGuiCanvasControl::OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent)
{
auto Operation = DragDropEvent.GetOperationAs<FImGuiDragDropOperation>();
if (Operation.IsValid())
{
const FSlateRenderTransform ScreenToWidget = MyGeometry.GetAccumulatedRenderTransform().Inverse();
const FVector2D DragDelta = ScreenToWidget.TransformVector(DragDropEvent.GetScreenSpacePosition() - Operation->StartPosition);
if (Operation->DragType == EDragType::Content)
{
// Content offset is in ImGui space, so we need to scale drag calculated in widget space.
ContentOffset = Operation->StartOffset + DragDelta / CanvasScale;
}
else
{
// Canvas offset is in widget space, so we can apply drag calculated in widget space directly.
CanvasOffset = Operation->StartOffset + DragDelta;
}
UpdateRenderTransform();
return FReply::Handled();
}
else
{
return FReply::Unhandled();
}
}
Because of error:
1>C:\Work\unrealprojects\UEVtsCore\Plugins\ImGui\Source\ImGui\Private\Widgets\SImGuiCanvasControl.cpp(179): error C2440: 'initializing': cannot convert from 'UE::Math::TVector2<float>' to 'UE::Math::TVector2<double>'
1>C:\Work\unrealprojects\UEVtsCore\Plugins\ImGui\Source\ImGui\Private\Widgets\SImGuiCanvasControl.cpp(179): note: Constructor for struct 'UE::Math::TVector2<double>' is declared 'explicit'
Hi in 5.2 there is problem in compilation
of this code segment:
Because of error: