From d5310c3455f9849243b7b950deb4e910aa1f24dd Mon Sep 17 00:00:00 2001 From: ivey Date: Mon, 15 Jun 2020 15:54:16 -0400 Subject: Initial commit of the UGCExample Project --- .../Public/SimpleUGCPluginWizardDefinition.h | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPluginWizardDefinition.h (limited to 'Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPluginWizardDefinition.h') diff --git a/Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPluginWizardDefinition.h b/Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPluginWizardDefinition.h new file mode 100644 index 0000000..9543a27 --- /dev/null +++ b/Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPluginWizardDefinition.h @@ -0,0 +1,70 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +// Depends on code from the plugin browser to work correctly +#include "../../../../Plugins/Editor/PluginBrowser/Source/PluginBrowser/Public/IPluginWizardDefinition.h" + +class FSimpleUGCPluginWizardDefinition : public IPluginWizardDefinition +{ +public: + FSimpleUGCPluginWizardDefinition(); + + // 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; +}; \ No newline at end of file -- cgit v1.2.3