You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
87 lines
3.2 KiB
C++
87 lines
3.2 KiB
C++
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "ModuleInterface.h"
|
|
|
|
/**
|
|
* Game Project Generation module
|
|
*/
|
|
class FGameProjectGenerationModule : public IModuleInterface
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
* Called right after the plugin DLL has been loaded and the plugin object has been created
|
|
*/
|
|
virtual void StartupModule();
|
|
|
|
/**
|
|
* Called before the plugin is unloaded, right before the plugin object is destroyed.
|
|
*/
|
|
virtual void ShutdownModule();
|
|
|
|
/**
|
|
* Singleton-like access to this module's interface. This is just for convenience!
|
|
* Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.
|
|
*
|
|
* @return Returns singleton instance, loading the module on demand if needed
|
|
*/
|
|
static inline FGameProjectGenerationModule& Get()
|
|
{
|
|
return FModuleManager::LoadModuleChecked< FGameProjectGenerationModule >( "GameProjectGeneration" );
|
|
}
|
|
|
|
/** Creates the game project dialog */
|
|
virtual TSharedRef<class SWidget> CreateGameProjectDialog(bool bAllowProjectOpening, bool bAllowProjectCreate);
|
|
|
|
/** Creates a new class dialog for creating classes based on the passed-in class. */
|
|
virtual TSharedRef<class SWidget> CreateNewClassDialog(class UClass* InClass);
|
|
|
|
/** Opens a dialog to adds code files to the current project. */
|
|
virtual void OpenAddCodeToProjectDialog();
|
|
|
|
/** Delegate for when the AddCodeToProject dialog is opened */
|
|
DECLARE_EVENT(FGameProjectGenerationModule, FAddCodeToProjectDialogOpenedEvent);
|
|
FAddCodeToProjectDialogOpenedEvent& OnAddCodeToProjectDialogOpened() { return AddCodeToProjectDialogOpenedEvent; }
|
|
|
|
/** Tries to make the project file writable. Prompts to check out as necessary. */
|
|
virtual void TryMakeProjectFileWriteable(const FString& ProjectFile);
|
|
|
|
/** Prompts the user to update his project file, if necessary. */
|
|
virtual void CheckForOutOfDateGameProjectFile();
|
|
|
|
/** Updates the currently loaded project. Returns true if the project was updated successfully or if no update was needed */
|
|
virtual bool UpdateGameProject(const FString& ProjectFile, const FString& EngineIdentifier, FText& OutFailReason);
|
|
|
|
/** Updates the current code project */
|
|
virtual bool UpdateCodeProject(FText& OutFailReason);
|
|
|
|
/** Gets the current projects source file count */
|
|
virtual int32 GetProjectCodeFileCount();
|
|
|
|
/** Update code resource files */
|
|
virtual bool UpdateCodeResourceFiles(TArray<FString>& OutCreatedFiles, FText& OutFailReason);
|
|
|
|
/** Warn the user if the project filename is invalid in case they renamed it outside the editor */
|
|
virtual void CheckAndWarnProjectFilenameValid();
|
|
|
|
/**
|
|
* Update the list of supported target platforms based upon the parameters provided
|
|
* This will take care of checking out and saving the updated .uproject file automatically
|
|
*
|
|
* @param InPlatformName Name of the platform to target (eg, WindowsNoEditor)
|
|
* @param bIsSupported true if the platform should be supported by this project, false if it should not
|
|
*/
|
|
virtual void UpdateSupportedTargetPlatforms(const FName& InPlatformName, const bool bIsSupported);
|
|
|
|
/** Clear the list of supported target platforms */
|
|
virtual void ClearSupportedTargetPlatforms();
|
|
|
|
private:
|
|
FAddCodeToProjectDialogOpenedEvent AddCodeToProjectDialogOpenedEvent;
|
|
|
|
};
|