4#include "IDetailPropertyRow.h"
5#include "IPropertyUtilities.h"
6#include "IDetailChildrenBuilder.h"
18#define LOCTEXT_NAMESPACE "DialogueEvent_Details"
23 FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
27 PropertyUtils = StructCustomizationUtils.GetPropertyUtilities();
41 if (!bShowOnlyInnerProperties)
43 HeaderRow.NameContent()
51 IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
53 const bool bHasDialogue =
Dialogue !=
nullptr;
58 FDetailWidgetRow* DetailWidgetRow = &StructBuilder.AddCustomRow(LOCTEXT(
"ParticipantNameSearchKey",
"Participant Name"));
65 .HasContextCheckbox(bHasDialogue)
66 .IsContextCheckBoxChecked(
true)
88 const TSharedPtr<IPropertyHandle> EventNamePropertyHandle =
StructPropertyHandle->GetChildHandle(
89 GET_MEMBER_NAME_CHECKED(
FDlgEvent, EventName)
91 FDetailWidgetRow* DetailWidgetRow = &StructBuilder.AddCustomRow(LOCTEXT(
"EventNameSearchKey",
"Event Name"));
93 EventNamePropertyRow = MakeShared<FDialogueTextPropertyPickList_CustomRowHelper>(DetailWidgetRow, EventNamePropertyHandle);
98 .HasContextCheckbox(bHasDialogue)
99 .IsContextCheckBoxChecked(
false)
177 FText EventNameDisplayName = LOCTEXT(
"EventNameDisplayName",
"Variable Name");
178 FText EventNameToolTip = LOCTEXT(
"EventNameToolTip",
"Name of the relevant variable");
181 EventNameDisplayName = LOCTEXT(
"DlgEvent_EventNameDisplayName",
"Event Name");
182 EventNameToolTip = LOCTEXT(
"DlgEvent_EventNameToolTip",
"Name of the relevant event");
186 .SetToolTip(EventNameToolTip)
198 TArray<FName> Suggestions;
224 FNYIntProperty::StaticClass(),
226 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
237 FNYFloatProperty::StaticClass(),
239 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
250 FNYBoolProperty::StaticClass(),
252 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
263 FNYNameProperty::StaticClass(),
265 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
289 TSet<FName> Suggestions;
312 FNYIntProperty::StaticClass(),
314 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
321 FNYFloatProperty::StaticClass(),
323 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
330 FNYBoolProperty::StaticClass(),
332 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
339 FNYNameProperty::StaticClass(),
341 GetDefault<UDlgSystemSettings>()->BlacklistedReflectionClasses
352 return Suggestions.Array();
355#undef LOCTEXT_NAMESPACE
static const TCHAR * META_ShowOnlyInnerProperties
#define CREATE_VISIBILITY_CALLBACK(_SelfMethod)
EDlgEventType
UENUM(BlueprintType)
@ ModifyClassBoolVariable
@ ModifyClassFloatVariable
@ ModifyClassNameVariable
TSharedPtr< FDialogueEnumTypeWithObject_CustomRowHelper > EventTypePropertyRow_CustomDisplay
EVisibility GetBoolDeltaVisibility() const
void HandleTextCommitted(const FText &InSearchText, ETextCommit::Type CommitInfo) const
TArray< FName > GetAllDialoguesParticipantNames() const
void CustomizeHeader(TSharedRef< IPropertyHandle > StructPropertyHandle, FDetailWidgetRow &HeaderRow, IPropertyTypeCustomizationUtils &StructCustomizationUtils) override
IDetailPropertyRow * IntValuePropertyRow
EVisibility GetCustomEventVisibility() const
TArray< FName > GetCurrentDialogueParticipantNames() const
TSharedPtr< IPropertyHandle > EventTypePropertyHandle
TArray< FName > GetAllDialoguesEventNames() const
EVisibility GetBoolValueVisibility() const
void CustomizeChildren(TSharedRef< IPropertyHandle > StructPropertyHandle, IDetailChildrenBuilder &StructBuilder, IPropertyTypeCustomizationUtils &StructCustomizationUtils) override
EVisibility GetNameValueVisibility() const
EVisibility GetIntValueVisibility() const
void OnEventTypeChanged(bool bForceRefresh)
IDetailPropertyRow * BoolDeltaPropertyRow
TArray< FName > GetCurrentDialogueEventNames() const
TSharedPtr< FDialogueTextPropertyPickList_CustomRowHelper > ParticipantNamePropertyRow
IDetailPropertyRow * BoolValuePropertyRow
TSharedPtr< IPropertyHandle > StructPropertyHandle
IDetailPropertyRow * NameValuePropertyRow
EVisibility GetEventNameVisibility() const
TSharedPtr< FDialogueTextPropertyPickList_CustomRowHelper > EventNamePropertyRow
TSharedPtr< FDialogueObject_CustomRowHelper > CustomEventPropertyRow_CustomDisplay
IDetailPropertyRow * EventTypePropertyRow
IDetailPropertyRow * CustomEventPropertyRow
IDetailPropertyRow * FloatValuePropertyRow
TSharedPtr< IPropertyHandle > ParticipantNamePropertyHandle
EVisibility GetFloatValueVisibility() const
TSharedPtr< IPropertyUtilities > PropertyUtils
static void SortDefault(TArray< FName > &OutArray)
static void GetVariableNames(const UClass *ParticipantClass, const FNYPropertyClass *PropertyClass, ContainerType &OutContainer, const TArray< UClass * > &BlacklistedClasses)
UClass * GetParticipantClass(FName ParticipantName) const
EDITOR function, it only works if the participant class is setup in the ParticipantsClasses array.
void GetEvents(FName ParticipantName, TSet< FName > &OutSet) const
UFUNCTION(BlueprintPure, Category = "Dialogue")
void GetBoolNames(FName ParticipantName, TSet< FName > &OutSet) const
UFUNCTION(BlueprintPure, Category = "Dialogue")
void GetNameNames(FName ParticipantName, TSet< FName > &OutSet) const
UFUNCTION(BlueprintPure, Category = "Dialogue")
void GetFloatNames(FName ParticipantName, TSet< FName > &OutSet) const
UFUNCTION(BlueprintPure, Category = "Dialogue")
void GetIntNames(FName ParticipantName, TSet< FName > &OutSet) const
UFUNCTION(BlueprintPure, Category = "Dialogue")
UCLASS(Blueprintable, BlueprintType, Abstract, EditInlineNew)
static void GetAllDialoguesNameNames(FName ParticipantName, TArray< FName > &OutArray)
UFUNCTION(BlueprintPure, Category = "Dialogue|Data")
static void GetAllDialoguesBoolNames(FName ParticipantName, TArray< FName > &OutArray)
UFUNCTION(BlueprintPure, Category = "Dialogue|Data")
static void GetAllDialoguesEventNames(FName ParticipantName, TArray< FName > &OutArray)
UFUNCTION(BlueprintPure, Category = "Dialogue|Data")
static void GetAllDialoguesIntNames(FName ParticipantName, TArray< FName > &OutArray)
UFUNCTION(BlueprintPure, Category = "Dialogue|Data")
static void GetAllDialoguesFloatNames(FName ParticipantName, TArray< FName > &OutArray)
UFUNCTION(BlueprintPure, Category = "Dialogue|Data")
static FName GetParticipantNameFromPropertyHandle(const TSharedRef< IPropertyHandle > &ParticipantNamePropertyHandle)
static UDlgDialogue * GetDialogueFromPropertyHandle(const TSharedRef< IPropertyHandle > &PropertyHandle)