2024-08-13 15:48:07 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Templates/SharedPointer.h"
|
|
|
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
2024-08-30 12:53:13 -04:00
|
|
|
#include "Widgets/Images/SImage.h"
|
2024-08-13 15:48:07 -04:00
|
|
|
#include "Widgets/SBoxPanel.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Forward Declarations
|
|
|
|
|
class IMetaSoundDocumentInterface;
|
|
|
|
|
class STextBlock;
|
|
|
|
|
class UMetaSoundBuilderBase;
|
|
|
|
|
class UMetaSoundSource;
|
|
|
|
|
|
|
|
|
|
struct FMetaSoundPageSettings;
|
2024-08-30 12:53:13 -04:00
|
|
|
struct FSlateColor;
|
2024-08-13 15:48:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Metasound::Editor
|
|
|
|
|
{
|
|
|
|
|
/** Widget for displaying page stats of a previewing MetaSound. */
|
|
|
|
|
class SPageStats : public SVerticalBox
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SLATE_BEGIN_ARGS(SPageStats) { };
|
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
|
|
|
|
|
void Construct(const FArguments& InArgs);
|
2024-08-30 12:53:13 -04:00
|
|
|
void SetExecVisibility(TAttribute<EVisibility> InVisibility);
|
2024-09-19 17:46:22 -04:00
|
|
|
void Update(const FMetaSoundPageSettings* AuditionPageSettings, const FMetaSoundPageSettings* GraphPageSettings, const FSlateColor* ActiveColor);
|
2024-08-13 15:48:07 -04:00
|
|
|
|
|
|
|
|
private:
|
2024-08-30 12:53:13 -04:00
|
|
|
TSharedPtr<SImage> ExecImageWidget;
|
2024-09-19 17:46:22 -04:00
|
|
|
TSharedPtr<STextBlock> GraphPageTextWidget;
|
|
|
|
|
TSharedPtr<STextBlock> AuditionPageTextWidget;
|
2024-08-13 15:48:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Widget for displaying render stats of a previewing MetaSound. */
|
|
|
|
|
class SRenderStats : public SVerticalBox
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SLATE_BEGIN_ARGS( SRenderStats) { };
|
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
|
|
|
|
|
void Construct(const FArguments& InArgs);
|
2024-09-19 17:46:22 -04:00
|
|
|
void Update(bool bIsPlaying, double InDeltaTime, const UMetaSoundSource* InSource);
|
2024-08-13 15:48:07 -04:00
|
|
|
|
|
|
|
|
private:
|
2024-09-19 17:46:22 -04:00
|
|
|
TSharedPtr<STextBlock> AuditionPageWidget;
|
|
|
|
|
TSharedPtr<STextBlock> AuditionPlatformWidget;
|
|
|
|
|
TSharedPtr<STextBlock> PlayTimeWidget;
|
2024-08-13 15:48:07 -04:00
|
|
|
TSharedPtr<STextBlock> RenderStatsCostWidget;
|
|
|
|
|
TSharedPtr<STextBlock> RenderStatsCPUWidget;
|
|
|
|
|
|
|
|
|
|
bool bPreviousIsPlaying = false;
|
2024-09-19 17:46:22 -04:00
|
|
|
double MaxCPUCoreUtilization = 0.0;
|
|
|
|
|
double PlayTime = 0.0;
|
2024-08-13 15:48:07 -04:00
|
|
|
float MaxRelativeRenderCost = 0.f;
|
|
|
|
|
};
|
|
|
|
|
} // namespace Metasound::Editor
|