You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[UE-168360] User can create a transition from a state into the entry state * Relinking multiple transitions (transition nodes at once) when none of the transition nodes is selected. * Selective relinking in case a subset of the transition nodes on a transitions are selected. * Special case handling for transitions from entry state (they don't have a transition node connected). * Drawing circle indicator around the arrow head in case the mouse cursor is approaching the transition. * Hovering the arrow head of a transition highlights it by filling the circle with solid orange color and turning the arrow black. * Ending the relink operation in empty space or the entry node will cancel the relink operation. * Fixed bug that prevents creating new transitions ending in an entry state. #jira https://jira.it.epicgames.com/browse/UE-136096 #jira https://jira.it.epicgames.com/browse/UE-168360 #preflight 636a169963037c10262bc421 [CL 23025287 by benjamin jillich in ue5-main branch]
94 lines
2.2 KiB
C++
94 lines
2.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "SGraphPin.h"
|
|
|
|
/////////////////////////////////////////////////////
|
|
// FGraphSplineOverlapResult
|
|
|
|
struct GRAPHEDITOR_API FGraphSplineOverlapResult
|
|
{
|
|
public:
|
|
FGraphSplineOverlapResult(bool InCloseToSpline = false)
|
|
: Pin1Handle(nullptr)
|
|
, Pin2Handle(nullptr)
|
|
, BestPinHandle(nullptr)
|
|
, Pin1(nullptr)
|
|
, Pin2(nullptr)
|
|
, DistanceSquared(FLT_MAX)
|
|
, DistanceSquaredToPin1(FLT_MAX)
|
|
, DistanceSquaredToPin2(FLT_MAX)
|
|
, bCloseToSpline(InCloseToSpline)
|
|
{
|
|
}
|
|
|
|
FGraphSplineOverlapResult(UEdGraphPin* InPin1, UEdGraphPin* InPin2, float InDistanceSquared, float InDistanceSquaredToPin1, float InDistanceSquaredToPin2, bool InCloseToSpline)
|
|
: Pin1Handle(InPin1)
|
|
, Pin2Handle(InPin2)
|
|
, BestPinHandle(nullptr)
|
|
, Pin1(InPin1)
|
|
, Pin2(InPin2)
|
|
, DistanceSquared(InDistanceSquared)
|
|
, DistanceSquaredToPin1(InDistanceSquaredToPin1)
|
|
, DistanceSquaredToPin2(InDistanceSquaredToPin2)
|
|
, bCloseToSpline(InCloseToSpline)
|
|
{
|
|
}
|
|
|
|
bool IsValid() const
|
|
{
|
|
return DistanceSquared < FLT_MAX;
|
|
}
|
|
|
|
void ComputeBestPin();
|
|
|
|
float GetDistanceSquared() const
|
|
{
|
|
return DistanceSquared;
|
|
}
|
|
|
|
bool GetCloseToSpline() const
|
|
{
|
|
return bCloseToSpline;
|
|
}
|
|
|
|
void SetCloseToSpline(bool InCloseToSpline)
|
|
{
|
|
bCloseToSpline = InCloseToSpline;
|
|
}
|
|
|
|
TSharedPtr<class SGraphPin> GetBestPinWidget(const class SGraphPanel& InGraphPanel) const
|
|
{
|
|
TSharedPtr<class SGraphPin> Result;
|
|
if (IsValid())
|
|
{
|
|
Result = BestPinHandle.FindInGraphPanel(InGraphPanel);
|
|
}
|
|
return Result;
|
|
}
|
|
|
|
FGraphPinHandle GetBestPinHandle() const
|
|
{
|
|
return BestPinHandle;
|
|
}
|
|
|
|
FGraphPinHandle GetPin1Handle() const { return Pin1Handle; }
|
|
FGraphPinHandle GetPin2Handle() const { return Pin2Handle; }
|
|
|
|
bool GetPins(const class SGraphPanel& InGraphPanel, UEdGraphPin*& OutPin1, UEdGraphPin*& OutPin2) const;
|
|
void GetPinWidgets(const class SGraphPanel& InGraphPanel, TSharedPtr<class SGraphPin>& OutPin1, TSharedPtr<class SGraphPin>& OutPin2) const;
|
|
|
|
protected:
|
|
FGraphPinHandle Pin1Handle;
|
|
FGraphPinHandle Pin2Handle;
|
|
FGraphPinHandle BestPinHandle;
|
|
UEdGraphPin* Pin1;
|
|
UEdGraphPin* Pin2;
|
|
float DistanceSquared;
|
|
float DistanceSquaredToPin1;
|
|
float DistanceSquaredToPin2;
|
|
bool bCloseToSpline;
|
|
};
|