本文整理汇总了C++中FSlateWindowElementList类的典型用法代码示例。如果您正苦于以下问题:C++ FSlateWindowElementList类的具体用法?C++ FSlateWindowElementList怎么用?C++ FSlateWindowElementList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FSlateWindowElementList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeDebugQuad
void FSlateDrawElement::MakeDebugQuad( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FSlateRect& InClippingRect)
{
PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.Init(InLayer, PaintGeometry, InClippingRect, ESlateDrawEffect::None);
DrawElt.ElementType = ET_DebugQuad;
}
示例2: MakeSpline
void FSlateDrawElement::MakeSpline( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FVector2D& InStart, const FVector2D& InStartDir, const FVector2D& InEnd, const FVector2D& InEndDir, const FSlateRect InClippingRect, float InThickness, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
DrawElt.ElementType = ET_Spline;
DrawElt.DataPayload.SetSplinePayloadProperties( InStart, InStartDir, InEnd, InEndDir, InThickness, InTint );
}
示例3: UpdateBuffers
void FSlateRHIRenderingPolicy::UpdateBuffers( const FSlateWindowElementList& WindowElementList )
{
SCOPE_CYCLE_COUNTER( STAT_SlateUpdateBufferRTTime );
// Should only be called by the rendering thread
check(IsInRenderingThread());
{
const TArray<FSlateVertex>& Vertices = WindowElementList.GetBatchedVertices();
const TArray<SlateIndex>& Indices = WindowElementList.GetBatchedIndices();
TSlateElementVertexBuffer<FSlateVertex>& VertexBuffer = VertexBuffers[CurrentBufferIndex];
FSlateElementIndexBuffer& IndexBuffer = IndexBuffers[CurrentBufferIndex];
VertexBuffer.FillBuffer( Vertices, bShouldShrinkResources );
IndexBuffer.FillBuffer( Indices, bShouldShrinkResources );
}
}
示例4: MakeViewport
void FSlateDrawElement::MakeViewport( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, TSharedPtr<const ISlateViewport> Viewport, const FSlateRect& InClippingRect, bool bGammaCorrect, bool bAllowBlending, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
DrawElt.ElementType = ET_Viewport;
DrawElt.DataPayload.SetViewportPayloadProperties( Viewport, InTint, bGammaCorrect, bAllowBlending );
}
示例5: MakeText
void FSlateDrawElement::MakeText( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FText& InText, const FSlateFontInfo& InFontInfo, const FSlateRect& InClippingRect,ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
DrawElt.ElementType = ET_Text;
DrawElt.DataPayload.SetTextPayloadProperties( InText.ToString(), InFontInfo, InTint );
}
示例6: MakeCustom
void FSlateDrawElement::MakeCustom( FSlateWindowElementList& ElementList, uint32 InLayer, TSharedPtr<ICustomSlateElement, ESPMode::ThreadSafe> CustomDrawer )
{
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.ElementType = ET_Custom;
DrawElt.Layer = InLayer;
DrawElt.DataPayload.SetCustomDrawerPayloadProperties( CustomDrawer );
DrawElt.ClippingRect = FSlateRect(1,1,1,1);
}
示例7: MakeGradient
void FSlateDrawElement::MakeGradient( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, TArray<FSlateGradientStop> InGradientStops, EOrientation InGradientType, const FSlateRect& InClippingRect, ESlateDrawEffect::Type InDrawEffects, bool bGammaCorrect )
{
PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
DrawElt.ElementType = ET_Gradient;
DrawElt.DataPayload.SetGradientPayloadProperties( InGradientStops, InGradientType, bGammaCorrect );
}
示例8: MakeLines
void FSlateDrawElement::MakeLines( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const TArray<FVector2D>& Points, const FSlateRect InClippingRect, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint, bool bAntialias )
{
PaintGeometry.CommitTransformsIfUsingLegacyConstructor();
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.Init(InLayer, PaintGeometry, InClippingRect, InDrawEffects);
DrawElt.ElementType = ET_Line;
DrawElt.DataPayload.SetLinesPayloadProperties( Points, InTint, bAntialias, ESlateLineJoinType::Sharp );
}
示例9: MakeCustom
void FSlateDrawElement::MakeCustom( FSlateWindowElementList& ElementList, uint32 InLayer, TSharedPtr<ICustomSlateElement, ESPMode::ThreadSafe> CustomDrawer )
{
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.Init(InLayer, FPaintGeometry(), FSlateRect(1,1,1,1), ESlateDrawEffect::None);
DrawElt.RenderTransform = FSlateRenderTransform();
DrawElt.ElementType = ET_Custom;
DrawElt.DataPayload.SetCustomDrawerPayloadProperties( CustomDrawer );
}
示例10:
int32 FSlateWindowElementList::FDeferredPaint::ExecutePaint( int32 LayerId, FSlateWindowElementList& OutDrawElements ) const
{
TSharedPtr<const SWidget> WidgetToPaint = WidgetToPaintPtr.Pin();
if ( WidgetToPaint.IsValid() )
{
return WidgetToPaint->Paint( Args, AllottedGeometry, OutDrawElements.GetWindow()->GetClippingRectangleInWindow(), OutDrawElements, LayerId, WidgetStyle, bParentEnabled );
}
return LayerId;
}
示例11: MakeDebugQuad
void FSlateDrawElement::MakeDebugQuad( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FSlateRect& InClippingRect)
{
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.ElementType = ET_DebugQuad;
DrawElt.Position = PaintGeometry.DrawPosition;
DrawElt.Size = PaintGeometry.DrawSize;
DrawElt.ClippingRect = InClippingRect;
DrawElt.Layer = InLayer;
DrawElt.DrawEffects = ESlateDrawEffect::None;
DrawElt.Scale = PaintGeometry.DrawScale;
}
示例12: MakeLines
void FSlateDrawElement::MakeLines( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const TArray<FVector2D>& Points, const FSlateRect InClippingRect, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint, bool bAntialias )
{
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.ElementType = ET_Line;
DrawElt.Position = PaintGeometry.DrawPosition;
DrawElt.ClippingRect = InClippingRect;
DrawElt.DataPayload.SetLinesPayloadProperties( Points, InTint, bAntialias, ESlateLineJoinType::Sharp );
DrawElt.Layer = InLayer;
DrawElt.DrawEffects = InDrawEffects;
DrawElt.Scale = PaintGeometry.DrawScale;
}
示例13: MakeSpline
void FSlateDrawElement::MakeSpline( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& PaintGeometry, const FVector2D& InStart, const FVector2D& InStartDir, const FVector2D& InEnd, const FVector2D& InEndDir, const FSlateRect InClippingRect, float InThickness, ESlateDrawEffect::Type InDrawEffects, const FLinearColor& InTint )
{
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.ElementType = ET_Spline;
DrawElt.Position = PaintGeometry.DrawPosition;
DrawElt.ClippingRect = InClippingRect;
DrawElt.DataPayload.SetSplinePayloadProperties( InStart, InStartDir, InEnd, InEndDir, InThickness, InTint );
DrawElt.Layer = InLayer;
DrawElt.DrawEffects = InDrawEffects;
DrawElt.Scale = PaintGeometry.DrawScale;
}
示例14: OnPaint
int32 STutorialWrapper::OnPaint(const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled ) const
{
if(OnWidgetHighlightDelegate.IsBound() && OnWidgetHighlightDelegate.Execute(Name))
{
float AlphaFactor;
float PulseFactor;
FLinearColor ShadowTint;
FLinearColor BorderTint;
GetAnimationValues(AlphaFactor, PulseFactor, ShadowTint, BorderTint);
const FSlateBrush* ShadowBrush = FCoreStyle::Get().GetBrush(TEXT("Tutorials.Shadow"));
const FSlateBrush* BorderBrush = FCoreStyle::Get().GetBrush(TEXT("Tutorials.Border"));
const FGeometry& WidgetGeometry = CachedGeometry;
const FVector2D WindowPos = OutDrawElements.GetWindow()->GetPositionInScreen();
const FVector2D WindowSize = OutDrawElements.GetWindow()->GetSizeInScreen();
// We should be clipped by the window size, not our containing widget, as we want to draw outside the widget
FSlateRect WindowClippingRect(0.0f, 0.0f, WindowSize.X, WindowSize.Y);
// We want to draw on-top of everything else
int32 OverlayLayerId = MAX_int32 - 2;
FPaintGeometry ShadowGeometry((WidgetGeometry.AbsolutePosition - FVector2D(ShadowBrush->Margin.Left, ShadowBrush->Margin.Top) * ShadowBrush->ImageSize * WidgetGeometry.Scale * TutorialConstants::ShadowScale) - WindowPos,
((WidgetGeometry.Size * WidgetGeometry.Scale) + (FVector2D(ShadowBrush->Margin.Right * 2.0f, ShadowBrush->Margin.Bottom * 2.0f) * ShadowBrush->ImageSize * WidgetGeometry.Scale * TutorialConstants::ShadowScale)),
WidgetGeometry.Scale * TutorialConstants::ShadowScale);
// draw highlight shadow
FSlateDrawElement::MakeBox(OutDrawElements, OverlayLayerId + 0, ShadowGeometry, ShadowBrush, WindowClippingRect, ESlateDrawEffect::None, ShadowTint);
FVector2D PulseOffset = FVector2D(PulseFactor * TutorialConstants::MaxBorderOffset, PulseFactor * TutorialConstants::MaxBorderOffset);
FVector2D BorderPosition = (WidgetGeometry.AbsolutePosition - ((FVector2D(BorderBrush->Margin.Left, BorderBrush->Margin.Top) * BorderBrush->ImageSize * WidgetGeometry.Scale) + PulseOffset)) - WindowPos;
FVector2D BorderSize = ((WidgetGeometry.Size * WidgetGeometry.Scale) + (PulseOffset * 2.0f) + (FVector2D(BorderBrush->Margin.Right * 2.0f, BorderBrush->Margin.Bottom * 2.0f) * BorderBrush->ImageSize * WidgetGeometry.Scale));
FPaintGeometry BorderGeometry(BorderPosition, BorderSize, WidgetGeometry.Scale);
// draw highlight border
FSlateDrawElement::MakeBox(OutDrawElements, OverlayLayerId + 1, BorderGeometry, BorderBrush, WindowClippingRect, ESlateDrawEffect::None, BorderTint);
}
return SBorder::OnPaint(AllottedGeometry, MyClippingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
}
示例15: MakeGradient
void FSlateDrawElement::MakeGradient( FSlateWindowElementList& ElementList, uint32 InLayer, const FPaintGeometry& InPaintGeometry, TArray<FSlateGradientStop> InGradientStops, EOrientation InGradientType, const FSlateRect& InClippingRect, ESlateDrawEffect::Type InDrawEffects, bool bGammaCorrect )
{
FSlateDrawElement& DrawElt = ElementList.AddUninitialized();
DrawElt.ElementType = ET_Gradient;
DrawElt.Position = InPaintGeometry.DrawPosition;
DrawElt.Size = InPaintGeometry.DrawSize;
DrawElt.ClippingRect = InClippingRect;
DrawElt.DataPayload.SetGradientPayloadProperties( InGradientStops, InGradientType, bGammaCorrect );
DrawElt.Layer = InLayer;
DrawElt.DrawEffects = InDrawEffects;
DrawElt.Scale = InPaintGeometry.DrawScale;
}