aboutsummaryrefslogtreecommitdiff
path: root/Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPackager.h
diff options
context:
space:
mode:
authorivey <[email protected]>2020-06-15 15:54:16 -0400
committerivey <[email protected]>2020-06-15 15:54:16 -0400
commitd5310c3455f9849243b7b950deb4e910aa1f24dd (patch)
tree994a81eec10538d2a1efd9ed78469a249ff086f2 /Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPackager.h
parentUpdated image paths. (diff)
downloadugcexample-d5310c3455f9849243b7b950deb4e910aa1f24dd.tar.xz
ugcexample-d5310c3455f9849243b7b950deb4e910aa1f24dd.zip
Initial commit of the UGCExample Project
Diffstat (limited to 'Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPackager.h')
-rw-r--r--Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPackager.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPackager.h b/Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPackager.h
new file mode 100644
index 0000000..f287732
--- /dev/null
+++ b/Plugins/SimpleUGC/Source/SimpleUGCEditor/Public/SimpleUGCPackager.h
@@ -0,0 +1,49 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#pragma once
+
+#include "CoreMinimal.h"
+
+struct FSimpleUGCCommand
+{
+ TSharedPtr<class IPlugin> PluginInfo;
+ TSharedPtr<class FUICommandInfo> CommandInfo;
+};
+
+class FSimpleUGCPackager : public TSharedFromThis<FSimpleUGCPackager>
+{
+public:
+ FSimpleUGCPackager();
+ ~FSimpleUGCPackager();
+
+ void OpenPluginPackager(TSharedRef<class IPlugin> Plugin);
+
+ void PackagePlugin(TSharedRef<class IPlugin> Plugin, const FString& OutputDirectory);
+
+ /** Generates submenu content for the plugin packager command */
+ void GeneratePackagerMenuContent(class FMenuBuilder& MenuBuilder);
+
+ /** Generates the menu content for the plugin packager toolbar button */
+ TSharedRef<class SWidget> GeneratePackagerComboButtonContent();
+
+private:
+ /** Gets all available game mod plugin packages */
+ void FindAvailableGameMods(TArray<TSharedRef<class IPlugin>>& OutAvailableGameMods);
+
+ /** Gets all available game mod plugins and registers command info for them */
+ void GetAvailableUGCCommands(const TArray<TSharedRef<class IPlugin>>& AvailableUGC);
+
+ /** Generates menu content for the supplied set of commands */
+ void GeneratePackagerMenuContent_Internal(class FMenuBuilder& MenuBuilder, const TArray<TSharedPtr<FUICommandInfo>>& Commands);
+
+ /**
+ * Checks if a plugin has any unsaved content
+ *
+ * @param Plugin The plugin to check for unsaved content
+ * @return True if all mod content has been saved, false otherwise
+ */
+ bool IsAllContentSaved(TSharedRef<class IPlugin> Plugin);
+
+private:
+ TArray<TSharedPtr<class FUICommandInfo>> UGCCommands;
+};