37 lines
932 B
C++
37 lines
932 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "Widget/DialogueGraphPin.h"
|
|
|
|
#include "Node/DialogueGraphNode_Base.h"
|
|
|
|
|
|
void SDialogueGraphPin::Construct(const FArguments& InArgs, UEdGraphPin* InPin)
|
|
{
|
|
SGraphPin::Construct(SGraphPin::FArguments(), InPin);
|
|
// FullPinHorizontalRowWidget.Pin()
|
|
// ->InsertSlot(0)
|
|
// [
|
|
// SNew(SBorder)
|
|
// .BorderBackgroundColor(FSlateColor(FLinearColor::Gray))
|
|
// .Padding(10.0f)
|
|
// .Content()
|
|
// [
|
|
// SAssignNew(DialogueText, STextBlock)
|
|
// .MinDesiredWidth(260.0f)
|
|
// .WrapTextAt(250.0f)
|
|
// .Text(this, &SDialogueGraphPin::GetDialogueText)
|
|
// ]
|
|
// ];
|
|
}
|
|
|
|
FText SDialogueGraphPin::GetDialogueText() const
|
|
{
|
|
UEdGraphPin* ParentPin = GetPinObj();
|
|
if (UDialogueGraphNode_Base* ResponseNode = Cast<UDialogueGraphNode_Base>(ParentPin->GetOwningNode()))
|
|
{
|
|
return ResponseNode->GetDialogueNodeData()->Text;
|
|
}
|
|
return FText();
|
|
}
|