36 virtual void DeinitializePresenter()
override;
41 virtual bool ShouldReceiveStageEvent_Implementation(
const FStageEventMessage& Message,
const FInstancedStruct& ListenerContext)
override;
42 virtual void HandleStageEvent_Implementation(
const FStageEventMessage& Message,
const FInstancedStruct& ListenerContext)
override;
45 FText GetScenarioTitle(FName ScenarioID)
const;
46 void ResolveLine(
const FDT_MessengeTable& Row, UTexture2D*& ProfileIcon,
bool& bPlayer)
const;
50 UFUNCTION(BlueprintCallable, Category =
"Dialog")
51 bool StartScenario(FName ScenarioID);
54 UFUNCTION(BlueprintCallable, Category =
"Dialog")
57 UFUNCTION(BlueprintCallable, Category =
"Dialog")
60 UFUNCTION(BlueprintCallable, Category =
"Dialog")
61 void SkipRemainingRows();
63 UFUNCTION(BlueprintCallable, Category =
"Dialog|Input")
66 UFUNCTION(BlueprintCallable, Category =
"Dialog|Input")
67 void ConfirmSkipHold();
69 UFUNCTION(BlueprintCallable, Category =
"Dialog|Input")
70 void CancelSkipHold();
72 UFUNCTION(BlueprintPure, Category =
"Dialog")
73 bool IsDialogInputAvailable()
const;
75 UFUNCTION(BlueprintPure, Category =
"Dialog")
79 UFUNCTION(BlueprintPure, Category =
"Dialog")
80 FORCEINLINE
bool IsDialogOpen()
const
85 UFUNCTION(BlueprintPure, Category =
"Dialog")
86 FORCEINLINE
bool IsDialogComplete()
const
88 return bScenarioActive ==
false;
91 FORCEINLINE
const TArray<FDT_MessengeTable>&
GetHistory()
const
97 UPROPERTY(BlueprintAssignable, Category =
"Dialog|Events")
98 FOnDialogOpenChanged OnDialogOpenChanged;
100 UPROPERTY(BlueprintAssignable, Category = "Dialog|Events")
101 FOnDialogLineAdded OnDialogLineAdded;
103 UPROPERTY(BlueprintAssignable, Category = "Dialog|Events")
104 FOnDialogSeparatorAdded OnDialogSeparatorAdded;
106 UPROPERTY(BlueprintAssignable, Category = "Dialog|Events")
107 FOnDialogCompleteChanged OnDialogCompleteChanged;
109 UPROPERTY(BlueprintAssignable, Category = "Dialog|Events")
110 FOnDialogViewRefreshRequested OnViewRefreshRequested;
113 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Dialog")
120 void LoadDialogData();
121 void OnDialogDataLoaded(TSharedPtr<FStreamableHandle> Handle);
122 void InitializeRuntime();
124 void ReleaseRuntime();
125 void SetOpen(
bool bNewOpen,
bool bForceUpdate = false);
126 void TryStartScenario();
127 void ShowNextRow(
bool bAnimate);
128 void ScheduleRowCompletion();
129 void CompleteCurrentRow();
130 void DispatchRowEndEvent(FName EventID);
131 void AddSeparator(FName ScenarioID);
142 TSharedPtr<FStreamableHandle> DialogLoadHandle;
143 TWeakObjectPtr<APlayerController> DialogController;
145 TWeakObjectPtr<UWorld> ActiveWorld;
151 TSet<FName> CompletedScenarios;
154 FTSTicker::FDelegateHandle RowCompletionTicker;
157 int32 NextRowIndex = 0;
158 int32 PendingRowIndex = INDEX_NONE;
159 bool bRuntimeInitialized = false;
160 bool bDataReady = false;
161 bool bDialogOpen = false;
162 bool bScenarioActive = false;
163 bool bCompletingRow = false;
164 bool bSkipping = false;
165 bool bInputEnabled = false;
166 bool bSkipArmed = false;
DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FOnDialogLineAdded, const FDT_MessengeTable &, Row, UTexture2D *, ProfileIcon, bool, bPlayer, bool, bAnimate)