A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
DialogueBase_CustomRowHelper.h
Go to the documentation of this file.
1// Copyright Csaba Molnar, Daniel Butum. All Rights Reserved.
2#pragma once
3
4#include "DetailWidgetRow.h"
5
6class FDetailWidgetRow;
7
13{
15public:
16 FDialogueBase_CustomRowHelper(FDetailWidgetRow* InDetailWidgetRow, const TSharedPtr<IPropertyHandle>& InPropertyHandle);
18
19 // Sets the localized display name of the property.
20 Self& SetDisplayName(const FText& InDisplayName)
21 {
22 DisplayName = InDisplayName;
23 return *this;
24 }
25
26 // Sets the localized tooltip of the property.
27 Self& SetToolTip(const FText& InToolTip)
28 {
29 ToolTip = InToolTip;
30 return *this;
31 }
32
33 // Sets the visibility of this property.
34 Self& SetVisibility(const TAttribute<EVisibility>& InVisibility)
35 {
36 DetailWidgetRow->Visibility(InVisibility);
37 return *this;
38 }
39
40 // Set the optional utils
41 Self& SetPropertyUtils(const TSharedPtr<IPropertyUtilities>& Utils)
42 {
43 PropertyUtils = Utils;
44 return *this;
45 }
46
47 // Update the full property row.
48 void Update();
49
50protected:
51 // Internal update method that must be implemented. Called after Update finishes.
52 virtual void UpdateInternal() = 0;
53
54protected:
55 // The custom widget row this represents
56 FDetailWidgetRow* DetailWidgetRow = nullptr;
57
58 // Helpers class
59 TSharedPtr<IPropertyUtilities> PropertyUtils;
60
61 // The Property handle of what this row represents
62 TSharedPtr<IPropertyHandle> PropertyHandle;
63
64 // The NameContent Widget.
65 TSharedPtr<SWidget> NameContentWidget;
66
67 // Texts used for this property row.
70};
Self & SetToolTip(const FText &InToolTip)
Self & SetPropertyUtils(const TSharedPtr< IPropertyUtilities > &Utils)
Self & SetVisibility(const TAttribute< EVisibility > &InVisibility)
TSharedPtr< IPropertyUtilities > PropertyUtils
FDialogueBase_CustomRowHelper(FDetailWidgetRow *InDetailWidgetRow, const TSharedPtr< IPropertyHandle > &InPropertyHandle)
Self & SetDisplayName(const FText &InDisplayName)
virtual void UpdateInternal()=0
TSharedPtr< IPropertyHandle > PropertyHandle