2014-03-14 14:13:41 -04:00
|
|
|
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2014-06-30 10:25:10 -04:00
|
|
|
#include "VisualLog.h"
|
|
|
|
|
|
2014-06-26 06:25:26 -04:00
|
|
|
#if ENABLE_VISUAL_LOG
|
|
|
|
|
|
2014-06-30 08:44:41 -04:00
|
|
|
class FVisualLog;
|
2014-06-30 06:39:08 -04:00
|
|
|
struct FActorsVisLog;
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
/** Actual implementation of LogVisualizer, private inside module */
|
|
|
|
|
class FLogVisualizer : public ILogVisualizer
|
|
|
|
|
{
|
|
|
|
|
public:
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void SummonUI(UWorld* InWorld) override;
|
|
|
|
|
virtual void CloseUI(UWorld* InWorld) override;
|
2014-06-26 17:26:58 -04:00
|
|
|
virtual bool IsOpenUI(UWorld* InWorld) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
virtual bool IsRecording();
|
|
|
|
|
// End ILogVisualizer interface
|
|
|
|
|
|
|
|
|
|
/** Change the current recording state */
|
|
|
|
|
void SetIsRecording(bool bNewRecording);
|
|
|
|
|
|
|
|
|
|
FLogVisualizer()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~FLogVisualizer()
|
|
|
|
|
{
|
|
|
|
|
CleanUp();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DECLARE_EVENT( FLogVisualizer, FVisLogsChangedEvent );
|
|
|
|
|
FVisLogsChangedEvent& OnLogAdded() { return LogAddedEvent; }
|
|
|
|
|
|
|
|
|
|
void CleanUp();
|
|
|
|
|
|
2014-08-06 16:12:41 -04:00
|
|
|
void PullDataFromVisualLog(const FVisualLog& VisualLog);
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
int32 GetLogIndexForActor(const class AActor* Actor);
|
|
|
|
|
|
|
|
|
|
void AddLoadedLog(TSharedPtr<FActorsVisLog> Log);
|
|
|
|
|
|
|
|
|
|
UWorld* GetWorld() { return World.Get(); }
|
|
|
|
|
|
2014-08-14 09:13:50 -04:00
|
|
|
virtual class AActor* GetHelperActor(class UWorld* InWorld);
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
protected:
|
|
|
|
|
void OnNewLog(const class AActor* Actor, TSharedPtr<FActorsVisLog> Log);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
/** All hosted logs */
|
|
|
|
|
TArray<TSharedPtr<FActorsVisLog> > Logs;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/** Event called when a new log is created */
|
|
|
|
|
FVisLogsChangedEvent LogAddedEvent;
|
|
|
|
|
TWeakObjectPtr<UWorld> World;
|
|
|
|
|
TWeakPtr<SWindow> LogWindow;
|
2014-08-14 09:13:50 -04:00
|
|
|
TWeakObjectPtr<class ALogVisualizerDebugActor> DebugActor;
|
2014-06-26 06:25:26 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif //ENABLE_VISUAL_LOG
|