From af86084f3e5b92dbd0e25347996a985c4e7fb57e Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Mon, 13 Mar 2023 18:11:42 +0000 Subject: [PATCH] Updated Quest UI to Display Tasks --- Content/Blueprints/Quest_UI/Quest_UI.uasset | 4 ++-- Content/Dialogue/DialogueTest.umap | 2 +- Content/Dialogue/NPCTest.uasset | 4 ++-- Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp | 2 +- Source/the_twilight_abyss/Quest/QuestSystem.cpp | 5 ++--- Source/the_twilight_abyss/Quest/QuestSystem.h | 4 ++++ 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Content/Blueprints/Quest_UI/Quest_UI.uasset b/Content/Blueprints/Quest_UI/Quest_UI.uasset index effccd5..3fca063 100644 --- a/Content/Blueprints/Quest_UI/Quest_UI.uasset +++ b/Content/Blueprints/Quest_UI/Quest_UI.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03df2bbabe6a8403b44a85bba4cd111dbda87297beabcc69a1b161892c264b52 -size 23596 +oid sha256:34a368440be2e5be15b6cc6adb7ac590ec2f950565bc580b2eecd85f013b4ab4 +size 24449 diff --git a/Content/Dialogue/DialogueTest.umap b/Content/Dialogue/DialogueTest.umap index 6ce0a54..f0c293a 100644 --- a/Content/Dialogue/DialogueTest.umap +++ b/Content/Dialogue/DialogueTest.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d733c4c0e6d5852ac101cf16ef82f9afdccbcd4dc60ed09eeb8404b22ca235d4 +oid sha256:f6a9356162034744222c61ef862852d040350f8930a389993c238e814a018ff3 size 40317 diff --git a/Content/Dialogue/NPCTest.uasset b/Content/Dialogue/NPCTest.uasset index faaaae3..e334156 100644 --- a/Content/Dialogue/NPCTest.uasset +++ b/Content/Dialogue/NPCTest.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a667ddf710cba8e628170add37673bba11b8c4519557fe10a43707f27d9ca58 -size 62672 +oid sha256:9e9c7e12ba35a17ee147602e8f916c869f659eeea4b503b5da874ebf1b66a4c7 +size 63914 diff --git a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp index 4630d66..9fdfed1 100644 --- a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp +++ b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp @@ -13,7 +13,7 @@ UDialogueNPC::UDialogueNPC() // off to improve performance if you don't need them. PrimaryComponentTick.bCanEverTick = true; - static ConstructorHelpers::FClassFinder DialogueWidgetClass(TEXT("/Game/Dialogue/TextPrompt")); + static ConstructorHelpers::FClassFinder DialogueWidgetClass(TEXT("/Game/Blueprints/Quest_UI/Quest_UI")); DialogueWidget = DialogueWidgetClass.Class; } diff --git a/Source/the_twilight_abyss/Quest/QuestSystem.cpp b/Source/the_twilight_abyss/Quest/QuestSystem.cpp index c5244c9..d8c9c29 100644 --- a/Source/the_twilight_abyss/Quest/QuestSystem.cpp +++ b/Source/the_twilight_abyss/Quest/QuestSystem.cpp @@ -11,7 +11,8 @@ UQuestSystem::UQuestSystem() // off to improve performance if you don't need them. PrimaryComponentTick.bCanEverTick = true; - // ... + static ConstructorHelpers::FClassFinder QuestWidgetClass(TEXT("/Game/Dialogue/TextPrompt")); + QuestWidget = QuestWidgetClass.Class; } @@ -20,7 +21,6 @@ void UQuestSystem::BeginPlay() { Super::BeginPlay(); - // ... } @@ -30,6 +30,5 @@ void UQuestSystem::TickComponent(float DeltaTime, ELevelTick TickType, FActorCom { Super::TickComponent(DeltaTime, TickType, ThisTickFunction); - // ... } diff --git a/Source/the_twilight_abyss/Quest/QuestSystem.h b/Source/the_twilight_abyss/Quest/QuestSystem.h index 70a6d79..352333c 100644 --- a/Source/the_twilight_abyss/Quest/QuestSystem.h +++ b/Source/the_twilight_abyss/Quest/QuestSystem.h @@ -4,6 +4,7 @@ #include "CoreMinimal.h" #include "Components/ActorComponent.h" +#include "Components/TextBlock.h" #include "QuestSystem.generated.h" @@ -20,6 +21,9 @@ protected: // Called when the game starts virtual void BeginPlay() override; + UPROPERTY() + TSubclassOf QuestWidget; + public: // Called every frame virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;