5#include "EdGraphSchema_K2.h"
7#include "DialogueK2Node_Select.generated.h"
22UCLASS(MinimalAPI, Meta=(Keywords =
"Ternary If"))
31 void AllocateDefaultPins()
override;
32 void PinTypeChanged(UEdGraphPin* Pin)
override;
33 FText GetTooltipText()
const override;
34 void NodeConnectionListChanged()
override;
35 FText GetNodeTitle(ENodeTitleType::Type TitleType)
const override;
36 FSlateIcon GetIconAndTint(FLinearColor& OutColor)
const override;
40 bool IsNodeSafeToIgnore()
const override {
return true; }
41 bool IsNodePure()
const override {
return true; }
42 class FNodeHandlingFunctor* CreateNodeHandler(
class FKismetCompilerContext& CompilerContext)
const override;
43 bool IsConnectionDisallowed(
const UEdGraphPin* MyPin,
const UEdGraphPin* OtherPin, FString& OutReason)
const override;
44 virtual void NotifyPinConnectionListChanged(UEdGraphPin* Pin)
override;
45 void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar)
const override;
46 FText GetMenuCategory()
const override;
47 int32 GetNodeRefreshPriority()
const override {
return EBaseNodeRefreshPriority::Normal; }
48 void PostReconstructNode()
override;
53 UEdGraphPin* GetReturnValuePin()
const
55 check(Pins.IsValidIndex(INDEX_PIN_Return) && Pins[INDEX_PIN_Return]->PinName == UEdGraphSchema_K2::PN_ReturnValue)
56 return Pins[INDEX_PIN_Return];
61 UEdGraphPin* GetVariableNamePin()
const
63 check(Pins.IsValidIndex(INDEX_PIN_VariableName) && Pins[INDEX_PIN_VariableName]->PinName == PIN_VariableName)
64 return Pins[INDEX_PIN_VariableName];
68 UEdGraphPin* GetDefaultValuePin()
const
70 check(Pins.IsValidIndex(INDEX_PIN_Default) && Pins[INDEX_PIN_Default]->PinName == PIN_DefaultValue)
71 return Pins[INDEX_PIN_Default];
75 const TArray<UEdGraphPin*> GetOptionPins()
const
78 TArray<UEdGraphPin*> OptionPins;
79 for (int32 PinIndex = INDEX_PIN_OPTIONS_START, PinsNum = Pins.Num(); PinIndex < PinsNum; PinIndex++)
82 OptionPins.Add(Pins[PinIndex]);
89 static UFunction* GetConditionalFunction();
92 static void GetPrintStringFunction(FName& FunctionName, UClass** FunctionClass);
95 bool RefreshPinNames();
99 void RefreshVariablePinType()
101 switch (VariableType)
104 VariablePinType = UEdGraphSchema_K2::PC_Float;
107 VariablePinType = UEdGraphSchema_K2::PC_Int;
110 VariablePinType = UEdGraphSchema_K2::PC_Name;
113 VariablePinType = UEdGraphSchema_K2::PC_Wildcard;
122 static constexpr int32 INDEX_PIN_Return = 0;
123 static constexpr int32 INDEX_PIN_VariableName = 1;
124 static constexpr int32 INDEX_PIN_Default = 2;
125 static constexpr int32 INDEX_PIN_OPTIONS_START = 3;
130 TArray<FName> PinNames;
137 FName VariablePinType;
141 bool bReconstructNode;
144 static const FName PIN_VariableName;
145 static const FName PIN_DefaultValue;
151UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
160 FText GetTooltipText() const override;
161 FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
167UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
176 FText GetTooltipText() const override;
177 FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
183UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
192 FText GetTooltipText() const override;
193 FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
FText GetTooltipText() const override
FText GetNodeTitle(ENodeTitleType::Type TitleType) const override
UDialogueK2Node_SelectFloat(const FObjectInitializer &ObjectInitializer)
UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
void PinTypeChanged(UEdGraphPin *Pin) override
FName VariablePinType
UPROPERTY()
bool IsNodePure() const override
UEdGraphPin * GetVariableNamePin() const
UDialogueK2Node_Select(const FObjectInitializer &ObjectInitializer)
bool bReconstructNode
UPROPERTY(Transient)
FText GetMenuCategory() const override
bool IsConnectionDisallowed(const UEdGraphPin *MyPin, const UEdGraphPin *OtherPin, FString &OutReason) const override
UEdGraphPin * GetReturnValuePin() const
class FNodeHandlingFunctor * CreateNodeHandler(class FKismetCompilerContext &CompilerContext) const override
FText GetNodeTitle(ENodeTitleType::Type TitleType) const override
void GetMenuActions(FBlueprintActionDatabaseRegistrar &ActionRegistrar) const override
EDlgVariableType VariableType
UPROPERTY()
TArray< FName > PinNames
UPROPERTY()
static const FName PIN_VariableName
const TArray< UEdGraphPin * > GetOptionPins() const
static constexpr int32 INDEX_PIN_VariableName
int32 GetNodeRefreshPriority() const override
FText GetTooltipText() const override
void PostReconstructNode() override
static constexpr int32 INDEX_PIN_Return
UEdGraphPin * GetDefaultValuePin() const
void RefreshVariablePinType()
bool IsNodeSafeToIgnore() const override
FSlateIcon GetIconAndTint(FLinearColor &OutColor) const override
static constexpr int32 INDEX_PIN_OPTIONS_START
virtual void NotifyPinConnectionListChanged(UEdGraphPin *Pin) override
void AllocateDefaultPins() override
static void GetPrintStringFunction(FName &FunctionName, UClass **FunctionClass)
static constexpr int32 INDEX_PIN_Default
static const FName PIN_DefaultValue
static UFunction * GetConditionalFunction()
void NodeConnectionListChanged() override
UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
FText GetNodeTitle(ENodeTitleType::Type TitleType) const override
UDialogueK2Node_SelectName(const FObjectInitializer &ObjectInitializer)
FText GetTooltipText() const override
UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
FText GetNodeTitle(ENodeTitleType::Type TitleType) const override
FText GetTooltipText() const override
UDialogueK2Node_SelectOnSpeakerState(const FObjectInitializer &ObjectInitializer)