Skip to content
Snippets Groups Projects
Commit 4494ec34 authored by Giovanni Vindiola's avatar Giovanni Vindiola :speech_balloon:
Browse files

Added AsyncLoadingScreen Plugin. Updated SmartDesk, VRCharacter, Desktop Character

parent f7a311a6
No related branches found
No related tags found
No related merge requests found
Showing
with 2010 additions and 0 deletions
...@@ -115,3 +115,13 @@ bSkipMovies=False ...@@ -115,3 +115,13 @@ bSkipMovies=False
[/Script/LiveLink.LiveLinkSettings] [/Script/LiveLink.LiveLinkSettings]
DefaultLiveLinkPreset=/Game/HistoricMetahumans/A2FLiveLink_2.A2FLiveLink_2 DefaultLiveLinkPreset=/Game/HistoricMetahumans/A2FLiveLink_2.A2FLiveLink_2
[/Script/AsyncLoadingScreen.LoadingScreenSettings]
bPreloadBackgroundImages=False
StartupLoadingScreen=(MinimumLoadingScreenDisplayTime=4.000000,bAutoCompleteWhenLoadingCompletes=True,bMoviesAreSkippable=True,bWaitForManualStop=False,bAllowInEarlyStartup=False,bAllowEngineTick=False,PlaybackType=MT_Normal,MoviePaths=,bShuffle=False,bSetDisplayMovieIndexManually=False,bShowWidgetOverlay=False,bShowLoadingCompleteText=False,LoadingCompleteTextSettings=(LoadingCompleteText="",Appearance=(ColorAndOpacity=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),Font=(FontObject=/Script/Engine.Font'"/Engine/EngineFonts/Roboto.Roboto"',FontMaterial=None,OutlineSettings=(OutlineSize=0,bSeparateFillAlpha=False,bApplyOutlineToDropShadows=False,OutlineMaterial=None,OutlineColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000)),TypefaceFontName="Normal",Size=24,LetterSpacing=0,SkewAmount=0.000000),ShadowOffset=(X=0.000000,Y=0.000000),ShadowColorAndOpacity=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),Justification=Left),Alignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),Padding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),bFadeInOutAnim=True,AnimationSpeed=1.000000),Background=(Images=,ImageStretch=ScaleToFit,Padding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),BackgroundColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000),bSetDisplayBackgroundManually=False),TipWidget=(TipText=,Appearance=(ColorAndOpacity=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),Font=(FontObject=/Script/Engine.Font'"/Engine/EngineFonts/Roboto.Roboto"',FontMaterial=None,OutlineSettings=(OutlineSize=0,bSeparateFillAlpha=False,bApplyOutlineToDropShadows=False,OutlineMaterial=None,OutlineColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000)),TypefaceFontName="Normal",Size=20,LetterSpacing=0,SkewAmount=0.000000),ShadowOffset=(X=0.000000,Y=0.000000),ShadowColorAndOpacity=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),Justification=Left),TipWrapAt=1000.000000,bSetDisplayTipTextManually=False),LoadingWidget=(LoadingIconType=LIT_CircularThrobber,LoadingWidgetType=LWT_Horizontal,TransformTranslation=(X=0.000000,Y=0.000000),TransformScale=(X=1.000000,Y=1.000000),TransformPivot=(X=0.500000,Y=0.500000),LoadingText=NSLOCTEXT("AsyncLoadingScreen", "Loading", "LOADING"),bLoadingTextRightPosition=True,bLoadingTextTopPosition=True,Appearance=(ColorAndOpacity=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),Font=(FontObject=/Script/Engine.Font'"/Engine/EngineFonts/Roboto.Roboto"',FontMaterial=None,OutlineSettings=(OutlineSize=0,bSeparateFillAlpha=False,bApplyOutlineToDropShadows=False,OutlineMaterial=None,OutlineColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000)),TypefaceFontName="Bold",Size=32,LetterSpacing=0,SkewAmount=0.000000),ShadowOffset=(X=0.000000,Y=0.000000),ShadowColorAndOpacity=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),Justification=Left),ThrobberSettings=(NumberOfPieces=3,bAnimateHorizontally=True,bAnimateVertically=True,bAnimateOpacity=True,Image=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False))),CircularThrobberSettings=(NumberOfPieces=6,Period=0.750000,Radius=64.000000,Image=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False))),ImageSequenceSettings=(Images=,Scale=(X=1.000000,Y=1.000000),Interval=0.050000,bPlayReverse=False),TextAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),LoadingIconAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),Space=1.000000,bHideLoadingWidgetWhenCompletes=False),Layout=ALSL_Letterbox)
DefaultLoadingScreen=(MinimumLoadingScreenDisplayTime=2.500000,bAutoCompleteWhenLoadingCompletes=True,bMoviesAreSkippable=True,bWaitForManualStop=False,bAllowInEarlyStartup=False,bAllowEngineTick=False,PlaybackType=MT_Normal,MoviePaths=,bShuffle=False,bSetDisplayMovieIndexManually=False,bShowWidgetOverlay=True,bShowLoadingCompleteText=False,LoadingCompleteTextSettings=(LoadingCompleteText="",Appearance=(ColorAndOpacity=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),Font=(FontObject=/Script/Engine.Font'"/Engine/EngineFonts/Roboto.Roboto"',FontMaterial=None,OutlineSettings=(OutlineSize=0,bSeparateFillAlpha=False,bApplyOutlineToDropShadows=False,OutlineMaterial=None,OutlineColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000)),TypefaceFontName="Normal",Size=24,LetterSpacing=0,SkewAmount=0.000000),ShadowOffset=(X=0.000000,Y=0.000000),ShadowColorAndOpacity=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),Justification=Left),Alignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),Padding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),bFadeInOutAnim=True,AnimationSpeed=1.000000),Background=(Images=("/Game/SmartClassroom/Core/Blueprints/UMG/24__LuxorTempleNight__right4k_noMIP.24__LuxorTempleNight__right4k_noMIP"),ImageStretch=Fill,Padding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),BackgroundColor=(R=0.006594,G=0.013857,B=0.031250,A=1.000000),bSetDisplayBackgroundManually=False),TipWidget=(TipText=(NSLOCTEXT("[/Script/AsyncLoadingScreen]", "76780EB24E18BCA1A6B2BCB295C06B5F", "To achieve a 360 x 180 degree panoramic effect, the CAVEcam has to take 72 pictures per “eye,” with the robotic GigaPan® Epic Pro automatically repositioning the camera each time, for a total of 144 images.")),Appearance=(ColorAndOpacity=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),Font=(FontObject=/Script/Engine.Font'"/Engine/EngineFonts/Roboto.Roboto"',FontMaterial=None,OutlineSettings=(OutlineSize=0,bSeparateFillAlpha=False,bApplyOutlineToDropShadows=False,OutlineMaterial=None,OutlineColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000)),TypefaceFontName="Normal",Size=20,LetterSpacing=0,SkewAmount=0.000000),ShadowOffset=(X=0.000000,Y=0.000000),ShadowColorAndOpacity=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),Justification=Left),TipWrapAt=1000.000000,bSetDisplayTipTextManually=False),LoadingWidget=(LoadingIconType=LIT_CircularThrobber,LoadingWidgetType=LWT_Horizontal,TransformTranslation=(X=0.000000,Y=0.000000),TransformScale=(X=1.000000,Y=1.000000),TransformPivot=(X=0.500000,Y=0.500000),LoadingText=NSLOCTEXT("[/Script/AsyncLoadingScreen]", "3FE5F0A8416D8B546E9EAEAFBB916643", "LOADING..."),bLoadingTextRightPosition=True,bLoadingTextTopPosition=True,Appearance=(ColorAndOpacity=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),Font=(FontObject=/Script/Engine.Font'"/Engine/EngineFonts/Roboto.Roboto"',FontMaterial=None,OutlineSettings=(OutlineSize=0,bSeparateFillAlpha=False,bApplyOutlineToDropShadows=False,OutlineMaterial=None,OutlineColor=(R=0.000000,G=0.000000,B=0.000000,A=1.000000)),TypefaceFontName="Bold",Size=32,LetterSpacing=0,SkewAmount=0.000000),ShadowOffset=(X=0.000000,Y=0.000000),ShadowColorAndOpacity=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),Justification=Left),ThrobberSettings=(NumberOfPieces=3,bAnimateHorizontally=True,bAnimateVertically=True,bAnimateOpacity=True,Image=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=/Script/Engine.Texture2D'"/AsyncLoadingScreen/Default/Icon/icon-circle.icon-circle"',ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False))),CircularThrobberSettings=(NumberOfPieces=6,Period=0.750000,Radius=64.000000,Image=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False))),ImageSequenceSettings=(Images=,Scale=(X=1.000000,Y=1.000000),Interval=0.050000,bPlayReverse=False),TextAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),LoadingIconAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),Space=20.000000,bHideLoadingWidgetWhenCompletes=False),Layout=ALSL_Classic)
Classic=(bIsWidgetAtBottom=True,bIsLoadingWidgetAtLeft=True,Space=1.000000,TipAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),BorderHorizontalAlignment=HAlign_Fill,BorderPadding=(Left=20.000000,Top=20.000000,Right=20.000000,Bottom=20.000000),BorderBackground=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=0.100000,G=0.100000,B=0.100000,A=0.800000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False)))
Center=(bIsTipAtBottom=True,TipAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),BorderHorizontalAlignment=HAlign_Fill,BorderVerticalOffset=0.000000,BorderPadding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),BorderBackground=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False)))
Letterbox=(bIsLoadingWidgetAtTop=True,TipAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),LoadingWidgetAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),TopBorderHorizontalAlignment=HAlign_Fill,BottomBorderHorizontalAlignment=HAlign_Fill,TopBorderPadding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),BottomBorderPadding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TopBorderBackground=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False)),BottomBorderBackground=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False)))
Sidebar=(bIsWidgetAtRight=True,bIsLoadingWidgetAtTop=True,Space=1.000000,VerticalAlignment=VAlign_Center,LoadingWidgetAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),TipAlignment=(HorizontalAlignment=HAlign_Center,VerticalAlignment=VAlign_Center),BorderVerticalAlignment=VAlign_Fill,BorderHorizontalOffset=0.000000,BorderPadding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),BorderBackground=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False)))
DualSidebar=(bIsLoadingWidgetAtRight=True,LeftVerticalAlignment=VAlign_Center,RightVerticalAlignment=VAlign_Center,LeftBorderVerticalAlignment=VAlign_Fill,RightBorderVerticalAlignment=VAlign_Fill,LeftBorderPadding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),RightBorderPadding=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),LeftBorderBackground=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False)),RightBorderBackground=(bIsDynamicallyLoaded=False,DrawAs=Image,Tiling=NoTile,Mirroring=NoMirror,ImageType=NoImage,ImageSize=(X=32.000000,Y=32.000000),Margin=(Left=0.000000,Top=0.000000,Right=0.000000,Bottom=0.000000),TintColor=(SpecifiedColor=(R=1.000000,G=1.000000,B=1.000000,A=1.000000),ColorUseRule=UseColor_Specified),OutlineSettings=(CornerRadii=(X=0.000000,Y=0.000000,Z=0.000000,W=1.000000),Color=(SpecifiedColor=(R=0.000000,G=0.000000,B=0.000000,A=0.000000),ColorUseRule=UseColor_Specified),Width=0.000000,RoundingType=HalfHeightRadius,bUseBrushTransparency=False),ResourceObject=None,ResourceName="",UVRegion=(Min=(X=0.000000,Y=0.000000),Max=(X=0.000000,Y=0.000000),bIsValid=False)))
...@@ -238,6 +238,11 @@ ...@@ -238,6 +238,11 @@
{ {
"Name": "HairModelingToolset", "Name": "HairModelingToolset",
"Enabled": true "Enabled": true
},
{
"Name": "AsyncLoadingScreen",
"Enabled": true,
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/01f39767dc6b4290877f38365787cbf8"
} }
] ]
} }
\ No newline at end of file
# Visual Studio 2015 user specific files
.vs/
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
*.ipa
# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga
# Binary Files
Binaries/*
Plugins/*/Binaries/*
# Builds
Build/*
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt
# Don't ignore icon files in Build
!Build/**/*.ico
# Built data for maps
*_BuiltData.uasset
# Configuration files generated by the Editor
Saved/*
# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*
# Cache files for the editor to use
DerivedDataCache/*
{
"FileVersion": 3,
"Version": 8,
"VersionName": "1.5.1",
"EngineVersion": "5.2.0",
"FriendlyName": "Async Loading Screen",
"Description": "Allows you to configure a Loading Screen system in the project settings easily and automatically add a Loading Screen in your game whenever you open a new level.",
"Category": "Loading Screen",
"CreatedBy": "Truong Bui",
"CreatedByURL": "https://github.com/truong-bui/AsyncLoadingScreen",
"DocsURL": "https://github.com/truong-bui/AsyncLoadingScreen",
"MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/01f39767dc6b4290877f38365787cbf8",
"SupportURL": "https://github.com/truong-bui/AsyncLoadingScreen/issues",
"CanContainContent": true,
"Installed": true,
"Modules": [
{
"Name": "AsyncLoadingScreen",
"Type": "Runtime",
"LoadingPhase": "PreLoadingScreen",
"TargetDenyList": [
"Server"
]
}
]
}
\ No newline at end of file
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll
/README.md
/LICENSE
\ No newline at end of file
MIT License
Copyright (c) 2020 Truong Bui
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This diff is collapsed.
// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class AsyncLoadingScreen : ModuleRules
{
public AsyncLoadingScreen(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicIncludePaths.AddRange(
new string[] {
// ... add public include paths required here ...
}
);
PrivateIncludePaths.AddRange(
new string[] {
// ... add other private include paths required here ...
}
);
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core"
// ... add other public dependencies that you statically link with here ...
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"Slate",
"SlateCore",
"MoviePlayer",
"DeveloperSettings"
// ... add private dependencies that you statically link with here ...
}
);
DynamicallyLoadedModuleNames.AddRange(
new string[]
{
// ... add any modules that your module loads dynamically here ...
}
);
}
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "AsyncLoadingScreen.h"
#include "MoviePlayer.h"
#include "LoadingScreenSettings.h"
#include "SCenterLayout.h"
#include "SClassicLayout.h"
#include "SLetterboxLayout.h"
#include "SSidebarLayout.h"
#include "SDualSidebarLayout.h"
#include "Framework/Application/SlateApplication.h"
#include "AsyncLoadingScreenLibrary.h"
#include "Engine/Texture2D.h"
#define LOCTEXT_NAMESPACE "FAsyncLoadingScreenModule"
void FAsyncLoadingScreenModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
if (!IsRunningDedicatedServer() && FSlateApplication::IsInitialized())
{
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
if (IsMoviePlayerEnabled())
{
GetMoviePlayer()->OnPrepareLoadingScreen().AddRaw(this, &FAsyncLoadingScreenModule::PreSetupLoadingScreen);
}
// If PreloadBackgroundImages option is check, load all background images into memory
if (Settings->bPreloadBackgroundImages)
{
LoadBackgroundImages();
}
// Prepare the startup screen, the PreSetupLoadingScreen callback won't be called
// if we've already explicitly setup the loading screen
bIsStartupLoadingScreen = true;
SetupLoadingScreen(Settings->StartupLoadingScreen);
}
}
void FAsyncLoadingScreenModule::ShutdownModule()
{
// This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
// we call this function before unloading the module.
if (!IsRunningDedicatedServer())
{
// TODO: Unregister later
GetMoviePlayer()->OnPrepareLoadingScreen().RemoveAll(this);
}
}
bool FAsyncLoadingScreenModule::IsGameModule() const
{
return true;
}
TArray<UTexture2D*> FAsyncLoadingScreenModule::GetBackgroundImages()
{
return bIsStartupLoadingScreen ? StartupBackgroundImages : DefaultBackgroundImages;
}
void FAsyncLoadingScreenModule::PreSetupLoadingScreen()
{
UE_LOG(LogTemp, Warning, TEXT("PreSetupLoadingScreen"));
const bool bIsEnableLoadingScreen = UAsyncLoadingScreenLibrary::GetIsEnableLoadingScreen();
if (bIsEnableLoadingScreen)
{
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
bIsStartupLoadingScreen = false;
SetupLoadingScreen(Settings->DefaultLoadingScreen);
}
}
void FAsyncLoadingScreenModule::SetupLoadingScreen(const FALoadingScreenSettings& LoadingScreenSettings)
{
TArray<FString> MoviesList = LoadingScreenSettings.MoviePaths;
// Shuffle the movies list
if (LoadingScreenSettings.bShuffle == true)
{
ShuffleMovies(MoviesList);
}
if (LoadingScreenSettings.bSetDisplayMovieIndexManually == true)
{
MoviesList.Empty();
// Show specific movie if valid otherwise show original movies list
if (LoadingScreenSettings.MoviePaths.IsValidIndex(UAsyncLoadingScreenLibrary::GetDisplayMovieIndex()))
{
MoviesList.Add(LoadingScreenSettings.MoviePaths[UAsyncLoadingScreenLibrary::GetDisplayMovieIndex()]);
}
else
{
MoviesList = LoadingScreenSettings.MoviePaths;
}
}
FLoadingScreenAttributes LoadingScreen;
LoadingScreen.MinimumLoadingScreenDisplayTime = LoadingScreenSettings.MinimumLoadingScreenDisplayTime;
LoadingScreen.bAutoCompleteWhenLoadingCompletes = LoadingScreenSettings.bAutoCompleteWhenLoadingCompletes;
LoadingScreen.bMoviesAreSkippable = LoadingScreenSettings.bMoviesAreSkippable;
LoadingScreen.bWaitForManualStop = LoadingScreenSettings.bWaitForManualStop;
LoadingScreen.bAllowInEarlyStartup = LoadingScreenSettings.bAllowInEarlyStartup;
LoadingScreen.bAllowEngineTick = LoadingScreenSettings.bAllowEngineTick;
LoadingScreen.MoviePaths = MoviesList;
LoadingScreen.PlaybackType = LoadingScreenSettings.PlaybackType;
if (LoadingScreenSettings.bShowWidgetOverlay)
{
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
switch (LoadingScreenSettings.Layout)
{
case EAsyncLoadingScreenLayout::ALSL_Classic:
LoadingScreen.WidgetLoadingScreen = SNew(SClassicLayout, LoadingScreenSettings, Settings->Classic);
break;
case EAsyncLoadingScreenLayout::ALSL_Center:
LoadingScreen.WidgetLoadingScreen = SNew(SCenterLayout, LoadingScreenSettings, Settings->Center);
break;
case EAsyncLoadingScreenLayout::ALSL_Letterbox:
LoadingScreen.WidgetLoadingScreen = SNew(SLetterboxLayout, LoadingScreenSettings, Settings->Letterbox);
break;
case EAsyncLoadingScreenLayout::ALSL_Sidebar:
LoadingScreen.WidgetLoadingScreen = SNew(SSidebarLayout, LoadingScreenSettings, Settings->Sidebar);
break;
case EAsyncLoadingScreenLayout::ALSL_DualSidebar:
LoadingScreen.WidgetLoadingScreen = SNew(SDualSidebarLayout, LoadingScreenSettings, Settings->DualSidebar);
break;
}
}
GetMoviePlayer()->SetupLoadingScreen(LoadingScreen);
}
void FAsyncLoadingScreenModule::ShuffleMovies(TArray<FString>& MoviesList)
{
if (MoviesList.Num() > 0)
{
int32 LastIndex = MoviesList.Num() - 1;
for (int32 i = 0; i <= LastIndex; ++i)
{
int32 Index = FMath::RandRange(i, LastIndex);
if (i != Index)
{
MoviesList.Swap(i, Index);
}
}
}
}
void FAsyncLoadingScreenModule::LoadBackgroundImages()
{
// Empty all background images array
RemoveAllBackgroundImages();
const ULoadingScreenSettings* Settings = GetDefault<ULoadingScreenSettings>();
// Preload startup background images
for (auto& Image : Settings->StartupLoadingScreen.Background.Images)
{
UTexture2D* LoadedImage = Cast<UTexture2D>(Image.TryLoad());
if (LoadedImage)
{
StartupBackgroundImages.Add(LoadedImage);
}
}
// Preload default background images
for (auto& Image : Settings->DefaultLoadingScreen.Background.Images)
{
UTexture2D* LoadedImage = Cast<UTexture2D> (Image.TryLoad());
if (LoadedImage)
{
DefaultBackgroundImages.Add(LoadedImage);
}
}
}
void FAsyncLoadingScreenModule::RemoveAllBackgroundImages()
{
StartupBackgroundImages.Empty();
DefaultBackgroundImages.Empty();
}
bool FAsyncLoadingScreenModule::IsPreloadBackgroundImagesEnabled()
{
return GetDefault<ULoadingScreenSettings>()->bPreloadBackgroundImages;
}
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FAsyncLoadingScreenModule, AsyncLoadingScreen)
\ No newline at end of file
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "AsyncLoadingScreenLibrary.h"
#include "MoviePlayer.h"
#include "AsyncLoadingScreen.h"
int32 UAsyncLoadingScreenLibrary::DisplayBackgroundIndex = -1;
int32 UAsyncLoadingScreenLibrary::DisplayTipTextIndex = -1;
int32 UAsyncLoadingScreenLibrary::DisplayMovieIndex = -1;
bool UAsyncLoadingScreenLibrary::bShowLoadingScreen = true;
void UAsyncLoadingScreenLibrary::SetDisplayBackgroundIndex(int32 BackgroundIndex)
{
UAsyncLoadingScreenLibrary::DisplayBackgroundIndex = BackgroundIndex;
}
void UAsyncLoadingScreenLibrary::SetDisplayTipTextIndex(int32 TipTextIndex)
{
UAsyncLoadingScreenLibrary::DisplayTipTextIndex = TipTextIndex;
}
void UAsyncLoadingScreenLibrary::SetDisplayMovieIndex(int32 MovieIndex)
{
UAsyncLoadingScreenLibrary::DisplayMovieIndex = MovieIndex;
}
void UAsyncLoadingScreenLibrary::SetEnableLoadingScreen(bool bIsEnableLoadingScreen)
{
bShowLoadingScreen = bIsEnableLoadingScreen;
}
void UAsyncLoadingScreenLibrary::StopLoadingScreen()
{
GetMoviePlayer()->StopMovie();
}
void UAsyncLoadingScreenLibrary::PreloadBackgroundImages()
{
if (FAsyncLoadingScreenModule::IsAvailable())
{
FAsyncLoadingScreenModule& LoadingScreenModule = FAsyncLoadingScreenModule::Get();
if (LoadingScreenModule.IsPreloadBackgroundImagesEnabled())
{
LoadingScreenModule.LoadBackgroundImages();
}
}
}
void UAsyncLoadingScreenLibrary::RemovePreloadedBackgroundImages()
{
if (FAsyncLoadingScreenModule::IsAvailable())
{
FAsyncLoadingScreenModule& LoadingScreenModule = FAsyncLoadingScreenModule::Get();
LoadingScreenModule.RemoveAllBackgroundImages();
}
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "LoadingScreenSettings.h"
#include "UObject/ConstructorHelpers.h"
#include "Engine/Font.h"
#define LOCTEXT_NAMESPACE "AsyncLoadingScreen"
FLoadingWidgetSettings::FLoadingWidgetSettings() : LoadingText(LOCTEXT("Loading", "LOADING")) {}
//FLoadingCompleteTextSettings::FLoadingCompleteTextSettings() : LoadingCompleteText(LOCTEXT("Loading Complete", "Loading is complete! Press any key to continue...")) {}
ULoadingScreenSettings::ULoadingScreenSettings(const FObjectInitializer& Initializer) : Super(Initializer)
{
StartupLoadingScreen.TipWidget.TipWrapAt = 1000.0f;
StartupLoadingScreen.bShowWidgetOverlay = false;
DefaultLoadingScreen.TipWidget.TipWrapAt = 1000.0f;
// Set default font
if (!IsRunningDedicatedServer())
{
static ConstructorHelpers::FObjectFinder<UFont> RobotoFontObj(TEXT("/Engine/EngineFonts/Roboto"));
StartupLoadingScreen.TipWidget.Appearance.Font = FSlateFontInfo(RobotoFontObj.Object, 20, FName("Normal"));
DefaultLoadingScreen.TipWidget.Appearance.Font = FSlateFontInfo(RobotoFontObj.Object, 20, FName("Normal"));
StartupLoadingScreen.LoadingWidget.Appearance.Font = FSlateFontInfo(RobotoFontObj.Object, 32, FName("Bold"));
DefaultLoadingScreen.LoadingWidget.Appearance.Font = FSlateFontInfo(RobotoFontObj.Object, 32, FName("Bold"));
StartupLoadingScreen.LoadingCompleteTextSettings.Appearance.Font = FSlateFontInfo(RobotoFontObj.Object, 24, FName("Normal"));
DefaultLoadingScreen.LoadingCompleteTextSettings.Appearance.Font = FSlateFontInfo(RobotoFontObj.Object, 24, FName("Normal"));
}
}
#undef LOCTEXT_NAMESPACE
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SBackgroundWidget.h"
#include "LoadingScreenSettings.h"
#include "Slate/DeferredCleanupSlateBrush.h"
#include "Widgets/Images/SImage.h"
#include "Widgets/Layout/SBorder.h"
#include "Engine/Texture2D.h"
#include "AsyncLoadingScreenLibrary.h"
#include "AsyncLoadingScreen.h"
void SBackgroundWidget::Construct(const FArguments& InArgs, const FBackgroundSettings& Settings)
{
// If there's an image defined
if (Settings.Images.Num() > 0)
{
int32 ImageIndex = FMath::RandRange(0, Settings.Images.Num() - 1);
if (Settings.bSetDisplayBackgroundManually == true)
{
if (Settings.Images.IsValidIndex(UAsyncLoadingScreenLibrary::GetDisplayBackgroundIndex()))
{
ImageIndex = UAsyncLoadingScreenLibrary::GetDisplayBackgroundIndex();
}
}
// Load background from settings
UTexture2D* LoadingImage = nullptr;
const FSoftObjectPath& ImageAsset = Settings.Images[ImageIndex];
UObject* ImageObject = ImageAsset.TryLoad();
LoadingImage = Cast<UTexture2D>(ImageObject);
// If IsPreloadBackgroundImagesEnabled is enabled, load from images array
FAsyncLoadingScreenModule& LoadingScreenModule = FAsyncLoadingScreenModule::Get();
if (LoadingScreenModule.IsPreloadBackgroundImagesEnabled())
{
TArray<UTexture2D*> BackgroundImages = LoadingScreenModule.GetBackgroundImages();
if (!BackgroundImages.IsEmpty() && BackgroundImages.IsValidIndex(ImageIndex))
{
LoadingImage = BackgroundImages[ImageIndex];
}
}
if (LoadingImage)
{
ImageBrush = FDeferredCleanupSlateBrush::CreateBrush(LoadingImage);
ChildSlot
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.Padding(Settings.Padding)
.BorderBackgroundColor(Settings.BackgroundColor)
.BorderImage(FCoreStyle::Get().GetBrush("WhiteBrush"))
[
SNew(SScaleBox)
.Stretch(Settings.ImageStretch)
[
SNew(SImage)
.Image(ImageBrush.IsValid() ? ImageBrush->GetSlateBrush() : nullptr)
]
]
];
}
}
}
\ No newline at end of file
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SCenterLayout.h"
#include "LoadingScreenSettings.h"
#include "Widgets/Layout/SSafeZone.h"
#include "Widgets/Layout/SDPIScaler.h"
#include "SHorizontalLoadingWidget.h"
#include "SVerticalLoadingWidget.h"
#include "SBackgroundWidget.h"
#include "STipWidget.h"
#include "Widgets/SOverlay.h"
#include "Widgets/Layout/SBorder.h"
#include "SLoadingCompleteText.h"
void SCenterLayout::Construct(const FArguments& InArgs, const FALoadingScreenSettings& Settings, const FCenterLayoutSettings& LayoutSettings)
{
// Root widget and background
TSharedRef<SOverlay> Root = SNew(SOverlay)
+ SOverlay::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
[
SNew(SBackgroundWidget, Settings.Background)
];
// Placeholder for loading widget
TSharedRef<SWidget> LoadingWidget = SNullWidget::NullWidget;
if (Settings.LoadingWidget.LoadingWidgetType == ELoadingWidgetType::LWT_Horizontal)
{
LoadingWidget = SNew(SHorizontalLoadingWidget, Settings.LoadingWidget);
}
else
{
LoadingWidget = SNew(SVerticalLoadingWidget, Settings.LoadingWidget);
}
// Add loading widget at center
Root->AddSlot()
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
[
LoadingWidget
];
if (LayoutSettings.bIsTipAtBottom)
{
// Add tip widget at bottom
Root->AddSlot()
.HAlign(LayoutSettings.BorderHorizontalAlignment)
.VAlign(VAlign_Bottom)
.Padding(0, 0, 0, LayoutSettings.BorderVerticalOffset)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.BorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(LayoutSettings.TipAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.TipAlignment.VerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.BorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SCenterLayout::GetDPIScale)
[
SNew(STipWidget, Settings.TipWidget)
]
]
]
];
}
else
{
// Add tip widget at top
Root->AddSlot()
.HAlign(LayoutSettings.BorderHorizontalAlignment)
.VAlign(VAlign_Top)
.Padding(0, LayoutSettings.BorderVerticalOffset, 0, 0)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.BorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(LayoutSettings.TipAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.TipAlignment.VerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.BorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SCenterLayout::GetDPIScale)
[
SNew(STipWidget, Settings.TipWidget)
]
]
]
];
}
// Construct loading complete text if enable
if (Settings.bShowLoadingCompleteText)
{
Root->AddSlot()
.VAlign(Settings.LoadingCompleteTextSettings.Alignment.VerticalAlignment)
.HAlign(Settings.LoadingCompleteTextSettings.Alignment.HorizontalAlignment)
.Padding(Settings.LoadingCompleteTextSettings.Padding)
[
SNew(SLoadingCompleteText, Settings.LoadingCompleteTextSettings)
];
}
// Add root to this widget
ChildSlot
[
Root
];
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SClassicLayout.h"
#include "LoadingScreenSettings.h"
#include "Widgets/Layout/SSafeZone.h"
#include "Widgets/Layout/SDPIScaler.h"
#include "Widgets/Layout/SSpacer.h"
#include "Widgets/SBoxPanel.h"
#include "SHorizontalLoadingWidget.h"
#include "SVerticalLoadingWidget.h"
#include "SBackgroundWidget.h"
#include "STipWidget.h"
#include "SLoadingCompleteText.h"
void SClassicLayout::Construct(const FArguments& InArgs, const FALoadingScreenSettings& Settings, const FClassicLayoutSettings& LayoutSettings)
{
// Root widget and background
TSharedRef<SOverlay> Root = SNew(SOverlay)
+ SOverlay::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
[
SNew(SBackgroundWidget, Settings.Background)
];
// Placeholder for loading widget
TSharedRef<SWidget> LoadingWidget = SNullWidget::NullWidget;
if (Settings.LoadingWidget.LoadingWidgetType == ELoadingWidgetType::LWT_Horizontal)
{
LoadingWidget = SNew(SHorizontalLoadingWidget, Settings.LoadingWidget);
}
else
{
LoadingWidget = SNew(SVerticalLoadingWidget, Settings.LoadingWidget);
}
TSharedRef<SHorizontalBox> HorizontalBox = SNew(SHorizontalBox);
if (LayoutSettings.bIsLoadingWidgetAtLeft)
{
// Add Loading widget on left first
HorizontalBox.Get().AddSlot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
.AutoWidth()
[
LoadingWidget
];
// Add spacer at midder
HorizontalBox.Get().AddSlot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.AutoWidth()
[
SNew(SSpacer)
.Size(FVector2D(LayoutSettings.Space, 0.0f))
];
// Tip Text on the right
HorizontalBox.Get().AddSlot()
.FillWidth(1.0f)
.HAlign(LayoutSettings.TipAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.TipAlignment.VerticalAlignment)
[
SNew(STipWidget, Settings.TipWidget)
];
}
else
{
// Tip Text on the left
HorizontalBox.Get().AddSlot()
.FillWidth(1.0f)
.HAlign(LayoutSettings.TipAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.TipAlignment.VerticalAlignment)
[
// Add tip text
SNew(STipWidget, Settings.TipWidget)
];
// Add spacer at midder
HorizontalBox.Get().AddSlot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.AutoWidth()
[
SNew(SSpacer)
.Size(FVector2D(LayoutSettings.Space, 0.0f))
];
// Add Loading widget on right
HorizontalBox.Get().AddSlot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
.AutoWidth()
[
LoadingWidget
];
}
EVerticalAlignment VerticalAlignment;
// Set vertical alignment for widget
if (LayoutSettings.bIsWidgetAtBottom)
{
VerticalAlignment = EVerticalAlignment::VAlign_Bottom;
}
else
{
VerticalAlignment = EVerticalAlignment::VAlign_Top;
}
// Creating loading theme
Root->AddSlot()
.HAlign(LayoutSettings.BorderHorizontalAlignment)
.VAlign(VerticalAlignment)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.BorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.IsTitleSafe(true)
.Padding(LayoutSettings.BorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SClassicLayout::GetDPIScale)
[
HorizontalBox
]
]
]
];
// Construct loading complete text if enable
if (Settings.bShowLoadingCompleteText)
{
Root->AddSlot()
.VAlign(Settings.LoadingCompleteTextSettings.Alignment.VerticalAlignment)
.HAlign(Settings.LoadingCompleteTextSettings.Alignment.HorizontalAlignment)
.Padding(Settings.LoadingCompleteTextSettings.Padding)
[
SNew(SLoadingCompleteText, Settings.LoadingCompleteTextSettings)
];
}
// Add root to this widget
ChildSlot
[
Root
];
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SDualSidebarLayout.h"
#include "LoadingScreenSettings.h"
#include "Widgets/Layout/SSafeZone.h"
#include "Widgets/Layout/SDPIScaler.h"
#include "Widgets/Layout/SSpacer.h"
#include "SHorizontalLoadingWidget.h"
#include "SVerticalLoadingWidget.h"
#include "SBackgroundWidget.h"
#include "STipWidget.h"
#include "SLoadingCompleteText.h"
void SDualSidebarLayout::Construct(const FArguments& InArgs, const FALoadingScreenSettings& Settings, const FDualSidebarLayoutSettings& LayoutSettings)
{
// Root widget and background
TSharedRef<SOverlay> Root = SNew(SOverlay)
+ SOverlay::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
[
SNew(SBackgroundWidget, Settings.Background)
];
// Placeholder for loading widget
TSharedRef<SWidget> LoadingWidget = SNullWidget::NullWidget;
if (Settings.LoadingWidget.LoadingWidgetType == ELoadingWidgetType::LWT_Horizontal)
{
LoadingWidget = SNew(SHorizontalLoadingWidget, Settings.LoadingWidget);
}
else
{
LoadingWidget = SNew(SVerticalLoadingWidget, Settings.LoadingWidget);
}
if (LayoutSettings.bIsLoadingWidgetAtRight)
{
// Add loading widget at right
Root.Get().AddSlot()
.HAlign(HAlign_Right)
.VAlign(LayoutSettings.RightBorderVerticalAlignment)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.RightBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(HAlign_Fill)
.VAlign(LayoutSettings.RightVerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.RightBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SDualSidebarLayout::GetDPIScale)
[
LoadingWidget
]
]
]
];
// Add tip widget at left
Root.Get().AddSlot()
.HAlign(HAlign_Left)
.VAlign(LayoutSettings.LeftBorderVerticalAlignment)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.LeftBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(HAlign_Fill)
.VAlign(LayoutSettings.LeftVerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.LeftBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SDualSidebarLayout::GetDPIScale)
[
SNew(STipWidget, Settings.TipWidget)
]
]
]
];
}
else
{
// Add Tip widget at right
Root.Get().AddSlot()
.HAlign(HAlign_Right)
.VAlign(LayoutSettings.RightBorderVerticalAlignment)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.RightBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(HAlign_Fill)
.VAlign(LayoutSettings.RightVerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.RightBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SDualSidebarLayout::GetDPIScale)
[
SNew(STipWidget, Settings.TipWidget)
]
]
]
];
// Add Loading widget at left
Root.Get().AddSlot()
.HAlign(HAlign_Left)
.VAlign(LayoutSettings.LeftBorderVerticalAlignment)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.LeftBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(HAlign_Fill)
.VAlign(LayoutSettings.LeftVerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.LeftBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SDualSidebarLayout::GetDPIScale)
[
LoadingWidget
]
]
]
];
}
// Construct loading complete text if enable
if (Settings.bShowLoadingCompleteText)
{
Root->AddSlot()
.VAlign(Settings.LoadingCompleteTextSettings.Alignment.VerticalAlignment)
.HAlign(Settings.LoadingCompleteTextSettings.Alignment.HorizontalAlignment)
.Padding(Settings.LoadingCompleteTextSettings.Padding)
[
SNew(SLoadingCompleteText, Settings.LoadingCompleteTextSettings)
];
}
// Add root to this widget
ChildSlot
[
Root
];
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SHorizontalLoadingWidget.h"
#include "LoadingScreenSettings.h"
#include "Widgets/Layout/SSpacer.h"
#include "Widgets/Images/SImage.h"
#include "Slate/DeferredCleanupSlateBrush.h"
#include "Widgets/Text/STextBlock.h"
#include "Widgets/SBoxPanel.h"
void SHorizontalLoadingWidget::Construct(const FArguments& InArgs, const FLoadingWidgetSettings& Settings)
{
bPlayReverse = Settings.ImageSequenceSettings.bPlayReverse;
// Root is a Horizontal Box of course
TSharedRef<SHorizontalBox> Root = SNew(SHorizontalBox);
// Construct Loading Icon Widget
ConstructLoadingIcon(Settings);
EVisibility LoadingTextVisibility;
if (Settings.LoadingText.IsEmpty())
{
LoadingTextVisibility = EVisibility::Collapsed;
}
else
{
LoadingTextVisibility = EVisibility::SelfHitTestInvisible;
}
// If loading text is on the right
if (Settings.bLoadingTextRightPosition)
{
// Add Loading Icon on the left first
Root.Get().AddSlot()
.HAlign(Settings.LoadingIconAlignment.HorizontalAlignment)
.VAlign(Settings.LoadingIconAlignment.VerticalAlignment)
.AutoWidth()
[
LoadingIcon
];
// Add a Spacer in middle
Root.Get().AddSlot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.AutoWidth()
[
SNew(SSpacer)
.Size(FVector2D(Settings.Space, 0.0f))
];
// Add Loading Text on the right
Root.Get().AddSlot()
.HAlign(Settings.TextAlignment.HorizontalAlignment)
.VAlign(Settings.TextAlignment.VerticalAlignment)
.AutoWidth()
[
SNew(STextBlock)
.Visibility(LoadingTextVisibility)
.ColorAndOpacity(Settings.Appearance.ColorAndOpacity)
.Font(Settings.Appearance.Font)
.ShadowOffset(Settings.Appearance.ShadowOffset)
.ShadowColorAndOpacity(Settings.Appearance.ShadowColorAndOpacity)
.Justification(Settings.Appearance.Justification)
.Text(Settings.LoadingText)
];
}
// If loading text is on the left
else
{
// Add Loading Text on the left first
Root.Get().AddSlot()
.HAlign(Settings.TextAlignment.HorizontalAlignment)
.VAlign(Settings.TextAlignment.VerticalAlignment)
.AutoWidth()
[
SNew(STextBlock)
.Visibility(LoadingTextVisibility)
.ColorAndOpacity(Settings.Appearance.ColorAndOpacity)
.Font(Settings.Appearance.Font)
.ShadowOffset(Settings.Appearance.ShadowOffset)
.ShadowColorAndOpacity(Settings.Appearance.ShadowColorAndOpacity)
.Justification(Settings.Appearance.Justification)
.Text(Settings.LoadingText)
];
// Add a Spacer in middle
Root.Get().AddSlot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.AutoWidth()
[
SNew(SSpacer)
.Size(FVector2D(Settings.Space, 0.0f))
];
// Add Loading Icon on the right finally
Root.Get().AddSlot()
.HAlign(Settings.LoadingIconAlignment.HorizontalAlignment)
.VAlign(Settings.LoadingIconAlignment.VerticalAlignment)
.AutoWidth()
[
LoadingIcon
];
}
// Add root to this widget
ChildSlot
[
Root
];
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SLetterboxLayout.h"
#include "LoadingScreenSettings.h"
#include "Widgets/Layout/SSafeZone.h"
#include "Widgets/Layout/SDPIScaler.h"
#include "SHorizontalLoadingWidget.h"
#include "SVerticalLoadingWidget.h"
#include "SBackgroundWidget.h"
#include "STipWidget.h"
#include "SLoadingCompleteText.h"
void SLetterboxLayout::Construct(const FArguments& InArgs, const FALoadingScreenSettings& Settings, const FLetterboxLayoutSettings& LayoutSettings)
{
// Root widget and background
TSharedRef<SOverlay> Root = SNew(SOverlay)
+ SOverlay::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
[
SNew(SBackgroundWidget, Settings.Background)
];
// Placeholder for loading widget
TSharedRef<SWidget> LoadingWidget = SNullWidget::NullWidget;
if (Settings.LoadingWidget.LoadingWidgetType == ELoadingWidgetType::LWT_Horizontal)
{
LoadingWidget = SNew(SHorizontalLoadingWidget, Settings.LoadingWidget);
}
else
{
LoadingWidget = SNew(SVerticalLoadingWidget, Settings.LoadingWidget);
}
if (LayoutSettings.bIsLoadingWidgetAtTop)
{
// Add a border widget at top, then add Loading widget
Root->AddSlot()
.HAlign(LayoutSettings.TopBorderHorizontalAlignment)
.VAlign(VAlign_Top)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.TopBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(LayoutSettings.LoadingWidgetAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.LoadingWidgetAlignment.VerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.TopBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SLetterboxLayout::GetDPIScale)
[
LoadingWidget
]
]
]
];
// Add a border widget at bottom, then add Tip widget
Root->AddSlot()
.HAlign(LayoutSettings.BottomBorderHorizontalAlignment)
.VAlign(VAlign_Bottom)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.BottomBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(LayoutSettings.TipAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.TipAlignment.VerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.BottomBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SLetterboxLayout::GetDPIScale)
[
SNew(STipWidget, Settings.TipWidget)
]
]
]
];
}
else
{
// Add a border widget at top, then add Tip widget
Root->AddSlot()
.HAlign(LayoutSettings.TopBorderHorizontalAlignment)
.VAlign(VAlign_Top)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.TopBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(LayoutSettings.TipAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.TipAlignment.VerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.TopBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SLetterboxLayout::GetDPIScale)
[
SNew(STipWidget, Settings.TipWidget)
]
]
]
];
// Add a border widget at bottom, then add Loading widget
Root->AddSlot()
.HAlign(LayoutSettings.BottomBorderHorizontalAlignment)
.VAlign(VAlign_Bottom)
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.BorderImage(&LayoutSettings.BottomBorderBackground)
.BorderBackgroundColor(FLinearColor::White)
[
SNew(SSafeZone)
.HAlign(LayoutSettings.LoadingWidgetAlignment.HorizontalAlignment)
.VAlign(LayoutSettings.LoadingWidgetAlignment.VerticalAlignment)
.IsTitleSafe(true)
.Padding(LayoutSettings.BottomBorderPadding)
[
SNew(SDPIScaler)
.DPIScale(this, &SLetterboxLayout::GetDPIScale)
[
LoadingWidget
]
]
]
];
}
// Construct loading complete text if enable
if (Settings.bShowLoadingCompleteText)
{
Root->AddSlot()
.VAlign(Settings.LoadingCompleteTextSettings.Alignment.VerticalAlignment)
.HAlign(Settings.LoadingCompleteTextSettings.Alignment.HorizontalAlignment)
.Padding(Settings.LoadingCompleteTextSettings.Padding)
[
SNew(SLoadingCompleteText, Settings.LoadingCompleteTextSettings)
];
}
// Add Root to this widget
ChildSlot
[
Root
];
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SLoadingCompleteText.h"
#include "LoadingScreenSettings.h"
#include "MoviePlayer.h"
#include "Widgets/Text/STextBlock.h"
void SLoadingCompleteText::Construct(const FArguments& InArgs, const FLoadingCompleteTextSettings& CompleteTextSettings)
{
CompleteTextColor = CompleteTextSettings.Appearance.ColorAndOpacity.GetSpecifiedColor();
CompleteTextAnimationSpeed = CompleteTextSettings.AnimationSpeed;
ChildSlot
[
SNew(STextBlock)
.Font(CompleteTextSettings.Appearance.Font)
.ShadowOffset(CompleteTextSettings.Appearance.ShadowOffset)
.ShadowColorAndOpacity(CompleteTextSettings.Appearance.ShadowColorAndOpacity)
.Justification(CompleteTextSettings.Appearance.Justification)
.Text(CompleteTextSettings.LoadingCompleteText)
.ColorAndOpacity(this, &SLoadingCompleteText::GetLoadingCompleteTextColor)
.Visibility(this, &SLoadingCompleteText::GetLoadingCompleteTextVisibility)
];
// Register animated image sequence active timer event
if (CompleteTextSettings.bFadeInOutAnim && !bIsActiveTimerRegistered)
{
bIsActiveTimerRegistered = true;
RegisterActiveTimer(0.f, FWidgetActiveTimerDelegate::CreateSP(this, &SLoadingCompleteText::AnimateText));
}
}
EVisibility SLoadingCompleteText::GetLoadingCompleteTextVisibility() const
{
return GetMoviePlayer()->IsLoadingFinished() ? EVisibility::Visible : EVisibility::Hidden;
}
FSlateColor SLoadingCompleteText::GetLoadingCompleteTextColor() const
{
return CompleteTextColor;
}
EActiveTimerReturnType SLoadingCompleteText::AnimateText(double InCurrentTime, float InDeltaTime)
{
const float MinAlpha = 0.1f;
const float MaxAlpha = 1.0f;
float TextAlpha = CompleteTextColor.A;
if (TextAlpha >= MaxAlpha)
{
bCompleteTextReverseAnim = true;
}
else if (TextAlpha <= MinAlpha)
{
bCompleteTextReverseAnim = false;
}
if (!bCompleteTextReverseAnim)
{
TextAlpha += InDeltaTime * CompleteTextAnimationSpeed;
}
else
{
TextAlpha -= InDeltaTime * CompleteTextAnimationSpeed;
}
CompleteTextColor.A = TextAlpha;
return EActiveTimerReturnType::Continue;
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SLoadingScreenLayout.h"
#include "Engine/UserInterfaceSettings.h"
float SLoadingScreenLayout::PointSizeToSlateUnits(float PointSize)
{
const float SlateFreeTypeHorizontalResolutionDPI = 96.0f;
const float FreeTypeNativeDPI = 72.0;
const float PixelSize = PointSize * (SlateFreeTypeHorizontalResolutionDPI / FreeTypeNativeDPI);
return PixelSize;
}
float SLoadingScreenLayout::GetDPIScale() const
{
const FVector2D DrawSize = GetTickSpaceGeometry().ToPaintGeometry().GetLocalSize();
const FIntPoint Size((int32)DrawSize.X, (int32)DrawSize.Y);
return GetDefault<UUserInterfaceSettings>()->GetDPIScaleBasedOnSize(Size);
}
/************************************************************************************
* *
* Copyright (C) 2020 Truong Bui. *
* Website: https://github.com/truong-bui/AsyncLoadingScreen *
* Licensed under the MIT License. See 'LICENSE' file for full license information. *
* *
************************************************************************************/
#include "SLoadingWidget.h"
#include "Widgets/Images/SImage.h"
#include "Slate/DeferredCleanupSlateBrush.h"
#include "Widgets/Layout/SSpacer.h"
#include "Engine/Texture2D.h"
#include "MoviePlayer.h"
#include "Widgets/SCompoundWidget.h"
int32 SLoadingWidget::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const
{
TotalDeltaTime += Args.GetDeltaTime();
if (TotalDeltaTime >= Interval)
{
if (CleanupBrushList.Num() > 1)
{
if (bPlayReverse)
{
ImageIndex--;
}
else
{
ImageIndex++;
}
if (ImageIndex >= CleanupBrushList.Num())
{
ImageIndex = 0;
}
else if (ImageIndex < 0)
{
ImageIndex = CleanupBrushList.Num() - 1;
}
StaticCastSharedRef<SImage>(LoadingIcon)->SetImage(CleanupBrushList[ImageIndex].IsValid() ? CleanupBrushList[ImageIndex]->GetSlateBrush() : nullptr);
}
TotalDeltaTime = 0.0f;
}
return SCompoundWidget::OnPaint(Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
}
SThrobber::EAnimation SLoadingWidget::GetThrobberAnimation(const FThrobberSettings& ThrobberSettings) const
{
const int32 AnimationParams = (ThrobberSettings.bAnimateVertically ? SThrobber::Vertical : 0) |
(ThrobberSettings.bAnimateHorizontally ? SThrobber::Horizontal : 0) |
(ThrobberSettings.bAnimateOpacity ? SThrobber::Opacity : 0);
return static_cast<SThrobber::EAnimation>(AnimationParams);
}
void SLoadingWidget::ConstructLoadingIcon(const FLoadingWidgetSettings& Settings)
{
if (Settings.LoadingIconType == ELoadingIconType::LIT_ImageSequence)
{
// Loading Widget is image sequence
if (Settings.ImageSequenceSettings.Images.Num() > 0)
{
CleanupBrushList.Empty();
ImageIndex = 0;
FVector2D Scale = Settings.ImageSequenceSettings.Scale;
for (auto Image: Settings.ImageSequenceSettings.Images)
{
if (Image)
{
CleanupBrushList.Add(FDeferredCleanupSlateBrush::CreateBrush(Image, FVector2D(Image->GetSurfaceWidth() * Scale.X, Image->GetSurfaceHeight() * Scale.Y)));
}
}
// Create Image slate widget
LoadingIcon = SNew(SImage)
.Image(CleanupBrushList[ImageIndex]->GetSlateBrush());
// Update play animation interval
Interval = Settings.ImageSequenceSettings.Interval;
}
else
{
// If there is no image in the array then create a spacer instead
LoadingIcon = SNew(SSpacer).Size(FVector2D::ZeroVector);
}
}
else if (Settings.LoadingIconType == ELoadingIconType::LIT_CircularThrobber)
{
// Loading Widget is SCircularThrobber
LoadingIcon = SNew(SCircularThrobber)
.NumPieces(Settings.CircularThrobberSettings.NumberOfPieces)
.Period(Settings.CircularThrobberSettings.Period)
.Radius(Settings.CircularThrobberSettings.Radius)
.PieceImage(&Settings.CircularThrobberSettings.Image);
}
else
{
// Loading Widget is SThrobber
LoadingIcon = SNew(SThrobber)
.NumPieces(Settings.ThrobberSettings.NumberOfPieces)
.Animate(GetThrobberAnimation(Settings.ThrobberSettings))
.PieceImage(&Settings.ThrobberSettings.Image);
}
// Set Loading Icon render transform
LoadingIcon.Get().SetRenderTransform(FSlateRenderTransform(FScale2D(Settings.TransformScale), Settings.TransformTranslation));
LoadingIcon.Get().SetRenderTransformPivot(Settings.TransformPivot);
// Hide loading widget when level loading is done if bHideLoadingWidgetWhenCompletes is true
if (Settings.bHideLoadingWidgetWhenCompletes)
{
SetVisibility(TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateRaw(this, &SLoadingWidget::GetLoadingWidgetVisibility)));
}
}
EVisibility SLoadingWidget::GetLoadingWidgetVisibility() const
{
return GetMoviePlayer()->IsLoadingFinished() ? EVisibility::Hidden : EVisibility::Visible;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment