Module |
|
Header |
/Engine/Source/Runtime/SlateCore/Public/Layout/Clipping.h |
Include |
#include "Layout/Clipping.h" |
enum EWidgetClipping
{
Inherit,
ClipToBounds,
ClipToBoundsWithoutIntersecting,
ClipToBoundsAlways,
OnDemand,
}
Name |
Description |
---|---|
Inherit |
This widget does not clip children, it and all children inherit the clipping area of the last widget that clipped. |
ClipToBounds |
This widget clips content the bounds of this widget. |
ClipToBoundsWithoutIntersecting |
This widget clips to its bounds. |
ClipToBoundsAlways |
This widget clips to its bounds. |
OnDemand |
This widget clips to its bounds when it's Desired Size is larger than the allocated geometry the widget is given. |
This enum controls clipping of widgets in Slate. By default all SWidgets do not need to clip their children. Most of the time, you don't need to clip, the only times it becomes important is when something might become hidden due to panning. You should use this wisely, as Slate can not batch across clipping areas, so if widget A and widget B are set to EWidgetClipping::Yes, no drawing that happens inside their widget trees will ever be batch together, adding additional GPU overhead.