// Copyright Epic Games, Inc. All Rights Reserved. #pragma once // Depends on code from the plugin browser to work correctly #include "IPluginWizardDefinition.h" class FModPluginWizardDefinition : public IPluginWizardDefinition { public: FModPluginWizardDefinition(); // Begin IPluginWizardDefinition interface virtual const TArray>& GetTemplatesSource() const override; virtual void OnTemplateSelectionChanged(TArray> InSelectedItems, ESelectInfo::Type SelectInfo) override; virtual TArray> GetSelectedTemplates() const override; virtual void ClearTemplateSelection() override; virtual bool HasValidTemplateSelection() const override; virtual ESelectionMode::Type GetSelectionMode() const override { return ESelectionMode::Multi; } virtual bool AllowsEnginePlugins() const override { return false; } virtual bool CanShowOnStartup() const override { return true; } virtual bool CanContainContent() const override; virtual bool HasModules() const override; virtual bool IsMod() const override; virtual void OnShowOnStartupCheckboxChanged(ECheckBoxState CheckBoxState) override; virtual ECheckBoxState GetShowOnStartupCheckBoxState() const override; virtual TSharedPtr GetCustomHeaderWidget() override; virtual FText GetInstructions() const override; virtual bool GetPluginIconPath(FString& OutIconPath) const override; virtual EHostType::Type GetPluginModuleDescriptor() const override; virtual ELoadingPhase::Type GetPluginLoadingPhase() const override; virtual bool GetTemplateIconPath(TSharedRef InTemplate, FString& OutIconPath) const override; virtual FString GetPluginFolderPath() const override; virtual TArray GetFoldersForSelection() const override; virtual void PluginCreated(const FString& PluginName, bool bWasSuccessful) const override; // End IPluginWizardDefinition interface private: /** The available templates for the mod. They should function as mixins to the backing template */ TArray> TemplateDefinitions; /** The content that will be used when creating the mod */ TArray> SelectedTemplates; /** The base directory of this plugin. Used for accessing the templates used to create mods */ FString PluginBaseDir; /** * The path to the template that ultimately serves as the template that the mod will be based on. It's not intended to be * selected directly, but rather other templates will act as mixins to define what content will exist in the plugin. */ FString BackingTemplatePath; /** The backing template definition for the mod. This should never be directly selectable */ TSharedPtr BackingTemplate; /** The base code template definition. Can be directly selectable to create an "empty" code mod, but should be included with any code mod selection */ TSharedPtr BaseCodeTemplate; /** Maps a specific template to a specific icon file */ TMap TemplateToIconMap; /** Brush used for drawing the custom header widget */ TSharedPtr IconBrush; /** Custom header widget */ TSharedPtr CustomHeaderWidget; };