Files
UnrealEngineUWP/Engine/Source/Developer/SharedSettingsWidgets/Public/SPlatformSetupMessage.h
Jaroslaw Palczynski ebce413232 UE4 Refactoring. Changed OVERRIDE and FINAL macros to keywords override and final.
[CL 2104397 by Jaroslaw Palczynski in Main branch]
2014-06-13 06:14:46 -04:00

58 lines
1.4 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
/////////////////////////////////////////////////////
// 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;
};