Files
UnrealEngineUWP/Engine/Source/Editor/GameProjectGeneration/Public/GameProjectGenerationModule.h
Jamie Dale 0cfe5f0651 Added PlatformInfo to DesktopPlatform and improved the editors Supported Platform UI
TTP# 337136 - SETTINGS: Target Platform settings polish
TTP# 337652 - EDITOR: Limit Project supported Android icons down to 1
TTP# 337650 - EDITOR: There is only 1 icon for Apple for Project Supported Platforms

DesktopPlatform now contains a static array of FPlatformInfo. This can be used to query UE4 about its available platforms, even when they're not available as a target platform.

FPlatformInfo contains the information required by the editor (such as a localized display name and icon), as well as whether a platform is a variation ("flavor") of another, and if so, whether the flavor affects the build output (eg, Win32 or Win64), or the cook output (eg, Android_XYZ). This lets the editor build up nested menus for the "Package Project" and "Cook Project" options, rather than just showing everything as a flat list.

ReviewedBy Thomas.Sarkanen, Max.Preussner

[CL 2095796 by Jamie Dale in Main branch]
2014-06-05 12:13:44 -04:00

84 lines
3.0 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; }
/** 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& EngineIdentifier);
/** 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;
};