Files
UnrealEngineUWP/Engine/Source/Developer/SharedSettingsWidgets/Public/SPlatformSetupMessage.h
ryan durand 471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00

66 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Misc/Attribute.h"
#include "Input/Reply.h"
#include "Styling/SlateColor.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SWidget.h"
#include "Widgets/SCompoundWidget.h"
/////////////////////////////////////////////////////
// SPlatformSetupMessage
// This widget displays a setup message indicating if the game project is configured for a platform or not
class SHAREDSETTINGSWIDGETS_API SPlatformSetupMessage : public SCompoundWidget
{
enum ESetupState
{
MissingFiles,
NeedsCheckout,
ReadOnlyFiles,
ReadyToModify
};
SLATE_BEGIN_ARGS(SPlatformSetupMessage)
{}
// Name of the platform
SLATE_ARGUMENT(FText, PlatformName)
// Called when the Setup button is clicked
SLATE_EVENT(FSimpleDelegate, OnSetupClicked)
SLATE_END_ARGS()
public:
void Construct(const FArguments& InArgs, const FString& InTargetFilename);
TAttribute<bool> GetReadyToGoAttribute() const;
// SWidget interface
virtual void Tick( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime ) override;
// End of Swidget interface
private:
int32 GetSetupStateAsInt() const;
bool IsReadyToGo() const;
FSlateColor GetBorderColor() const;
TSharedRef<SWidget> MakeRow(FName IconName, FText Message, FText ButtonMessage);
FReply OnButtonPressed();
// Returns the setup state of a specified file
ESetupState GetSetupStateBasedOnFile(bool bForceUpdate) const;
// Updates the cache CachedSetupState
void UpdateCache(bool bForceUpdate);
private:
FString TargetFilename;
ESetupState CachedSetupState;
FSimpleDelegate OnSetupClicked;
};