Files
UnrealEngineUWP/Engine/Plugins/Runtime/Metasound/Source/MetasoundEditor/Private/SMetasoundStats.h
rob gay 01bcc9e365 Round 2: Backout of backout(s?):
- Uniform color fix-ups for MetaSound analyzers
- Move live MetaSound stats/audition settings to top left of graph
- Fix ordering of playback widget in input details panel to follow same order as page details panel

#rnx
[FYI] helen.yang, jon.huller, sondra.moyls, aaron.mcleran
#rb Brian.Chrisman
#jira UE-224143

[CL 36453576 by rob gay in 5.5 branch]
2024-09-19 17:46:22 -04:00

63 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Templates/SharedPointer.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/Images/SImage.h"
#include "Widgets/SBoxPanel.h"
// Forward Declarations
class IMetaSoundDocumentInterface;
class STextBlock;
class UMetaSoundBuilderBase;
class UMetaSoundSource;
struct FMetaSoundPageSettings;
struct FSlateColor;
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);
void SetExecVisibility(TAttribute<EVisibility> InVisibility);
void Update(const FMetaSoundPageSettings* AuditionPageSettings, const FMetaSoundPageSettings* GraphPageSettings, const FSlateColor* ActiveColor);
private:
TSharedPtr<SImage> ExecImageWidget;
TSharedPtr<STextBlock> GraphPageTextWidget;
TSharedPtr<STextBlock> AuditionPageTextWidget;
};
/** 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);
void Update(bool bIsPlaying, double InDeltaTime, const UMetaSoundSource* InSource);
private:
TSharedPtr<STextBlock> AuditionPageWidget;
TSharedPtr<STextBlock> AuditionPlatformWidget;
TSharedPtr<STextBlock> PlayTimeWidget;
TSharedPtr<STextBlock> RenderStatsCostWidget;
TSharedPtr<STextBlock> RenderStatsCPUWidget;
bool bPreviousIsPlaying = false;
double MaxCPUCoreUtilization = 0.0;
double PlayTime = 0.0;
float MaxRelativeRenderCost = 0.f;
};
} // namespace Metasound::Editor