85 const FName VariableName =
VariableNode->GetVariableName();
90 const int32 Value = IDlgDialogueParticipant::Execute_GetIntValue(
Actor.Get(), VariableName);
96 const float Value = IDlgDialogueParticipant::Execute_GetFloatValue(
Actor.Get(), VariableName);
97 VariableNode->SetVariableValue(FString::SanitizeFloat(Value));
102 const bool Value = IDlgDialogueParticipant::Execute_GetBoolValue(
Actor.Get(), VariableName);
108 const FName Value = IDlgDialogueParticipant::Execute_GetNameValue(
Actor.Get(), VariableName);
115 const int32 Value = FNYReflectionHelper::GetVariable<FNYIntProperty, int32>(
Actor.Get(), VariableName);
116 VariableNode->SetVariableValue(FString::FromInt(Value));
121 const float Value = FNYReflectionHelper::GetVariable<FNYFloatProperty, float>(
Actor.Get(), VariableName);
122 VariableNode->SetVariableValue(FString::SanitizeFloat(Value));
127 const bool Value = FNYReflectionHelper::GetVariable<FNYBoolProperty, bool>(
Actor.Get(), VariableName);
133 const FName Value = FNYReflectionHelper::GetVariable<FNYNameProperty, FName>(
Actor.Get(), VariableName);
139 const FText Value = FNYReflectionHelper::GetVariable<FNYTextProperty, FText>(
Actor.Get(), VariableName);
151 const bool Value = IDlgDialogueParticipant::Execute_CheckCondition(
Actor.Get(),
nullptr, VariableName);
157 VariableNode->SetVariableValue(TEXT(
"UNIMPLEMENTED - SHOULD NEVER HAPPEN"));
197 static const FString MultipleValues(TEXT(
"Multiple Values"));
198 const FString NewString = NewText.ToString();
199 if (NewString == MultipleValues || !
VariableNode.IsValid())
206 if (!
Actor.IsValid())
211 const FName VariableName =
VariableNode->GetVariableName();
216 const int32 Value = NewString.IsNumeric() ? FCString::Atoi(*NewString) : 0;
217 IDlgDialogueParticipant::Execute_ModifyIntValue(
Actor.Get(), VariableName,
false, Value);
222 const float Value = NewString.IsNumeric() ? FCString::Atof(*NewString) : 0.f;
223 IDlgDialogueParticipant::Execute_ModifyFloatValue(
Actor.Get(), VariableName,
false, Value);
229 IDlgDialogueParticipant::Execute_ModifyBoolValue(
Actor.Get(), VariableName, Value);
234 const FName Value(*NewString);
235 IDlgDialogueParticipant::Execute_ModifyNameValue(
Actor.Get(), VariableName, Value);
241 const int32 Value = NewString.IsNumeric() ? FCString::Atoi(*NewString) : 0;
242 FNYReflectionHelper::SetVariable<FNYIntProperty>(
Actor.Get(), VariableName, Value);
247 const float Value = NewString.IsNumeric() ? FCString::Atof(*NewString) : 0.f;
248 FNYReflectionHelper::SetVariable<FNYFloatProperty>(
Actor.Get(), VariableName, Value);
254 FNYReflectionHelper::SetVariable<FNYBoolProperty>(
Actor.Get(), VariableName, Value);
259 const FName Value(*NewString);
260 FNYReflectionHelper::SetVariable<FNYNameProperty>(
Actor.Get(), VariableName, Value);
266 const FText Value = FText::FromString(NewString);
267 FNYReflectionHelper::SetVariable<FNYTextProperty>(
Actor.Get(), VariableName, Value);
411 if (!
Actor.IsValid())
417 const FName VariableName =
VariableNode->GetVariableName();
418 const bool Value = InNewState == ECheckBoxState::Checked || InNewState == ECheckBoxState::Undetermined;
421 FNYReflectionHelper::SetVariable<FNYBoolProperty>(
Actor.Get(), VariableName, Value);
425 IDlgDialogueParticipant::Execute_ModifyBoolValue(
Actor.Get(), VariableName, Value);
TSharedPtr< SEditableTextBox > TextBoxWidget
void Construct(const FArguments &InArgs, const TSharedPtr< FDlgDataDisplayTreeVariableNode > &InVariableNode)
void HandleTextCommitted(const FText &NewText, ETextCommit::Type CommitInfo)
void HandleTextChanged(const FText &NewText)