Files
UnrealEngineUWP/Engine/Source/Runtime/PreLoadScreen/Public/SimplePreLoadScreenWidget.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

50 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Framework/Application/SlateApplication.h"
#include "Rendering/SlateRenderer.h"
#include "RenderingThread.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SWidget.h"
#include "Widgets/SCompoundWidget.h"
#include "Widgets/Layout/SDPIScaler.h"
//Widget that displays a very simple version of a FPreLoadScreen UI that just includes a background and localized text together.
//Rotates through the PreLoadScreens in the same order they are in the FPreLoadSettingsContainerBase. Uses the TimeToDisplayEachBackground variable to determine how long
//to display each screen before rotating. Loops back when finished.
class SSimplePreLoadScreenWidget : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SSimplePreLoadScreenWidget) {}
SLATE_END_ARGS()
void Construct(const FArguments& InArgs);
//Handles updating the background every X seconds
virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override;
private:
//Loops to the next background image
virtual void UpdateBackgroundImage();
//Not used in the default simple implementation
virtual float GetDPIScale() const { return 1.0f; };
const FSlateBrush* GetCurrentBackgroundImage() const;
FText GetCurrentScreenText() const;
FSlateFontInfo GetTextFont() const;
FSlateFontInfo GetFontInfo(const FString& FontName, float FontSize) const;
int CurrentPreLoadScreenIndex;
float TimeToDisplayEachBackground;
float TimeSinceLastBackgroundUpdate;
static FCriticalSection BackgroundImageCrit;
static int CurrentBackgroundImage;
};