Files
UnrealEngineUWP/Engine/Source/Editor/NewLevelDialog/Public/NewLevelDialogModule.h
rex hill 32f0139bcb Add support for multiple level templates using the same map package
#preflight 62a9eb4bda0af39a4741abf6
#rb jason.stasik

#ROBOMERGE-OWNER: rex.hill
#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 20673707 via CL 20673711 via CL 20674157 via CL 20674342
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20676083 by rex hill in ue5-main branch]
2022-06-15 16:00:15 -04:00

58 lines
2.6 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"
struct FTemplateMapInfo;
/**
* New Level Dialog module
*/
class FNewLevelDialogModule : 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();
/**
* 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 bShowPartitionedTemplates - If true, we allow partitioned world templates to be shown in the dialog.
* @param bOutPartitionedWorld - (out) If true and OutTemplateName is empty, the empty map should be partitioned.
* @param OutTemplateMapInfo - (out) If not null, will be set to the template map selected by the user.
* @return true if the user selected a valid item, false if the user canceled
*/
virtual bool CreateAndShowNewLevelDialog( const TSharedPtr<const SWidget> ParentWidget, FString& OutTemplateMapPackageName, bool bShowPartitionedTemplates, bool& bOutPartitionedWorld, FTemplateMapInfo* OutTemplateMapInfo = 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 bShowPartitionedTemplates - If true, we allow partitioned world templates to be shown in the dialog.
* @param bOutPartitionedWorld - (out) If true and OutTemplateName is empty, the empty map should be partitioned.
* @param OutTemplateMapInfo - (out) If not null, will be set to the template map selected by the user.
* @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, bool bShowPartitionedTemplates, bool& bOutPartitionedWorld, FTemplateMapInfo* OutTemplateMapInfo = nullptr);
/** New Level Dialog app identifier string */
static const FName NewLevelDialogAppIdentifier;
};