Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCoding/Private/LiveCodingModule.h
ben marsh 0c9b49eff3 LiveCoding: Disable the editor compile button while a compile is in progress.
#rb none
#jira UE-71077

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 5343160 in //UE4/Release-4.22/... via CL 5343162
#ROBOMERGE-BOT: CORE (Main -> Dev-Core)

[CL 5407914 by ben marsh in Dev-Core branch]
2019-03-15 03:25:40 -04:00

53 lines
1.4 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ILiveCodingModule.h"
#include "Delegates/Delegate.h"
#include "Modules/ModuleManager.h"
struct IConsoleCommand;
class IConsoleVariable;
class FLiveCodingModule final : public ILiveCodingModule
{
public:
FLiveCodingModule();
// IModuleInterface implementation
virtual void StartupModule() override;
virtual void ShutdownModule() override;
// ILiveCodingModule implementation
virtual void Enable(bool bInEnabled) override;
virtual bool IsEnabled() const override;
virtual void ShowConsole() override;
virtual void TriggerRecompile() override;
virtual bool IsCompiling() const override;
virtual void Tick() override;
private:
bool bEnabled;
bool bShouldStart;
bool bStarted;
TSet<FString> EnabledModules;
IConsoleCommand* EnableCommand;
IConsoleVariable* ConsolePathVariable;
FDelegateHandle EndFrameDelegateHandle;
FDelegateHandle ModulesChangedDelegateHandle;
bool StartLiveCoding();
void OnEndFrame();
void OnModulesChanged(FName ModuleName, EModuleChangeReason Reason);
void UpdateModules();
void EnableModule(const FString& FullFilePath);
void DisableModule(const FString& FullFilePath);
void ConfigureModule(const FName& Name, bool bIsProjectModule, const FString& FullFilePath);
bool ShouldEnableModule(const FName& Name, bool bIsProjectModule, const FString& FilePath) const;
};