SDropTarget::OnPaint

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Unreal Engine C++ API Reference > Editor > EditorWidgets > SDropTarget

References

   
Module EditorWidgets
Header /Engine/Source/Editor/EditorWidgets/Public/SDropTarget.h
Include #include "SDropTarget.h"
Source /Engine/Source/Editor/EditorWidgets/Private/SDropTarget.cpp
virtual int32 OnPaint
(
    const [FPaintArgs](API\Runtime\SlateCore\Types\FPaintArgs) & Args,
    const [FGeometry](API\Runtime\SlateCore\Layout\FGeometry) & AllottedGeometry,
    const [FSlateRect](API\Runtime\SlateCore\Layout\FSlateRect) & MyCullingRect,
    [FSlateWindowElementList](API\Runtime\SlateCore\Rendering\FSlateWindowElementList) & OutDrawElements,
    int32 LayerId,
    const [FWidgetStyle](API\Runtime\SlateCore\Styling\FWidgetStyle) & InWidgetStyle,
    bool bParentEnabled
) const

Remarks

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. Called by the non-virtual OnPaint to enforce pre/post conditions during OnPaint. The maximum layer ID attained by this widget or any of its children.

Parameters

Name Description
Args All the arguments necessary to paint this widget (
AllottedGeometry The FGeometry that describes an area in which the widget should appear.
MyCullingRect The rectangle representing the bounds currently being used to completely cull widgets. Unless IsChildWidgetCulled(...) returns true, you should paint the widget.
OutDrawElements A list of FDrawElements to populate with the output.
LayerId The Layer onto which this widget should be rendered.
InColorAndOpacity Color and Opacity to be applied to all the descendants of the widget being painted
bParentEnabled True if the parent of this widget is enabled.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library