How can I DetectDragifPressed from within cpp?
FEventReply UItemWidget::OnMouseButtonDown_Implementation(FGeometry MyGeometry, const FPointerEvent & MouseEvent)
{
FEventReply reply = Super::OnMouseButtonDown_Implementation(MyGeometry, MouseEvent);
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("UItemWidget::OnMouseButtonDown_Implementation!"));
return reply;
}
I’m guessing it looks something like this but I cannot cast my UUserWidget this way
FReply::Handled().DetectDrag(MakeShareable(this), EKeys::LeftMouseButton);
https://forums.unrealengine.com/attachment.php?attachmentid=14385&d=1413500597
Also, on OnDragDetected_Implementation, how would I create a DragDropOperation
void UItemWidget::OnDragDetected_Implementation(struct FGeometry MyGeometry, const struct FPointerEvent & PointerEvent, class UDragDropOperation *& Operation)
{
Super::OnDragDetected_Implementation(MyGeometry, PointerEvent, Operation);
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("OnDragDetected_Implementation!"));
}
https://forums.unrealengine.com/attachment.php?attachmentid=14386&d=1413500612