Commit Graph

20 Commits

Author SHA1 Message Date
Patrick Boutot
0124d27dd4 Slate: Add unit test for FChildren::ForEach
#rb vincent.gauthier
#preflight 61eb303345399e9f504456a7

[CL 18698251 by Patrick Boutot in ue5-main branch]
2022-01-21 17:41:48 -05:00
vincent gauthier
a558e2f441 CIS fix: Add Missing LOCTEXT_NAMESPACE undef
#rb trivial
#jira UE-136397
#preflight none

#ROBOMERGE-AUTHOR: vincent.gauthier
#ROBOMERGE-SOURCE: CL 18696797 in //UE5/Release-5.0/... via CL 18696825 via CL 18696864
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18696888 by vincent gauthier in ue5-main branch]
2022-01-21 16:38:37 -05:00
aurel cordonnier
e3f7878676 Merge from Release-Engine-Test @ 17462327 to UE5/Main
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17463546 by aurel cordonnier in ue5-main branch]
2021-09-08 16:42:26 -04:00
Patrick Boutot
2f19029159 Slate: Remove the SlateAttribute dependency feature in favor of OnValueChanged.
#preflight 60c72c33b9446100017019b3

[CL 16659164 by Patrick Boutot in ue5-main branch]
2021-06-14 11:47:42 -04:00
Patrick Boutot
2ed0275040 Slate: Re-introduce SlateAttribute.OnValueChanged(). N.B. You are only allowed to invalidate attribute in the callback that doesn't affect the child order or the visibility of the widget.
[CL 16653867 by Patrick Boutot in ue5-main branch]
2021-06-13 10:22:57 -04:00
Patrick Boutot
35e97f55a6 Slate: Split the Invalidation update loop for better performance tracking.
#preflight 60c108e31ab0310001892cca

[CL 16612339 by Patrick Boutot in ue5-main branch]
2021-06-09 16:49:03 -04:00
Patrick Boutot
be0bfb8fbd Slate: Enforce that only some InvalidateWidgetReason are supported by SlateAttribute.
#preflight 60c0adcfb1a4a30001dbfcdb

[CL 16606112 by Patrick Boutot in ue5-main branch]
2021-06-09 11:36:38 -04:00
Patrick Boutot
370cfaa4ca Slate: Remove some shared ptr copy. Fix slot access in FChildren and add a ForEach function.
#jira UE-115497
#rb vincent.gauthier
#preflight 60b524a6f45a940001e24a28

[CL 16510610 by Patrick Boutot in ue5-main branch]
2021-05-31 15:42:59 -04:00
Patrick Boutot
23beac9926 Slate: Add LexToString to EInvalidateWidgetReason. Update SlateTraceFlags and ConsoleSlateDebuggerInvalidate with the newest EInvalidateWidgetReason. Add ConsoleSlateDebuggerBreak to break the application when a widget get invalidated or painted.
#rb vincent.gauthier
#preflight 609e8283423c960001e9906f

[CL 16329896 by Patrick Boutot in ue5-main branch]
2021-05-14 11:04:54 -04:00
Patrick Boutot
db61f282c6 Slate: SlateAttributeMemberRef now takes a TSharedRef instead of a reference to prevent circular inclusion. Split the SlateAttribute.h file into multiple files (other types are in progress and the file is getting bulky). Save some space in TSlateAttributeMetaData::FGetterItem (more variable are coming up). The maximum number of the defined attribute is now 255 (the biggest SWidget has ~25 attributes). Fix issue with bHasUpdatedManuallyFlagToReset that would reset the flag when we update the AffectVisibility attribute (the other attributes didn't have the chance to get updated). Prevent invalidation when the widget is not yet constructed (save some process time and space in the InvalidationRoot). Set bHasRegisteredSlateAttribute in ~SWidget to prevent invalidation when the widget is getting destroyed.
#preflight 608aad94200a1f00018a00a7

[CL 16157339 by Patrick Boutot in ue5-main branch]
2021-04-29 10:48:24 -04:00
Patrick Boutot
120469e3b5 Slate: Rename "Collapsed" SlateAttribute to "AffectVisibility". It represent more the intention. If the parent is collapsed, the child SlateAttribute was not updated even if they were marked as "update when collapsed". Update the widget reflector to show the name of the SlateAttribute (only if the widget is live). Call GetRelativeLayoutScale after the attribute are updated.
#preflight 60801fe317b40800013076ce

[CL 16072465 by Patrick Boutot in ue5-main branch]
2021-04-21 09:41:28 -04:00
Patrick Boutot
6e691fc6d5 Slate: Remove OnInvalidation feature. The invalidation is not always triggered when the value is cached or when it's built from a FastPath widget list.
#preflight 607d88cd76cdf80001fa6ca7

[CL 16050686 by Patrick Boutot in ue5-main branch]
2021-04-19 10:26:46 -04:00
Patrick Boutot
93328c2a7c Slate: Add callback when a widget is invalidated by a SlateAttribute.
#rb vincent.gauthier

[CL 15958088 by Patrick Boutot in ue5-main branch]
2021-04-08 14:04:52 -04:00
Patrick Boutot
a722a0fcc2 Slate: Add option to prevent Slate Attributes from being called automatically on the SWidget. It is useful when the owner of the widget controls the invalidation (ie. ScrollBox).
Add PrePass invalidaiton. It implies a Layout and replaces the InvalidatePrepass function.
#rb vincent.gauthier
#preflight 606b119eed8446000130de45

[CL 15929257 by Patrick Boutot in ue5-main branch]
2021-04-06 08:35:28 -04:00
Patrick Boutot
1cbf066713 Slate: Add SWidget to the SlateAttribute's compare predicate.
#preflight 605b802bc77fb0000192bf81

[CL 15805710 by Patrick Boutot in ue5-main branch]
2021-03-24 15:10:46 -04:00
Patrick Boutot
62ec719c36 Slate: Improvement to the SlateAttribute API. Add FSlateDeprecatedTAttribute and SLATE_ADD_MEMBER_ATTRIBUTE_DEFINITION_WITH_NAME to work with deprecated attribute. Add TSlateMemberAttributeReference to help user of a widget, they do not need to provide the correct this pointer and prevent assigning the attribute directly.
Complete a set of unit test for SlateAttribute. Revert changed to SWidet::TSlateAttribute with FText, that prevent the user from assigning another Compare predicate than the one hardcoded.

[CL 15655227 by Patrick Boutot in ue5-main branch]
2021-03-09 12:09:15 -04:00
Patrick Boutot
eceabd4c7c Fix a wrong assumption made by the Static Analysis.
#jira UE-108790
#rb none
#rnx

[CL 15437846 by Patrick Boutot in ue5-main branch]
2021-02-17 14:03:41 -04:00
Patrick Boutot
91928be9c5 Slate: Add SlateAttributes unit-tests.
Add Depedency, Prerequisit and Collapsed features for SlateAttributeDescriptor. Prevent SlateAttribute from invalidating the widget when it's constructing. Add explicit message when the SlateType is use wrongly (when possible it's done at compile time).
#jira UE-106514

[CL 15416798 by Patrick Boutot in ue5-main branch]
2021-02-16 08:00:15 -04:00
Patrick Boutot
4e0d784c3f Slate: Update child order invalidation in order similar to other invalidation. It create a path for other invalidations to be processed in that same order. It reduce the number of Layout invalidation that are already processed by the child order invalidation. Add Slate Attribute InvalidationWidgetReason. For FastUpdate, add list of attributes that need to be updated each frame.
[CL 15398555 by Patrick Boutot in ue5-main branch]
2021-02-12 14:16:03 -04:00
Patrick Boutot
c8b2ae9472 Slate: Add SlateInvalidationWidgetList a container, similar to a paged array, that can update the fast path list faster. It uses 2 indexes instead of one. It only rebuilds the elements that are affected by the update. Use FSlateInvalidationWidgetIndex and FSlateInvalidationWidgetSortIndex. FWidgetProxy is currently used but will be phase out soon to remove duplication and improve performance.
#jira UE-99527, UETOOL-2349

[CL 14795597 by Patrick Boutot in ue5-main branch]
2020-11-20 08:38:28 -04:00