Adding nodes finally works correctly. Now beginning work on nodes that fit our actual development needs.
This commit is contained in:
parent
102927a690
commit
af2b70227d
@ -13,8 +13,8 @@ DEFINE_LOG_CATEGORY(LogComboActionGraph);
|
|||||||
|
|
||||||
UComboActionGraph::UComboActionGraph()
|
UComboActionGraph::UComboActionGraph()
|
||||||
{
|
{
|
||||||
this->NodeType = UComboActionGraph::StaticClass();
|
this->NodeType = UComboActionGraphNode::StaticClass();
|
||||||
this->EdgeType = UComboActionGraph::StaticClass();
|
this->EdgeType = UComboActionGraphEdge::StaticClass();
|
||||||
|
|
||||||
this->bEdgeEnabled = false;
|
this->bEdgeEnabled = false;
|
||||||
this->GraphGUID = FGuid::NewGuid();
|
this->GraphGUID = FGuid::NewGuid();
|
||||||
|
|||||||
@ -57,7 +57,7 @@ void UComboActionGraphNode::InitializeNode_Implementation(UWorld *InWorld)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UComboActionGraphNode::ProcessNode()
|
void UComboActionGraphNode::ProcessNode(const TScriptInterface<IComboActionGraphManagerInterface> &Manager)
|
||||||
{
|
{
|
||||||
if (!this->GetWorld())
|
if (!this->GetWorld())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -0,0 +1,69 @@
|
|||||||
|
// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
|
||||||
|
|
||||||
|
#include "Nodes/ComboActionGraphNode_ActionNode.h"
|
||||||
|
|
||||||
|
#include "Data/ComboActionContext.h"
|
||||||
|
#include "Interfaces/ComboActionGraphManagerInterface.h"
|
||||||
|
#include "Nodes/ComboActionGraphNode_StartNode.h"
|
||||||
|
|
||||||
|
#define LOCTEXT_NAMESPACE "ComboActionGraphNode_ActionNode"
|
||||||
|
|
||||||
|
|
||||||
|
UComboActionGraphNode_ActionNode::UComboActionGraphNode_ActionNode()
|
||||||
|
{
|
||||||
|
#if WITH_EDITORONLY_DATA
|
||||||
|
this->NodeTitle = LOCTEXT("ComboActionGraphNode_ActionNodeTitle", "Action Node");
|
||||||
|
this->NodeTypeName = LOCTEXT("ComboActionGraphNode_ActionNodeInternalTitle", "Action Node");
|
||||||
|
this->ContextMenuName = LOCTEXT("ComboActionGraphNode_ActionNodeContextMenuName", "Action Node");
|
||||||
|
|
||||||
|
this->BackgroundColor = FLinearColor(FColor::Turquoise);
|
||||||
|
|
||||||
|
this->NodeTooltipText = LOCTEXT("ComboActionGraphNode_ActionTooltip", "Action node is a node which contains combo actions based on inputs.");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
this->AllowedInputClasses.Add(UComboActionGraphNode_StartNode::StaticClass());
|
||||||
|
this->AllowedInputClasses.Add(UComboActionGraphNode_ActionNode::StaticClass());
|
||||||
|
|
||||||
|
this->bAutoStarts = false;
|
||||||
|
this->bUseGameplayTags = false;
|
||||||
|
|
||||||
|
this->MaxChildrenNodes = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UComboActionGraphNode_ActionNode::PreProcessNode(const TScriptInterface<IComboActionGraphManagerInterface> &Manager)
|
||||||
|
{
|
||||||
|
if (!bUseGameplayTags)
|
||||||
|
{
|
||||||
|
// Switch Active Participant to Player
|
||||||
|
if (Manager.GetInterface())
|
||||||
|
{
|
||||||
|
//if (const auto TempContext = Manager->GetDialogueContext())
|
||||||
|
//{
|
||||||
|
// TempContext->UpdateActiveDialogueParticipant(TempContext->GetDialoguePlayerParticipant());
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Super::PreProcessNode(Manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UComboActionGraphNode_ActionNode::ProcessNode(const TScriptInterface<IComboActionGraphManagerInterface> &Manager)
|
||||||
|
{
|
||||||
|
Super::ProcessNode(Manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if WITH_EDITOR
|
||||||
|
|
||||||
|
FText UComboActionGraphNode_ActionNode::GetDescription_Implementation() const
|
||||||
|
{
|
||||||
|
return LOCTEXT("ComboActionGraphNode_ActionNodeDescription", "Action node is a node which contains combo actions based on inputs.");
|
||||||
|
}
|
||||||
|
|
||||||
|
FText UComboActionGraphNode_ActionNode::GetNodeCategory_Implementation() const
|
||||||
|
{
|
||||||
|
return LOCTEXT("ComboActionGraphNode_ActionNodeCategory", "Combo Action Branch Nodes");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef LOCTEXT_NAMESPACE
|
||||||
@ -23,70 +23,70 @@ UComboActionGraphNode_ActionNodeBase::UComboActionGraphNode_ActionNodeBase()
|
|||||||
this->bUseGameplayTags = true;
|
this->bUseGameplayTags = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UComboActionGraphNode_ActionNodeBase::ProcessNode()
|
void UComboActionGraphNode_ActionNodeBase::ProcessNode(const TScriptInterface<IComboActionGraphManagerInterface> &Manager)
|
||||||
{
|
{
|
||||||
//if (Manager)
|
if (Manager)
|
||||||
//{
|
{
|
||||||
// if (UComboActionContext *Context = Manager->GetDialogueContext())
|
//if (UComboActionContext *Context = Manager->GetDialogueContext())
|
||||||
// {
|
//{
|
||||||
// this->GetWorld()->GetTimerManager().ClearTimer(Manager->GetDialogueRowTimerHandle());
|
// this->GetWorld()->GetTimerManager().ClearTimer(Manager->GetDialogueRowTimerHandle());
|
||||||
|
|
||||||
// const FDialogueRow DialogueRow = UComboActionSystemBFC::GetDialogueRow(Context->ActiveNode);
|
// const FDialogueRow DialogueRow = UComboActionSystemBFC::GetDialogueRow(Context->ActiveNode);
|
||||||
// if (UComboActionSystemBFC::IsDialogueRowValid(DialogueRow) && DialogueRow.DialogueRowData.Array().IsValidIndex(Context->GetActiveDialogueRowDataIndex()))
|
// if (UComboActionSystemBFC::IsDialogueRowValid(DialogueRow) && DialogueRow.DialogueRowData.Array().IsValidIndex(Context->GetActiveDialogueRowDataIndex()))
|
||||||
// {
|
// {
|
||||||
// Context->UpdateActiveDialogueRow(DialogueRow);
|
// Context->UpdateActiveDialogueRow(DialogueRow);
|
||||||
// Context->UpdateActiveDialogueRowDataIndex(Context->ActiveDialogueRowDataIndex);
|
// Context->UpdateActiveDialogueRowDataIndex(Context->ActiveDialogueRowDataIndex);
|
||||||
// Manager->GetDialogueContextUpdatedEventHande().Broadcast(Context);
|
// Manager->GetDialogueContextUpdatedEventHande().Broadcast(Context);
|
||||||
// }
|
// }
|
||||||
// }
|
//}
|
||||||
//}
|
}
|
||||||
|
|
||||||
Super::ProcessNode();
|
Super::ProcessNode(Manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UComboActionGraphNode_ActionNodeBase::PreProcessNode()
|
void UComboActionGraphNode_ActionNodeBase::PreProcessNode(const TScriptInterface<IComboActionGraphManagerInterface> &Manager)
|
||||||
{
|
{
|
||||||
//if (bUseGameplayTags)
|
if (this->bUseGameplayTags)
|
||||||
//{
|
{
|
||||||
// // Switch Participants based on Tags
|
// Switch Participants based on Tags
|
||||||
// if (Manager.GetInterface())
|
if (Manager.GetInterface())
|
||||||
// {
|
{
|
||||||
// if (const auto TempContext = Manager->GetDialogueContext())
|
//if (const auto TempContext = Manager->GetDialogueContext())
|
||||||
// {
|
//{
|
||||||
// const TScriptInterface<IComboActionParticipantInterface> BestMatchingParticipant = UComboActionSystemBFC::FindBestMatchingParticipant(Manager.GetObject(), TempContext);
|
// const TScriptInterface<IComboActionParticipantInterface> BestMatchingParticipant = UComboActionSystemBFC::FindBestMatchingParticipant(Manager.GetObject(), TempContext);
|
||||||
//
|
//
|
||||||
// TempContext->UpdateActiveDialogueParticipant(BestMatchingParticipant);
|
// TempContext->UpdateActiveDialogueParticipant(BestMatchingParticipant);
|
||||||
// }
|
//}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
Super::PreProcessNode();
|
Super::PreProcessNode(Manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
UDataTable *UComboActionGraphNode_ActionNodeBase::GetDataTable() const
|
UDataTable *UComboActionGraphNode_ActionNodeBase::GetDataTable() const
|
||||||
{
|
{
|
||||||
return DataTable;
|
return this->DataTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UComboActionGraphNode_ActionNodeBase::ValidateNodeRuntime_Implementation() const
|
bool UComboActionGraphNode_ActionNodeBase::ValidateNodeRuntime_Implementation() const
|
||||||
{
|
{
|
||||||
//if (DataTable == nullptr)
|
if (this->DataTable == nullptr)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//if (this->RowName.IsNone())
|
||||||
//{
|
//{
|
||||||
// return false;
|
// return false;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (RowName.IsNone())
|
if (this->MaxChildrenNodes > -1 && this->ChildrenNodes.Num() > this->MaxChildrenNodes)
|
||||||
//{
|
{
|
||||||
// return false;
|
return false;
|
||||||
//}
|
}
|
||||||
|
|
||||||
//if (MaxChildrenNodes > -1 && ChildrenNodes.Num() > MaxChildrenNodes)
|
|
||||||
//{
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//const FString Context;
|
//const FString Context;
|
||||||
//const FDialogueRow* SelectedRow = DataTable->FindRow<FDialogueRow>(RowName, Context);
|
//const FDialogueRow *SelectedRow = DataTable->FindRow<FDialogueRow>(RowName, Context);
|
||||||
|
|
||||||
//if (SelectedRow == nullptr)
|
//if (SelectedRow == nullptr)
|
||||||
//{
|
//{
|
||||||
@ -106,7 +106,7 @@ bool UComboActionGraphNode_ActionNodeBase::ValidateNodeRuntime_Implementation()
|
|||||||
|
|
||||||
#if WITH_EDITOR
|
#if WITH_EDITOR
|
||||||
|
|
||||||
bool UComboActionGraphNode_ActionNodeBase::ValidateNode(TArray<FText>& ValidationsMessages, const bool RichFormat)
|
bool UComboActionGraphNode_ActionNodeBase::ValidateNode(TArray<FText> &ValidationsMessages, const bool RichFormat)
|
||||||
{
|
{
|
||||||
bool bResult = Super::ValidateNode(ValidationsMessages, RichFormat);
|
bool bResult = Super::ValidateNode(ValidationsMessages, RichFormat);
|
||||||
|
|
||||||
@ -128,7 +128,7 @@ bool UComboActionGraphNode_ActionNodeBase::ValidateNode(TArray<FText>& Validatio
|
|||||||
// ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
|
// ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (RowName.IsNone())
|
//if (this->RowName.IsNone())
|
||||||
//{
|
//{
|
||||||
// bResult = false;
|
// bResult = false;
|
||||||
|
|
||||||
@ -146,25 +146,23 @@ bool UComboActionGraphNode_ActionNodeBase::ValidateNode(TArray<FText>& Validatio
|
|||||||
// ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
|
// ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//if (MaxChildrenNodes > -1 && ChildrenNodes.Num() > MaxChildrenNodes)
|
if (this->MaxChildrenNodes > -1 && this->ChildrenNodes.Num() > this->MaxChildrenNodes)
|
||||||
//{
|
{
|
||||||
// const FString RichTextReturn =
|
const FString RichTextReturn = FString("* ")
|
||||||
// FString("* ").
|
.Append("<RichTextBlock.Bold>")
|
||||||
// Append("<RichTextBlock.Bold>").
|
.Append(this->NodeTitle.ToString())
|
||||||
// Append(NodeTitle.ToString()).
|
.Append("</>")
|
||||||
// Append("</>").
|
.Append(": Has more than ")
|
||||||
// Append(": Has more than ").
|
.Append("<RichTextBlock.Bold>")
|
||||||
// Append("<RichTextBlock.Bold>").
|
.Append(FString::FromInt(this->MaxChildrenNodes))
|
||||||
// Append(FString::FromInt(MaxChildrenNodes)).
|
.Append("</>")
|
||||||
// Append("</>").
|
.Append(" Children Nodes!");
|
||||||
// Append(" Children Nodes!");
|
|
||||||
|
|
||||||
// const FString TextReturn =
|
const FString TextReturn = FString(this->NodeTitle.ToString())
|
||||||
// FString(NodeTitle.ToString()).
|
.Append(": Has more than ").Append(FString::FromInt(MaxChildrenNodes)).Append(" Children Nodes!");
|
||||||
// Append(": Has more than ").Append(FString::FromInt(MaxChildrenNodes)).Append(" Children Nodes!");
|
|
||||||
//
|
ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
|
||||||
// ValidationsMessages.Add(FText::FromString(RichFormat ? RichTextReturn : TextReturn));
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
//const FString Context;
|
//const FString Context;
|
||||||
//const FDialogueRow* SelectedRow = DataTable!=nullptr ? DataTable->FindRow<FDialogueRow>(RowName, Context) : nullptr;
|
//const FDialogueRow* SelectedRow = DataTable!=nullptr ? DataTable->FindRow<FDialogueRow>(RowName, Context) : nullptr;
|
||||||
@ -217,15 +215,15 @@ void UComboActionGraphNode_ActionNodeBase::PostEditChangeProperty(FPropertyChang
|
|||||||
|
|
||||||
if (PropertyChangedEvent.GetPropertyName() == GET_MEMBER_NAME_CHECKED(UComboActionGraphNode_ActionNodeBase, DataTable))
|
if (PropertyChangedEvent.GetPropertyName() == GET_MEMBER_NAME_CHECKED(UComboActionGraphNode_ActionNodeBase, DataTable))
|
||||||
{
|
{
|
||||||
RowName = FName("");
|
this->RowName = FName("");
|
||||||
Preview.Empty();
|
this->Preview.Empty();
|
||||||
PreviewsUpdated.ExecuteIfBound();
|
this->PreviewsUpdated.ExecuteIfBound();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PropertyChangedEvent.GetPropertyName() == GET_MEMBER_NAME_CHECKED(UComboActionGraphNode_ActionNodeBase, RowName))
|
if (PropertyChangedEvent.GetPropertyName() == GET_MEMBER_NAME_CHECKED(UComboActionGraphNode_ActionNodeBase, RowName))
|
||||||
{
|
{
|
||||||
UpdatePreviews();
|
this->UpdatePreviews();
|
||||||
PreviewsUpdated.ExecuteIfBound();
|
this->PreviewsUpdated.ExecuteIfBound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,11 +254,14 @@ TArray<FText> UComboActionGraphNode_ActionNodeBase::GetPreviews() const
|
|||||||
|
|
||||||
void UComboActionGraphNode_ActionNodeBase::UpdatePreviews()
|
void UComboActionGraphNode_ActionNodeBase::UpdatePreviews()
|
||||||
{
|
{
|
||||||
if (!DataTable) Preview.Empty();
|
if (!this->DataTable)
|
||||||
|
{
|
||||||
|
this->Preview.Empty();
|
||||||
|
}
|
||||||
|
|
||||||
Preview.Empty();
|
this->Preview.Empty();
|
||||||
|
|
||||||
Preview = GetPreviews();
|
this->Preview = this->GetPreviews();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -24,7 +24,7 @@ UComboActionGraphNode_StartNode::UComboActionGraphNode_StartNode()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO: Once there are Conditional Decorators, this will be replaced
|
// TODO: Once there are Conditional Decorators, this will be replaced
|
||||||
MaxChildrenNodes = 1;
|
this->MaxChildrenNodes = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WITH_EDITOR
|
#if WITH_EDITOR
|
||||||
|
|||||||
@ -17,24 +17,26 @@ class COMBOINPUT_API UComboActionGraphEdge : public UObject
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
#pragma region Variables
|
|
||||||
public:
|
public:
|
||||||
|
UFUNCTION(BlueprintCallable, Category="Combo Input|Action")
|
||||||
|
void SetGraph(class UComboActionGraph *InGraph) { this->Graph = InGraph; }
|
||||||
|
UFUNCTION(BlueprintCallable, Category="Combo Input|Action")
|
||||||
|
void SetStartNode(class UComboActionGraphNode *InNode) { this->StartNode = InNode; }
|
||||||
|
UFUNCTION(BlueprintCallable, Category="Combo Input|Action")
|
||||||
|
void SetEndNode(class UComboActionGraphNode *InNode) { this->EndNode = InNode; }
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure, Category="Combo Input|Action")
|
||||||
|
class UComboActionGraph *GetGraph() const { return this->Graph; }
|
||||||
|
UFUNCTION(BlueprintPure, Category="Combo Input|Action")
|
||||||
|
class UComboActionGraphNode *GetStartNode() const { return this->StartNode; }
|
||||||
|
UFUNCTION(BlueprintPure, Category="Combo Input|Action")
|
||||||
|
class UComboActionGraphNode *GetEndNode() const { return this->EndNode; }
|
||||||
|
|
||||||
|
private:
|
||||||
UPROPERTY(VisibleAnywhere, Category="Combo Input|Action")
|
UPROPERTY(VisibleAnywhere, Category="Combo Input|Action")
|
||||||
UComboActionGraph *Graph = nullptr;
|
class UComboActionGraph *Graph = nullptr;
|
||||||
|
UPROPERTY(BlueprintReadOnly, Category="Combo Input|Action", meta=(AllowPrivateAccess="true"))
|
||||||
UPROPERTY(BlueprintReadOnly, Category="Combo Input|Action")
|
class UComboActionGraphNode *StartNode = nullptr;
|
||||||
UComboActionGraphNode *StartNode = nullptr;
|
UPROPERTY(BlueprintReadOnly, Category="Combo Input|Action", meta=(AllowPrivateAccess="true"))
|
||||||
|
class UComboActionGraphNode *EndNode = nullptr;
|
||||||
UPROPERTY(BlueprintReadOnly, Category="Combo Input|Action")
|
|
||||||
UComboActionGraphNode *EndNode = nullptr;
|
|
||||||
|
|
||||||
#pragma endregion
|
|
||||||
|
|
||||||
#pragma region Functions
|
|
||||||
public:
|
|
||||||
//UFUNCTION(BlueprintPure, Category="Combo Input|Action")
|
|
||||||
UComboActionGraph *GetGraph() const { return Graph; }
|
|
||||||
|
|
||||||
#pragma endregion
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -138,8 +138,8 @@ public:
|
|||||||
UFUNCTION(BlueprintCallable, BlueprintPure, Category="Combo Input|Action")
|
UFUNCTION(BlueprintCallable, BlueprintPure, Category="Combo Input|Action")
|
||||||
virtual bool DoesAutoStart() const { return bAutoStarts; }
|
virtual bool DoesAutoStart() const { return bAutoStarts; }
|
||||||
|
|
||||||
virtual void PreProcessNode(){}
|
virtual void PreProcessNode(const TScriptInterface<class IComboActionGraphManagerInterface> &Manager){}
|
||||||
virtual void ProcessNode();
|
virtual void ProcessNode(const TScriptInterface<class IComboActionGraphManagerInterface> &Manager);
|
||||||
/**
|
/**
|
||||||
* Gets the decorators for this Dialogue Graph Node.
|
* Gets the decorators for this Dialogue Graph Node.
|
||||||
*❔ Returns only Valid decorators!
|
*❔ Returns only Valid decorators!
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Nodes/ComboActionGraphNode_ActionNodeBase.h"
|
||||||
|
#include "UObject/Object.h"
|
||||||
|
|
||||||
|
#include "ComboActionGraphNode_ActionNode.generated.h"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Combo Action node.
|
||||||
|
*
|
||||||
|
* This Node represents Player's combo actions.
|
||||||
|
*/
|
||||||
|
UCLASS(ClassGroup=("Combo Input|Action"), DisplayName="Action Node", meta=(ToolTip="Combo Action Tree: Action Node"))
|
||||||
|
class COMBOINPUT_API UComboActionGraphNode_ActionNode : public UComboActionGraphNode_ActionNodeBase
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
UComboActionGraphNode_ActionNode();
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual void PreProcessNode(const TScriptInterface<class IComboActionGraphManagerInterface> &Manager) override;
|
||||||
|
virtual void ProcessNode(const TScriptInterface<class IComboActionGraphManagerInterface> &Manager) override;
|
||||||
|
|
||||||
|
#if WITH_EDITOR
|
||||||
|
virtual FText GetDescription_Implementation() const override;
|
||||||
|
virtual FText GetNodeCategory_Implementation() const override;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
@ -25,8 +25,8 @@ class COMBOINPUT_API UComboActionGraphNode_ActionNodeBase : public UComboActionG
|
|||||||
public:
|
public:
|
||||||
UComboActionGraphNode_ActionNodeBase();
|
UComboActionGraphNode_ActionNodeBase();
|
||||||
|
|
||||||
virtual void ProcessNode() override;
|
virtual void ProcessNode(const TScriptInterface<class IComboActionGraphManagerInterface> &Manager) override;
|
||||||
virtual void PreProcessNode() override;
|
virtual void PreProcessNode(const TScriptInterface<class IComboActionGraphManagerInterface> &Manager) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Dialogue Data Table for this graph node.
|
* Returns the Dialogue Data Table for this graph node.
|
||||||
|
|||||||
@ -88,11 +88,11 @@ void UEdComboActionGraph::RebuildComboActionGraph()
|
|||||||
|
|
||||||
this->EdgeMap.Add(Edge, EdgeNode);
|
this->EdgeMap.Add(Edge, EdgeNode);
|
||||||
|
|
||||||
Edge->Graph = Graph;
|
Edge->SetGraph(Graph);
|
||||||
Edge->Rename(nullptr, Graph, REN_DontCreateRedirectors | REN_DoNotDirty);
|
Edge->Rename(nullptr, Graph, REN_DontCreateRedirectors | REN_DoNotDirty);
|
||||||
Edge->StartNode = StartNode->ComboActionGraphNode;
|
StartNode->ComboActionGraphNode->Edges.Add(EndNode->ComboActionGraphNode, Edge);
|
||||||
Edge->EndNode = EndNode->ComboActionGraphNode;
|
Edge->SetStartNode(StartNode->ComboActionGraphNode);
|
||||||
Edge->StartNode->Edges.Add(Edge->EndNode, Edge);
|
Edge->SetEndNode(EndNode->ComboActionGraphNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@ void SComboActionSearch::FocusForUse(const FComboActionSearchFilter &SearchFilte
|
|||||||
if (!SearchFilter.SearchString.IsEmpty())
|
if (!SearchFilter.SearchString.IsEmpty())
|
||||||
{
|
{
|
||||||
SearchTextBoxWidget->SetText(FText::FromString(SearchFilter.SearchString));
|
SearchTextBoxWidget->SetText(FText::FromString(SearchFilter.SearchString));
|
||||||
MakeSearchQuery(SearchFilter);
|
this->MakeSearchQuery(SearchFilter);
|
||||||
|
|
||||||
if (bSelectFirstResult && this->ItemsFound.Num())
|
if (bSelectFirstResult && this->ItemsFound.Num())
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ void SComboActionSearch::HandleSearchTextCommitted(const FText& Text, ETextCommi
|
|||||||
if (CommitType == ETextCommit::OnEnter)
|
if (CommitType == ETextCommit::OnEnter)
|
||||||
{
|
{
|
||||||
this->CurrentFilter.SearchString = Text.ToString();
|
this->CurrentFilter.SearchString = Text.ToString();
|
||||||
MakeSearchQuery(this->CurrentFilter);
|
this->MakeSearchQuery(this->CurrentFilter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ TSharedRef<ITableRow> SComboActionSearch::HandleGenerateRow(TSharedPtr<FComboAct
|
|||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
+SHorizontalBox::Slot()
|
+SHorizontalBox::Slot()
|
||||||
.VAlign(VAlign_Center)
|
.VAlign(EVerticalAlignment::VAlign_Center)
|
||||||
.AutoWidth()
|
.AutoWidth()
|
||||||
[
|
[
|
||||||
InItem->CreateIcon()
|
InItem->CreateIcon()
|
||||||
@ -258,7 +258,7 @@ TSharedRef<ITableRow> SComboActionSearch::HandleGenerateRow(TSharedPtr<FComboAct
|
|||||||
// Display text
|
// Display text
|
||||||
+SHorizontalBox::Slot()
|
+SHorizontalBox::Slot()
|
||||||
.AutoWidth()
|
.AutoWidth()
|
||||||
.VAlign(VAlign_Center)
|
.VAlign(EVerticalAlignment::VAlign_Center)
|
||||||
.Padding(2,0)
|
.Padding(2,0)
|
||||||
[
|
[
|
||||||
SNew(STextBlock)
|
SNew(STextBlock)
|
||||||
@ -270,8 +270,8 @@ TSharedRef<ITableRow> SComboActionSearch::HandleGenerateRow(TSharedPtr<FComboAct
|
|||||||
// Comment Block
|
// Comment Block
|
||||||
+SHorizontalBox::Slot()
|
+SHorizontalBox::Slot()
|
||||||
.FillWidth(1)
|
.FillWidth(1)
|
||||||
.HAlign(HAlign_Right)
|
.HAlign(EHorizontalAlignment::HAlign_Right)
|
||||||
.VAlign(VAlign_Center)
|
.VAlign(EVerticalAlignment::VAlign_Center)
|
||||||
.Padding(2,0)
|
.Padding(2,0)
|
||||||
[
|
[
|
||||||
SNew(STextBlock)
|
SNew(STextBlock)
|
||||||
@ -307,7 +307,7 @@ TSharedRef<SWidget> SComboActionSearch::FillFilterEntries()
|
|||||||
FExecuteAction::CreateLambda([this]()
|
FExecuteAction::CreateLambda([this]()
|
||||||
{
|
{
|
||||||
this->CurrentFilter.bIncludeNodeTitle = !this->CurrentFilter.bIncludeNodeTitle;
|
this->CurrentFilter.bIncludeNodeTitle = !this->CurrentFilter.bIncludeNodeTitle;
|
||||||
MakeSearchQuery(this->CurrentFilter);
|
this->MakeSearchQuery(this->CurrentFilter);
|
||||||
}),
|
}),
|
||||||
FCanExecuteAction(),
|
FCanExecuteAction(),
|
||||||
FIsActionChecked::CreateLambda([this]() -> bool
|
FIsActionChecked::CreateLambda([this]() -> bool
|
||||||
@ -327,7 +327,7 @@ TSharedRef<SWidget> SComboActionSearch::FillFilterEntries()
|
|||||||
FExecuteAction::CreateLambda([this]()
|
FExecuteAction::CreateLambda([this]()
|
||||||
{
|
{
|
||||||
this->CurrentFilter.bIncludeNodeType = !this->CurrentFilter.bIncludeNodeType;
|
this->CurrentFilter.bIncludeNodeType = !this->CurrentFilter.bIncludeNodeType;
|
||||||
MakeSearchQuery(this->CurrentFilter);
|
this->MakeSearchQuery(this->CurrentFilter);
|
||||||
}),
|
}),
|
||||||
FCanExecuteAction(),
|
FCanExecuteAction(),
|
||||||
FIsActionChecked::CreateLambda([this]() -> bool
|
FIsActionChecked::CreateLambda([this]() -> bool
|
||||||
@ -347,7 +347,7 @@ TSharedRef<SWidget> SComboActionSearch::FillFilterEntries()
|
|||||||
FExecuteAction::CreateLambda([this]()
|
FExecuteAction::CreateLambda([this]()
|
||||||
{
|
{
|
||||||
this->CurrentFilter.bIncludeNodeDecoratorsTypes = !this->CurrentFilter.bIncludeNodeDecoratorsTypes;
|
this->CurrentFilter.bIncludeNodeDecoratorsTypes = !this->CurrentFilter.bIncludeNodeDecoratorsTypes;
|
||||||
MakeSearchQuery(this->CurrentFilter);
|
this->MakeSearchQuery(this->CurrentFilter);
|
||||||
}),
|
}),
|
||||||
FCanExecuteAction(),
|
FCanExecuteAction(),
|
||||||
FIsActionChecked::CreateLambda([this]() -> bool
|
FIsActionChecked::CreateLambda([this]() -> bool
|
||||||
@ -367,7 +367,7 @@ TSharedRef<SWidget> SComboActionSearch::FillFilterEntries()
|
|||||||
FExecuteAction::CreateLambda([this]()
|
FExecuteAction::CreateLambda([this]()
|
||||||
{
|
{
|
||||||
this->CurrentFilter.bIncludeNodeData = !this->CurrentFilter.bIncludeNodeData;
|
this->CurrentFilter.bIncludeNodeData = !this->CurrentFilter.bIncludeNodeData;
|
||||||
MakeSearchQuery(this->CurrentFilter);
|
this->MakeSearchQuery(this->CurrentFilter);
|
||||||
}),
|
}),
|
||||||
FCanExecuteAction(),
|
FCanExecuteAction(),
|
||||||
FIsActionChecked::CreateLambda([this]() -> bool
|
FIsActionChecked::CreateLambda([this]() -> bool
|
||||||
@ -387,7 +387,7 @@ TSharedRef<SWidget> SComboActionSearch::FillFilterEntries()
|
|||||||
FExecuteAction::CreateLambda([this]()
|
FExecuteAction::CreateLambda([this]()
|
||||||
{
|
{
|
||||||
this->CurrentFilter.bIncludeNodeGUID = !this->CurrentFilter.bIncludeNodeGUID;
|
this->CurrentFilter.bIncludeNodeGUID = !this->CurrentFilter.bIncludeNodeGUID;
|
||||||
MakeSearchQuery(this->CurrentFilter);
|
this->MakeSearchQuery(this->CurrentFilter);
|
||||||
}),
|
}),
|
||||||
FCanExecuteAction(),
|
FCanExecuteAction(),
|
||||||
FIsActionChecked::CreateLambda([this]() -> bool
|
FIsActionChecked::CreateLambda([this]() -> bool
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user