Files
UnrealEngineUWP/Engine/Source/Editor/NewLevelDialog/Public/NewLevelDialogModule.h
JeanFrancois Dube b2705c0338 Add support for creating a new world using external actors and world partition in the editor.
#rb patrick.enfedaque

[CL 14546842 by JeanFrancois Dube in ue5-main branch]
2020-10-22 13:13:20 -04:00

63 lines
2.3 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Widgets/SWidget.h"
#include "Modules/ModuleInterface.h"
#include "Editor/UnrealEdEngine.h"
/**
* New Level Dialog module
*/
class FNewLevelDialogModule : public IModuleInterface
{
public:
struct FNewLevelOptions
{
bool bExternalActors;
bool bPartitionedWorld;
FNewLevelOptions()
: bExternalActors(false)
, bPartitionedWorld(false)
{}
};
/**
* 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();
/**
* Creates and show a window with an SNewLevelDialog
*
* @param ParentWidget - The parent widget for the modal window showing the dialog
* @param OutTemplateName - (out) The package name of the template map selected by the user. Empty if blank map selected.
* @param InOutNewLevelOptions - (in/out) The new level options: input is the options we can support, out is the selected options.
* @return true if the user selected a valid item, false if the user canceled
*/
virtual bool CreateAndShowNewLevelDialog( const TSharedPtr<const SWidget> ParentWidget, FString& OutTemplateMapPackageName, FNewLevelOptions* InOutNewLevelOptions = nullptr );
/**
* Creates and show a window with an SNewLevelDialog
*
* @param ParentWidget - The parent widget for the modal window showing the dialog
* @param Title - The dialog's title
* @param Templates - The list of template to be shown in the dialog
* @param OutTemplateName - (out) The package name of the template map selected by the user. Empty if blank map selected.
* @param InOutNewLevelOptions - (in/out) The new level options: input is the options we can support, out is the selected options.
* @return true if the user selected a valid item, false if the user canceled
*/
virtual bool CreateAndShowTemplateDialog(const TSharedPtr<const SWidget> ParentWidget, const FText& Title, const TArray<FTemplateMapInfo>& Templates, FString& OutTemplateMapPackageName, FNewLevelOptions* InOutNewLevelOptions = nullptr );
/** New Level Dialog app identifier string */
static const FName NewLevelDialogAppIdentifier;
};