From ffe515e874680da015e377cc141a28e4228c8fc7 Mon Sep 17 00:00:00 2001 From: Nicolas Lebedenco Date: Sat, 26 Nov 2016 22:18:52 -0500 Subject: [PATCH 1/7] Corrected and rephrased comment about PlaybackType --- Source/LoadingScreen/Private/LoadingScreenSettings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/LoadingScreen/Private/LoadingScreenSettings.h b/Source/LoadingScreen/Private/LoadingScreenSettings.h index 252e642..e9b82db 100644 --- a/Source/LoadingScreen/Private/LoadingScreenSettings.h +++ b/Source/LoadingScreen/Private/LoadingScreenSettings.h @@ -30,7 +30,7 @@ struct LOADINGSCREEN_API FLoadingScreenDescription UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Loading) bool bWaitForManualStop; - /** Should we just play back, loop, etc. NOTE: if the playback type is MT_LoopLast, then bAutoCompleteWhenLoadingCompletes will be togged on when the last movie is hit*/ + /** Should we just play back, loop, etc. NOTE: if playback type is MT_LoadingLoop, then MoviePlayer will auto complete when in the last movie and load finishes regardless of bAutoCompleteWhenLoadingCompletes */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Loading) TEnumAsByte PlaybackType; From 0daeb432b0184ecf3acd2b873ce157552e5da952 Mon Sep 17 00:00:00 2001 From: Nicolas Lebedenco Date: Wed, 18 Jan 2017 17:47:37 -0500 Subject: [PATCH 2/7] Fix configuration to indicate the engine that a Content folder is not used. --- LoadingScreen.uplugin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LoadingScreen.uplugin b/LoadingScreen.uplugin index 5d74547..0c5d79f 100644 --- a/LoadingScreen.uplugin +++ b/LoadingScreen.uplugin @@ -9,7 +9,7 @@ "CreatedByURL": "http://nickdarnell.com", "EngineVersion" : "4.12.0", "EnabledByDefault" : false, - "CanContainContent": true, + "CanContainContent": false, "Modules" : [ From adf32c8d20e6cb179727e5b85624744f7ca85c9d Mon Sep 17 00:00:00 2001 From: Nicolas Lebedenco Date: Sun, 12 Nov 2017 23:21:57 -0500 Subject: [PATCH 3/7] Bumped to 4.18 --- LoadingScreen.uplugin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LoadingScreen.uplugin b/LoadingScreen.uplugin index 60a4395..c0a36ac 100644 --- a/LoadingScreen.uplugin +++ b/LoadingScreen.uplugin @@ -10,7 +10,7 @@ "CreatedByURL": "https://www.epicgames.com", "DocsURL": "https://github.com/ue4plugins/LoadingScreen", "SupportURL": "https://github.com/ue4plugins/LoadingScreen/issues", - "EngineVersion": "4.16.0", + "EngineVersion": "4.18.0", "EnabledByDefault": false, "CanContainContent": true, From 7f6430a71c05af65a0af13d4961ed37821509def Mon Sep 17 00:00:00 2001 From: Nicolas Lebedenco Date: Sat, 2 Dec 2017 20:00:15 -0500 Subject: [PATCH 4/7] Fixed Editor crash during a HotReload due to FObjectFinder being used inside FLoadingScreenDescription constructor. It's only allowed inside UObjects. Also modified SSimpleLoadingScreen to actually use TipFont and LoadingFont. --- Source/LoadingScreen/Private/LoadingScreenSettings.cpp | 6 +----- Source/LoadingScreen/Private/LoadingScreenSettings.h | 8 ++++---- Source/LoadingScreen/Private/SSimpleLoadingScreen.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Source/LoadingScreen/Private/LoadingScreenSettings.cpp b/Source/LoadingScreen/Private/LoadingScreenSettings.cpp index a1bef51..72a215c 100644 --- a/Source/LoadingScreen/Private/LoadingScreenSettings.cpp +++ b/Source/LoadingScreen/Private/LoadingScreenSettings.cpp @@ -15,11 +15,6 @@ FLoadingScreenDescription::FLoadingScreenDescription() , LoadingText(LOCTEXT("Loading", "LOADING")) , ImageStretch(EStretch::ScaleToFit) { - if ( !IsRunningDedicatedServer() ) - { - static ConstructorHelpers::FObjectFinder RobotoFontObj(TEXT("/Engine/EngineFonts/Roboto")); - LoadingFont = FSlateFontInfo(RobotoFontObj.Object, 32, FName("Bold")); - } } ULoadingScreenSettings::ULoadingScreenSettings(const FObjectInitializer& Initializer) @@ -31,6 +26,7 @@ ULoadingScreenSettings::ULoadingScreenSettings(const FObjectInitializer& Initial { static ConstructorHelpers::FObjectFinder RobotoFontObj(TEXT("/Engine/EngineFonts/Roboto")); TipFont = FSlateFontInfo(RobotoFontObj.Object, 20, FName("Normal")); + LoadingFont = FSlateFontInfo(RobotoFontObj.Object, 32, FName("Bold")); } } diff --git a/Source/LoadingScreen/Private/LoadingScreenSettings.h b/Source/LoadingScreen/Private/LoadingScreenSettings.h index 3ce51ec..0c83509 100644 --- a/Source/LoadingScreen/Private/LoadingScreenSettings.h +++ b/Source/LoadingScreen/Private/LoadingScreenSettings.h @@ -45,10 +45,6 @@ struct LOADINGSCREEN_API FLoadingScreenDescription UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Display) FText LoadingText; - /** */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Display) - FSlateFontInfo LoadingFont; - /** The movie paths local to the game's Content/Movies/ directory we will play. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Movies) TArray MoviePaths; @@ -84,6 +80,10 @@ class LOADINGSCREEN_API ULoadingScreenSettings : public UDeveloperSettings UPROPERTY(config, EditAnywhere, BlueprintReadWrite, Category=Advice) FSlateFontInfo TipFont; + /** The font to display on loading. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Display) + FSlateFontInfo LoadingFont; + /** The size of the tip before it's wrapped to the next line. */ UPROPERTY(config, EditAnywhere, BlueprintReadWrite, Category=Advice) float TipWrapAt; diff --git a/Source/LoadingScreen/Private/SSimpleLoadingScreen.cpp b/Source/LoadingScreen/Private/SSimpleLoadingScreen.cpp index 0f5fd38..f45905d 100644 --- a/Source/LoadingScreen/Private/SSimpleLoadingScreen.cpp +++ b/Source/LoadingScreen/Private/SSimpleLoadingScreen.cpp @@ -26,8 +26,8 @@ void SSimpleLoadingScreen::Construct(const FArguments& InArgs, const FLoadingScr const ULoadingScreenSettings* Settings = GetDefault(); - //Settings->TipFont; - //InScreenDescription.LoadingFont.GetCompositeFont()->SubTypefaces[0]->Typeface.Fonts[0].Font.BulkDataPtr->GetLinker()->GetOwnerThreadId() + const FSlateFontInfo& TipFont = Settings->TipFont; + const FSlateFontInfo& LoadingFont = Settings->LoadingFont; TSharedRef Root = SNew(SOverlay); @@ -63,7 +63,7 @@ void SSimpleLoadingScreen::Construct(const FArguments& InArgs, const FLoadingScr TipWidget = SNew(STextBlock) .WrapTextAt(Settings->TipWrapAt) - //.Font(Settings->TipFont) + .Font(TipFont) .Text(Settings->Tips[TipIndex]); } @@ -94,7 +94,7 @@ void SSimpleLoadingScreen::Construct(const FArguments& InArgs, const FLoadingScr [ SNew(SCircularThrobber) // Convert font size to pixels, pixel_size = point_size * resolution / 72, then half it to get radius - .Radius((InScreenDescription.LoadingFont.Size * 96.0f/72.0f) / 2.0f) + .Radius((LoadingFont.Size * 96.0f/72.0f) / 2.0f) ] + SHorizontalBox::Slot() @@ -104,7 +104,7 @@ void SSimpleLoadingScreen::Construct(const FArguments& InArgs, const FLoadingScr [ SNew(STextBlock) .Text(InScreenDescription.LoadingText) - //.Font(InScreenDescription.LoadingFont) + .Font(LoadingFont) ] + SHorizontalBox::Slot() From 0a4a508b126fa28f9b35a252baf3998b56b158ac Mon Sep 17 00:00:00 2001 From: Nicolas Lebedenco Date: Sun, 4 Feb 2018 12:00:51 -0500 Subject: [PATCH 5/7] Improved comments and property grouping. --- .../Private/LoadingScreenSettings.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/LoadingScreen/Private/LoadingScreenSettings.h b/Source/LoadingScreen/Private/LoadingScreenSettings.h index 0c83509..10fa16a 100644 --- a/Source/LoadingScreen/Private/LoadingScreenSettings.h +++ b/Source/LoadingScreen/Private/LoadingScreenSettings.h @@ -20,15 +20,15 @@ struct LOADINGSCREEN_API FLoadingScreenDescription /** The minimum time that a loading screen should be opened for, -1 if there is no minimum time. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Loading) float MinimumLoadingScreenDisplayTime; - - /** If true, the loading screen will disappear as soon as all movies are played and loading is done. */ + + /** If true, the loading screen will disappear as soon as loading is done. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Loading) bool bAutoCompleteWhenLoadingCompletes; - + /** If true, movies can be skipped by clicking the loading screen as long as loading is done. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Loading) bool bMoviesAreSkippable; - + /** If true, movie playback continues until Stop is called. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Loading) bool bWaitForManualStop; @@ -37,18 +37,18 @@ struct LOADINGSCREEN_API FLoadingScreenDescription UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Loading) TEnumAsByte PlaybackType; + /** The movie paths local to the game's Content/Movies/ directory without extension. */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Movies) + TArray MoviePaths; + /** Should we show the images/tips/loading text? Generally you'll want to set this to false if you just want to show a movie. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Display) bool bShowUIOverlay; - /** */ + /** Text displayed beside the animated icon */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Display) FText LoadingText; - /** The movie paths local to the game's Content/Movies/ directory we will play. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Movies) - TArray MoviePaths; - /** The texture display while in the loading screen on top of the movie. */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Images, meta=(AllowedClasses="Texture2D")) TArray Images; From 079e3ff321c50c7e7117338ebb3bb0785b631bbc Mon Sep 17 00:00:00 2001 From: Nicolas Lebedenco Date: Tue, 3 Apr 2018 12:21:39 -0400 Subject: [PATCH 6/7] Bumped to 4.19 --- LoadingScreen.uplugin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LoadingScreen.uplugin b/LoadingScreen.uplugin index c0a36ac..8d8128f 100644 --- a/LoadingScreen.uplugin +++ b/LoadingScreen.uplugin @@ -10,7 +10,7 @@ "CreatedByURL": "https://www.epicgames.com", "DocsURL": "https://github.com/ue4plugins/LoadingScreen", "SupportURL": "https://github.com/ue4plugins/LoadingScreen/issues", - "EngineVersion": "4.18.0", + "EngineVersion": "4.19.0", "EnabledByDefault": false, "CanContainContent": true, @@ -21,4 +21,4 @@ "LoadingPhase": "PreLoadingScreen" } ] -} \ No newline at end of file +} From 8d81df50debf618f2de81888a8cc8a89b392b059 Mon Sep 17 00:00:00 2001 From: Nicolas Lebedenco Date: Thu, 19 Jul 2018 03:06:47 -0400 Subject: [PATCH 7/7] Updated for 4.20 --- LoadingScreen.uplugin | 2 +- Source/LoadingScreen/LoadingScreen.Build.cs | 3 +-- Source/LoadingScreen/Private/SSimpleLoadingScreen.h | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LoadingScreen.uplugin b/LoadingScreen.uplugin index 8d8128f..fe84f09 100644 --- a/LoadingScreen.uplugin +++ b/LoadingScreen.uplugin @@ -10,7 +10,7 @@ "CreatedByURL": "https://www.epicgames.com", "DocsURL": "https://github.com/ue4plugins/LoadingScreen", "SupportURL": "https://github.com/ue4plugins/LoadingScreen/issues", - "EngineVersion": "4.19.0", + "EngineVersion": "4.20.0", "EnabledByDefault": false, "CanContainContent": true, diff --git a/Source/LoadingScreen/LoadingScreen.Build.cs b/Source/LoadingScreen/LoadingScreen.Build.cs index 6824151..f495416 100644 --- a/Source/LoadingScreen/LoadingScreen.Build.cs +++ b/Source/LoadingScreen/LoadingScreen.Build.cs @@ -21,8 +21,7 @@ public LoadingScreen(ReadOnlyTargetRules Target) "SlateCore", "InputCore", "Engine" - } - ); + }); } } } diff --git a/Source/LoadingScreen/Private/SSimpleLoadingScreen.h b/Source/LoadingScreen/Private/SSimpleLoadingScreen.h index cc81737..3ea40f2 100644 --- a/Source/LoadingScreen/Private/SSimpleLoadingScreen.h +++ b/Source/LoadingScreen/Private/SSimpleLoadingScreen.h @@ -17,9 +17,10 @@ struct FLoadingScreenBrush : public FSlateDynamicImageBrush, public FGCObject virtual void AddReferencedObjects(FReferenceCollector& Collector) override { - if ( ResourceObject ) + UObject* Object = GetResourceObject(); + if (Object) { - Collector.AddReferencedObject(ResourceObject); + Collector.AddReferencedObject(Object); } } };