VisualU 1.2.1
Plugin for Unreal Engine 5 that brings core functionality for a widget-based visual novel game
 
Loading...
Searching...
No Matches
SBackgroundVisualImage Class Referencefinal

Slate visual image that supports transition effects through material. More...

#include <SBackgroundVisualImage.h>

Inheritance diagram for SBackgroundVisualImage:
SVisualImage SVisualImageBase< SVisualImage >

Public Member Functions

void Construct (const FArguments &Args)
 Constructor call for slate declarative syntax.
 
void StartTransition (UPaperFlipbook *TargetFlipbook, UMaterialInstanceDynamic *TransitionMaterial, bool bShouldAnimateTarget)
 
void StartTransition (UPaperFlipbook *TargetFlipbook, UMaterialInstanceDynamic *TransitionMaterial, int32 FrameIndex)
 
void StopTransition ()
 
FORCEINLINE bool IsTransitioning () const
 
- Public Member Functions inherited from SVisualImage
 SLATE_BEGIN_ARGS (SVisualImage)
 
void Construct (const FArguments &Args)
 Constructor call for slate declarative syntax.
 
void UpdateSequence ()
 Resets SVisualImage::CurveSequence.
 
void SetAnimate (bool IsAnimated)
 Setter for SVisualImage::bAnimate.
 
void SetSpriteIndex (int32 Index)
 Setter for SVisualImage::SpriteIndex.
 
void SetFlipbook (UPaperFlipbook *InFlipbook)
 Setter for SVisualImage::Flipbook.
 
void SetFlipbook (TAttribute< const UPaperFlipbook * > InFlipbook)
 Attribute version.
 
void SetColorAndOpacity (const FLinearColor &InLinearColor)
 Setter for SVisualImage::ColorAndOpacity.
 
void SetColorAndOpacity (TAttribute< FSlateColor > InColorAttribute)
 Attribute version.
 
void SetColorAndOpacity (const FSlateColor &InSlateColor)
 Slate color version.
 
void SetDesiredScale (const FVector2D &InDesiredScale)
 Setter for SVisualImage::CustomDesiredScale.
 
void SetDesiredScale (TAttribute< TOptional< FVector2D > > InDesiredScale)
 Attribute version.
 
void SetDesiredScale (TOptional< FVector2D > InDesiredScale)
 TOptional version.
 
void SetMirrorScale (const FVector2D &InMirrorScale)
 Setter for SVisualImage::MirrorScale.
 
void SetMirrorScale (TAttribute< FVector2D > InMirrorScale)
 Attribute version.
 
void SetMirrorScale (const FScale2D &InMirrorScale)
 Scale 2D version.
 
UPaperSprite * GetCurrentSprite () const
 
virtual bool IsResourceValid () const
 Declared as virtual so subclasses can override them, but these methods are statically dispatched in the base class and all must be implemented.
 
virtual const FVector2D GetImageSize () const
 
virtual const FLinearColor GetFinalColorAndOpacity (const FWidgetStyle &InWidgetStyle) const
 Applies SVisualImage::ColorAndOpacity to the final color of the flipbook.
 
virtual void PreSlateDrawElementExtension () const
 No extension.
 
virtual FGeometry MakeCustomGeometry (const FGeometry &AllotedGeometry) const
 Applies SVisualImage::MirrorScale to the brush geometry when it is valid.
 
virtual void PostSlateDrawElementExtension () const
 No extension.
 

Protected Member Functions

virtual void AddReferencedObjects (FReferenceCollector &Collector) override
 
virtual FString GetReferencerName () const override
 
- Protected Member Functions inherited from SVisualImage
virtual FVector2D ComputeDesiredSize (float) const override
 Calculates desire size.
 
virtual bool ComputeVolatility () const override
 
FORCEINLINE FCurveSequence * GetCurveSequence ()
 
FORCEINLINE TSlateAttributeRef< const UPaperFlipbook * > GetFlipbook () const
 
FORCEINLINE TSlateAttributeRef< FSlateColor > GetColorAndOpacity () const
 
FORCEINLINE TSlateAttributeRef< TOptional< FVector2D > > GetDesiredScale () const
 
FORCEINLINE TSlateAttributeRef< FVector2D > GetMirrorScale () const
 
FORCEINLINE bool GetAnimate () const
 
FORCEINLINE int32 GetSpriteIndex () const
 
- Protected Member Functions inherited from SVisualImageBase< SVisualImage >
virtual FSlateBrush ConvertToBrush () const final
 Handles conversion of the render resource to the slate brush.
 
virtual int32 OnPaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const override final
 Paints render resource as a brush after applying all modifiers.
 
bool IsResourceValid () const
 Used during resource-to-brush conversion to stop it early when resource is invalid.
 
UObject * GetFinalResource () const
 Resource to be displayed by the widget.
 
const FVector2D GetImageSize () const
 
const FLinearColor GetFinalColorAndOpacity (const FWidgetStyle &InWidgetStyle) const
 
void PreSlateDrawElementExtension () const
 Optional extension to the SVisualImageBase::OnPaint template.
 
FGeometry MakeCustomGeometry (const FGeometry &AllotedGeometry) const
 
void PostSlateDrawElementExtension () const
 Optional extension to the SVisualImageBase::OnPaint template.
 

Private Member Functions

 SLATE_BEGIN_ARGS (SBackgroundVisualImage)
 
virtual UObject * GetFinalResource () const override
 
UPaperSprite * GetTargetSprite () const
 Retrieves sprite from SBackgroundVisualImage::Target.
 

Private Attributes

TSlateAttribute< UMaterialInstanceDynamic * > Transition
 Material instance to be rendered as transition.
 
TSlateAttribute< UPaperFlipbook * > Target
 Sprite that will be rendered after transition ends.
 
bool bIsTransitioning
 
bool bIsTargetAnimated
 
int32 TargetFrameIndex
 

Detailed Description

Slate visual image that supports transition effects through material.

Member Function Documentation

◆ AddReferencedObjects()

void SBackgroundVisualImage::AddReferencedObjects ( FReferenceCollector & Collector)
overrideprotectedvirtual

◆ Construct()

void SBackgroundVisualImage::Construct ( const FArguments & Args)

Constructor call for slate declarative syntax.

Parameters
Argsslate arguments

◆ GetFinalResource()

UObject * SBackgroundVisualImage::GetFinalResource ( ) const
overrideprivatevirtual

◆ GetReferencerName()

FString SBackgroundVisualImage::GetReferencerName ( ) const
overrideprotectedvirtual
See also
SVisualImage::GetReferencerName()

Reimplemented from SVisualImage.

◆ IsTransitioning()

FORCEINLINE bool SBackgroundVisualImage::IsTransitioning ( ) const
inline

◆ StartTransition() [1/2]

void SBackgroundVisualImage::StartTransition ( UPaperFlipbook * TargetFlipbook,
UMaterialInstanceDynamic * TransitionMaterial,
bool bShouldAnimateTarget )
See also
UBackgroundVisualImage::StartTransition(UPaperFlipbook*, UMaterialInstanceDynamic*, bool)

◆ StartTransition() [2/2]

void SBackgroundVisualImage::StartTransition ( UPaperFlipbook * TargetFlipbook,
UMaterialInstanceDynamic * TransitionMaterial,
int32 FrameIndex )
See also
UBackgroundVisualImage::StartTransition(UPaperFlipbook*, UMaterialInstanceDynamic*, int32)

◆ StopTransition()

void SBackgroundVisualImage::StopTransition ( )

Member Data Documentation

◆ bIsTargetAnimated

bool SBackgroundVisualImage::bIsTargetAnimated
private
See also
UBackgroundVisualImage::StartTransition(UPaperFlipbook*, UMaterialInstanceDynamic*, bool)

◆ bIsTransitioning

bool SBackgroundVisualImage::bIsTransitioning
private

◆ TargetFrameIndex

int32 SBackgroundVisualImage::TargetFrameIndex
private
See also
UBackgroundVisualImage::StartTransition(UPaperFlipbook*, UMaterialInstanceDynamic*, int32)

The documentation for this class was generated from the following files: