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

Visual image that supports transition effects through material. More...

#include <BackgroundVisualImage.h>

Inheritance diagram for UBackgroundVisualImage:
UVisualImage UVisualImageBase IInfoAssignable

Public Member Functions

virtual void ReleaseSlateResources (bool bReleaseChildren) override
 Releases memory allocated for slate widgets.
 
 UBackgroundVisualImage (const FObjectInitializer &ObjectInitializer)
 
void StopTransition ()
 Stops ongoing transition.
 
bool IsTransitioning () const
 
void PlayTransition (UPaperFlipbook *Target, UMaterialInstanceDynamic *Transition, bool bShouldAnimateTarget)
 Plays transition from UVisualImage::Flipbook to UBackgroundVisualImage::Target.
 
void PlayTransition (UPaperFlipbook *Target, UMaterialInstanceDynamic *Transition, int32 FrameIndex)
 Version for non-animated flipbooks.
 
- Public Member Functions inherited from UVisualImage
 UVisualImage (const FObjectInitializer &ObjectInitializer)
 
 DECLARE_DYNAMIC_DELEGATE_RetVal (UPaperFlipbook *, FGetPaperFlipbook)
 
virtual void AssignVisualImageInfo (const FVisualImageInfo &InInfo) override
 Applies received information to this image.
 
void SetAnimate (bool IsAnimated)
 Setter for UVisualController::bAnimate.
 
void SetFrameIndex (int Index)
 Setter for UVisualImage::FrameIndex.
 
void SetFlipbook (UPaperFlipbook *InFlipbook)
 Synchronous setter for flipbook.
 
void SetFlipbookAsync (TSoftObjectPtr< UPaperFlipbook > InFlipbook)
 Asynchronous setter for flipbook.
 
void CancelAsyncLoad ()
 Releases streamed flipbook.
 
bool IsFlipbookLoading () const
 
bool IsFlipbookLoaded () const
 
void SetColorAndOpacity (const FLinearColor &InColorAndOpacity)
 Setter for UVisualImage::ColorAndOpacity.
 
void SetDesiredScale (const FVector2D &InDesiredScale)
 Setter for UVisualImage::DesiredScale.
 
void SetMirrorScale (const FVector2D &InMirrorScale)
 Setter for UVisualImage::MirrorScale.
 
FORCEINLINE UPaperFlipbook * GetFlipbook () const
 
FORCEINLINE bool IsAnimated () const
 
FORCEINLINE int32 GetFrameIndex () const
 
FORCEINLINE FLinearColor GetColorAndOpacity () const
 
FORCEINLINE FVector2D GetDesiredScale () const
 
FORCEINLINE FVector2D GetMirrorScale () const
 
UPaperSprite * GetCurrentSprite () const
 

Protected Member Functions

virtual TSharedRef< SWidget > RebuildWidget () override
 
- Protected Member Functions inherited from UVisualImage
virtual void SynchronizeProperties () override
 Keeps C++ and derived blueprint classes synced in the widget designer.
 
TSharedPtr< FStreamableHandle > AsyncLoadFlipbook (TSoftObjectPtr< UPaperFlipbook > FlipbookToLoad, FStreamableDelegate AfterLoadDelegate, TAsyncLoadPriority Priority)
 Asynchronously stream soft flipbook in the memory.
 
const UPaperFlipbook * ToFlipbook (TAttribute< UPaperFlipbook * > InFlipbook) const
 Converts flipbook attribute to the flipbook pointer.
 
 PROPERTY_BINDING_IMPLEMENTATION (FSlateColor, ColorAndOpacity)
 
- Protected Member Functions inherited from UVisualImageBase
 UVisualImageBase (const FObjectInitializer &ObjectInitializer)
 Abstract, cannot be instantiated.
 

Additional Inherited Members

- Protected Attributes inherited from UVisualImage
TObjectPtr< UPaperFlipbook > Flipbook
 Paper flipbook to visualize.
 
FGetPaperFlipbook FlipbookDelegate
 Delegate for property binding of the flipbook.
 
FLinearColor ColorAndOpacity
 Color and opacity of the flipbook.
 
FGetLinearColor ColorAndOpacityDelegate
 Delegate for property binding of the color and opacity.
 
FVector2D DesiredScale
 Scale of the flipbook.
 
FVector2D MirrorScale
 Determines the orientation of the sprite on both axes.
 
bool bAnimate
 Decides whether or not flipbook's animation sequence should be played.
 
int32 FrameIndex
 Index of the flipbook's frame that must be rendered.
 
TSharedPtr< FStreamableHandle > FlipbookHandle
 Handle to the streamable flipbook.
 
TSharedPtr< SVisualImageVisualImageSlate
 Underlying slate visual image.
 

Detailed Description

Visual image that supports transition effects through material.

Member Function Documentation

◆ IsTransitioning()

bool UBackgroundVisualImage::IsTransitioning ( ) const
Returns
false when no transition is active.

◆ PlayTransition() [1/2]

void UBackgroundVisualImage::PlayTransition ( UPaperFlipbook * Target,
UMaterialInstanceDynamic * Transition,
bool bShouldAnimateTarget )

Plays transition from UVisualImage::Flipbook to UBackgroundVisualImage::Target.

Parameters
TargetNew flipbook that would be displayed by this image after transition ends
TransitionMaterial that serves as transition effect
bShouldAnimateTargetWhether or not UBackgroundVisualImage::Target flipbook should be animated. For not animated flipbooks, will display first frame of the flipbook.

◆ PlayTransition() [2/2]

void UBackgroundVisualImage::PlayTransition ( UPaperFlipbook * Target,
UMaterialInstanceDynamic * Transition,
int32 FrameIndex )

Version for non-animated flipbooks.

See also
UBackgroundVisualImage::PlayTransition(UPaperFlipbook*, UMaterialInstanceDynamic*, bool)
Parameters
TargetNew flipbook that would be displayed by this image after transition ends
TransitionMaterial that serves as transition effect
FrameIndexwhich frame to show after transition ends.

◆ RebuildWidget()

TSharedRef< SWidget > UBackgroundVisualImage::RebuildWidget ( )
overrideprotectedvirtual
Returns
underlying slate widget

Reimplemented from UVisualImage.

◆ ReleaseSlateResources()

void UBackgroundVisualImage::ReleaseSlateResources ( bool bReleaseChildren)
overridevirtual

Releases memory allocated for slate widgets.

Parameters
bReleaseChildrenshould memory of child widgets be released

Reimplemented from UVisualImage.

◆ StopTransition()

void UBackgroundVisualImage::StopTransition ( )

Stops ongoing transition.

Has no effect when called during stopped transition.


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