Update Dialogue System for Unlimited Choices

This commit is contained in:
Philip W 2024-01-23 22:03:06 +00:00
parent 2f1fe1c0ca
commit 773c69a99b
5 changed files with 10 additions and 10 deletions

BIN
EndlessVendetta/Content/Dialogue/BP_ChoiceButton.uasset (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -16,7 +16,8 @@ UDialogueChoiceNode::UDialogueChoiceNode()
FText UDialogueChoiceNode::GetNodeTitle() const
{
return NodeTitle.IsEmpty() ? LOCTEXT("Choice Node", "Choice Node") : NodeTitle;
const FText ChoiceNodeTitle = NodeTitle.IsEmpty() ? LOCTEXT("Choice Node", "Choice Node") : NodeTitle;
return FText::Format(LOCTEXT("Choice Node Title", "{0} [{1}]"), ChoiceNodeTitle, FText::AsNumber(Choices.Num()));
}
FLinearColor UDialogueChoiceNode::GetBackgroundColor() const

View File

@ -13,11 +13,7 @@ public:
UDialogueChoiceNode();
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Dialogue")
FString Choice1Text = "None";
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Dialogue")
FString Choice2Text = "None";
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Dialogue")
FString Choice3Text = "None";
TArray<FString> Choices;
#if WITH_EDITOR
virtual FText GetNodeTitle() const override;