Widget that can visualize and animate sprite flipbooks.
More...
#include <G:/UE5/UEProjects/5.7/VisualUEx/Plugins/VisualU/Source/VisualU/Public/VisualImage.h>
|
|
virtual void | SynchronizeProperties () override |
| | Keeps C++ and derived blueprint classes synced in the widget designer.
|
| |
| virtual TSharedRef< SWidget > | RebuildWidget () override |
| |
| 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) |
| |
|
| UVisualImageBase (const FObjectInitializer &ObjectInitializer) |
| | Abstract, cannot be instantiated.
|
| |
|
|
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< SVisualImage > | VisualImageSlate |
| | Underlying slate visual image.
|
| |
Widget that can visualize and animate sprite flipbooks.
Visual image operates on UPaperFlipbook class which is provided by Paper2D built-in plugin. Supports asynchronous loading of soft flipbooks.
◆ AssignVisualImageInfo()
Applies received information to this image.
- Parameters
-
| InInfo | information for this visual image |
◆ AsyncLoadFlipbook()
| TSharedPtr< FStreamableHandle > UVisualImage::AsyncLoadFlipbook |
( |
TSoftObjectPtr< UPaperFlipbook > | FlipbookToLoad, |
|
|
FStreamableDelegate | AfterLoadDelegate, |
|
|
TAsyncLoadPriority | Priority ) |
|
protected |
Asynchronously stream soft flipbook in the memory.
Will trigger assertion for invalid soft flipbook.
- Parameters
-
| FlipbookToLoad | soft flipbook to stream in memory |
| AfterLoadDelegate | delegate to execute after loading is complete |
| Priority | how urgent is loading of the soft flipbook |
- Returns
- handle to the loaded flipbook
◆ CancelAsyncLoad()
| void UVisualImage::CancelAsyncLoad |
( |
| ) |
|
Releases streamed flipbook.
- Note
- does not affect already loaded flipbook
◆ GetColorAndOpacity()
| FORCEINLINE FLinearColor UVisualImage::GetColorAndOpacity |
( |
| ) |
const |
|
inline |
- Returns
- color and opacity of the flipbook
◆ GetCurrentSprite()
| UPaperSprite * UVisualImage::GetCurrentSprite |
( |
| ) |
const |
- Returns
- sprite of the flipbook that is currently visualized by this widget
◆ GetDesiredScale()
| FORCEINLINE FVector2D UVisualImage::GetDesiredScale |
( |
| ) |
const |
|
inline |
- Returns
- desired scale of the flipbook
◆ GetFlipbook()
| FORCEINLINE UPaperFlipbook * UVisualImage::GetFlipbook |
( |
| ) |
const |
|
inline |
◆ GetFrameIndex()
| FORCEINLINE int32 UVisualImage::GetFrameIndex |
( |
| ) |
const |
|
inline |
- Returns
- Index of the flipbook frame that should be displayed. Meaningless when flipbook is animated.
◆ GetMirrorScale()
| FORCEINLINE FVector2D UVisualImage::GetMirrorScale |
( |
| ) |
const |
|
inline |
- Returns
- mirror scale of the flipbook
◆ IsAnimated()
| FORCEINLINE bool UVisualImage::IsAnimated |
( |
| ) |
const |
|
inline |
- Returns
- animation state of the flipbook
◆ IsFlipbookLoaded()
| bool UVisualImage::IsFlipbookLoaded |
( |
| ) |
const |
- Returns
true when streaming has finished.
◆ IsFlipbookLoading()
| bool UVisualImage::IsFlipbookLoading |
( |
| ) |
const |
- Returns
true when streaming is still in progress.
◆ RebuildWidget()
| TSharedRef< SWidget > UVisualImage::RebuildWidget |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ ReleaseSlateResources()
| void UVisualImage::ReleaseSlateResources |
( |
bool | bReleaseChildren | ) |
|
|
overridevirtual |
Releases memory allocated for slate widgets.
- Parameters
-
| bReleaseChildren | should memory of child widgets be released |
Reimplemented in UBackgroundVisualImage.
◆ SetAnimate()
| void UVisualImage::SetAnimate |
( |
bool | IsAnimated | ) |
|
Setter for UVisualController::bAnimate.
- Parameters
-
| IsAnimated | new flipbook animation state |
◆ SetColorAndOpacity()
| void UVisualImage::SetColorAndOpacity |
( |
const FLinearColor & | InColorAndOpacity | ) |
|
◆ SetDesiredScale()
| void UVisualImage::SetDesiredScale |
( |
const FVector2D & | InDesiredScale | ) |
|
◆ SetFlipbook()
| void UVisualImage::SetFlipbook |
( |
UPaperFlipbook * | InFlipbook | ) |
|
Synchronous setter for flipbook.
- Parameters
-
| InFlipbook | new flipbook to display |
◆ SetFlipbookAsync()
| void UVisualImage::SetFlipbookAsync |
( |
TSoftObjectPtr< UPaperFlipbook > | InFlipbook | ) |
|
Asynchronous setter for flipbook.
- Parameters
-
| InFlipbook | new soft flipbook to display |
◆ SetFrameIndex()
| void UVisualImage::SetFrameIndex |
( |
int | Index | ) |
|
◆ SetMirrorScale()
| void UVisualImage::SetMirrorScale |
( |
const FVector2D & | InMirrorScale | ) |
|
◆ ToFlipbook()
| const UPaperFlipbook * UVisualImage::ToFlipbook |
( |
TAttribute< UPaperFlipbook * > | InFlipbook | ) |
const |
|
protected |
Converts flipbook attribute to the flipbook pointer.
Used to implement property binding of the flipbook.
- Parameters
-
| InFlipbook | flipbook attribute to convert |
- Returns
- retrieved flipbook
◆ ColorAndOpacity
| FLinearColor UVisualImage::ColorAndOpacity |
|
protected |
Color and opacity of the flipbook.
- Note
- has no effect on widget appearance for invalid flipbook
◆ DesiredScale
| FVector2D UVisualImage::DesiredScale |
|
protected |
Scale of the flipbook.
Must be larger than zero on both axes.
◆ FlipbookDelegate
| FGetPaperFlipbook UVisualImage::FlipbookDelegate |
|
protected |
◆ FrameIndex
| int32 UVisualImage::FrameIndex |
|
protected |
◆ MirrorScale
| FVector2D UVisualImage::MirrorScale |
|
protected |
Determines the orientation of the sprite on both axes.
Only -1 or 1 values are valid.
- Note
- mirror scale does not affect the desired size of the widget
◆ VisualImageSlate
The documentation for this class was generated from the following files:
- VisualImage.h
- VisualImage.cpp