@@ -32,66 +32,77 @@ void FAttrModifierCustomization::CustomizeHeader(TSharedRef<IPropertyHandle> Str
3232
3333void FAttrModifierCustomization::CustomizeChildren (TSharedRef<IPropertyHandle> StructPropertyHandle, IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
3434{
35- StructBuilder.AddCustomRow (LOCTEXT (" Search" , " Values" )).WholeRowContent ()
36- [
37- SNew (SHorizontalBox)
38- + SHorizontalBox::Slot ()
39- .Padding (4 , 0 )
35+ const bool bHideIncrement = StructHandle->HasMetaData (" HideIncrement" );
36+ const bool bHideLastMultiplier = StructHandle->HasMetaData (" HideLastMultiplier" );
37+ const bool bHideBaseMultiplier = StructHandle->HasMetaData (" HideBaseMultiplier" );
38+
39+ TSharedRef<SHorizontalBox> ModListWidget = SNew (SHorizontalBox);
40+
41+ if (!bHideIncrement)
42+ {
43+ ModListWidget->AddSlot ()
44+ .HAlign (HAlign_Fill)
45+ .MaxWidth (100 .f )
46+ .Padding (2 , 0 )
4047 [
4148 SNew (SVerticalBox)
4249 + SVerticalBox::Slot ()
4350 [
4451 IncrementHandle->CreatePropertyNameWidget ()
4552 ]
4653 + SVerticalBox::Slot ()
47- .HAlign (HAlign_Left )
54+ .HAlign (HAlign_Fill )
4855 [
49- SNew (SBox)
50- .MinDesiredWidth (120 .f )
51- .MaxDesiredWidth (200 .f )
52- [
53- IncrementHandle->CreatePropertyValueWidget ()
54- ]
56+ IncrementHandle->CreatePropertyValueWidget ()
5557 ]
56- ]
57- + SHorizontalBox::Slot ()
58- .Padding (4 , 0 )
58+ ];
59+ }
60+
61+ if (!bHideLastMultiplier)
62+ {
63+ ModListWidget->AddSlot ()
64+ .HAlign (HAlign_Fill)
65+ .MaxWidth (100 .f )
66+ .Padding (2 , 0 )
5967 [
6068 SNew (SVerticalBox)
6169 + SVerticalBox::Slot ()
6270 [
6371 LastMultiplierHandle->CreatePropertyNameWidget ()
6472 ]
6573 + SVerticalBox::Slot ()
66- .HAlign (HAlign_Left )
74+ .HAlign (HAlign_Fill )
6775 [
68- SNew (SBox)
69- .MinDesiredWidth (120 .f )
70- .MaxDesiredWidth (200 .f )
71- [
72- LastMultiplierHandle->CreatePropertyValueWidget ()
73- ]
76+ LastMultiplierHandle->CreatePropertyValueWidget ()
7477 ]
75- ]
76- + SHorizontalBox::Slot ()
77- .Padding (4 , 0 )
78+ ];
79+ }
80+
81+ if (!bHideBaseMultiplier)
82+ {
83+ ModListWidget->AddSlot ()
84+ .HAlign (HAlign_Fill)
85+ .MaxWidth (100 .f )
86+ .Padding (2 , 0 )
7887 [
7988 SNew (SVerticalBox)
8089 + SVerticalBox::Slot ()
8190 [
8291 BaseMultiplierHandle->CreatePropertyNameWidget ()
8392 ]
8493 + SVerticalBox::Slot ()
85- .HAlign (HAlign_Left )
94+ .HAlign (HAlign_Fill )
8695 [
87- SNew (SBox)
88- .MinDesiredWidth (120 .f )
89- .MaxDesiredWidth (200 .f )
90- [
91- BaseMultiplierHandle->CreatePropertyValueWidget ()
92- ]
96+ BaseMultiplierHandle->CreatePropertyValueWidget ()
9397 ]
94- ]
98+ ];
99+ }
100+
101+ StructBuilder.AddCustomRow (LOCTEXT (" Search" , " Values" ))
102+ .ValueContent ()
103+ .MinDesiredWidth (500 .f )
104+ [
105+ ModListWidget
95106 ];
96107}
97108
0 commit comments