Trying to add a combo graph editor.

This commit is contained in:
Jamie Greunbaum
2023-09-27 00:21:59 -04:00
parent bf43acf0dc
commit ea4dd54ec9
43 changed files with 6809 additions and 1 deletions
@@ -0,0 +1,81 @@
// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
#include "Nodes/ComboActionGraphNode_StartNode.h"
#define LOCTEXT_NAMESPACE "ComboActionGraphNode_StartNode"
UComboActionGraphNode_StartNode::UComboActionGraphNode_StartNode()
{
#if WITH_EDITORONLY_DATA
this->bAllowInputNodes = false;
this->NodeTitle = LOCTEXT("ComboActionGraphNode_StartNodeTitle", "Start Action");
this->NodeTypeName = LOCTEXT("ComboActionGraphNode_StartNodeInternalTitle", "Start Action");
this->ContextMenuName = LOCTEXT("ComboActionGraphNode_StartNodeContextMenuName", "Start Action");
this->BackgroundColor = FLinearColor(0, 1, 0, 1);
this->bAllowCopy = false;
this->bAllowCut = false;
this->bAllowPaste = false;
this->bAllowDelete = false;
this->bAllowManualCreate = false;
this->NodeTooltipText = LOCTEXT("ComboActionGraphNode_CompleteTooltip", "* This Node will be added to the graph automatically.\n* This Node cannot be created manually.\n* This Node cannot be deleted.\n* Does not implement any logic.");
#endif
// TODO: Once there are Conditional Decorators, this will be replaced
MaxChildrenNodes = 1;
}
#if WITH_EDITOR
FText UComboActionGraphNode_StartNode::GetDescription_Implementation() const
{
return LOCTEXT("ComboActionGraphNode_StartNodeDescription", "Start node is automatically placed and cannot be deleted.");
}
bool UComboActionGraphNode_StartNode::ValidateNode(TArray<FText>& ValidationsMessages, const bool RichFormat)
{
bool bResult = Super::ValidateNode(ValidationsMessages, RichFormat);
if (ChildrenNodes.Num() == 0)
{
bResult = false;
const FString RichTextReturn =
FString("* ")
.Append("<RichTextBlock.Bold>")
.Append(this->NodeTitle.ToString())
.Append("</>")
.Append(": Does not have any child nodes!");
const FString TextReturn =
FString(this->NodeTitle.ToString())
.Append(": Does not have any child nodes!");
ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
}
if (ChildrenNodes.Num() > 1)
{
bResult = false;
const FString RichTextReturn =
FString("* ")
.Append("<RichTextBlock.Bold>")
.Append(this->NodeTitle.ToString())
.Append("</>")
.Append(": Has more than 1 child node.");
const FString TextReturn = FString(this->NodeTitle.ToString())
.Append(": Has more than 1 child node.");
ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
}
return bResult;
}
#endif
#undef LOCTEXT_NAMESPACE