A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
DlgSystemEditorModule.h
Go to the documentation of this file.
1// Copyright Csaba Molnar, Daniel Butum. All Rights Reserved.
2#pragma once
3
5#include "Templates/SharedPointer.h"
6#include "AssetTypeCategories.h"
7#include "IAssetTypeActions.h"
8#include "Framework/Commands/UICommandList.h"
9#include "Framework/Docking/WorkspaceItem.h"
10#include "Logging/LogMacros.h"
11
12class FSpawnTabArgs;
13class UK2Node;
14class UDlgDialogue;
17class FExtender;
18class UEdGraph;
19
20DECLARE_LOG_CATEGORY_EXTERN(LogDlgSystemEditor, Verbose, All)
21
22
23// Implementation of the DlgSystemEditor Module
24class DLGSYSTEMEDITOR_API FDlgSystemEditorModule : public IDlgSystemEditorModule
25{
27public:
29
30 //
31 // IModuleInterface interface
32 //
33
34 void StartupModule() override;
35 void ShutdownModule() override;
36
37 EAssetTypeCategories::Type GetAssetCategory() const override { return DlgSystemAssetCategoryBit; }
38
39
40 //
41 // Own functions
42 //
43
44 // Create the menu extenders
45 static TSharedRef<FExtender> CreateFileMenuExtender(
46 TSharedRef<FUICommandList> Commands,
47 const TArray<TSharedPtr<FUICommandInfo>>& AdditionalMenuEntries = {}
48 );
49 static TSharedRef<FExtender> CreateHelpMenuExtender(TSharedRef<FUICommandList> Commands);
50 static void MapActionsForFileMenuExtender(TSharedRef<FUICommandList> Commands);
51 static void MapActionsForHelpMenuExtender(TSharedRef<FUICommandList> Commands);
52
53private:
54 // Handle clicking on save all dialogues.
55 static void HandleOnSaveAllDialogues();
56
57 // Handle clicking on delete all dialogues text files.
58 static void HandleOnDeleteAllDialoguesTextFiles();
59
60 // Handle on post engine init event
61 void HandleOnPostEngineInit();
62
63 // Handle PIE events
64 void HandleOnBeginPIE(bool bIsSimulating);
65 void HandleOnPostPIEStarted(bool bIsSimulating);
66 void HandleOnEndPIEHandle(bool bIsSimulating);
68
69 // Handle Blueprint Events
70 void HandleNewCustomConditionBlueprintCreated(UBlueprint* Blueprint);
71 void HandleNewCustomTextArgumentBlueprintCreated(UBlueprint* Blueprint);
72 void HandleNewCustomEventBlueprintCreated(UBlueprint* Blueprint);
73 void HandleNewNodeDataBlueprintCreated(UBlueprint* Blueprint);
74
75 // Extend the Menus of the editor
76 void ExtendMenu();
77
78private:
79 // The submenu type of the dialog system
80 EAssetTypeCategories::Type DlgSystemAssetCategoryBit;
81
82 // All registered asset type actions. Cached here so that we can unregister them during shutdown.
83 TArray<TSharedPtr<IAssetTypeActions>> RegisteredAssetTypeActions;
84
85 // All registered custom class layouts for the details panel. Cached here so that we can unregister them during shutdown.
87
88 // All registered custom property layouts for the details panel. Cached here so that we can unregister them during shutdown.
90
91 // The factory of how the nodes look.
92 TSharedPtr<FGraphPanelNodeFactory> DialogueGraphNodeFactory;
93
94 // The factory of how the pins look.
95 TSharedPtr<FGraphPanelPinFactory> DialogueGraphPinFactory;
96
97 // Level Editor commands bound from this plugin.
98 TSharedPtr<FUICommandList> LevelMenuEditorCommands;
99
100 // The Tools Dialogue category.
101 TSharedPtr<FWorkspaceItem> ToolsDialogueCategory;
102
103 // Handlers
104 FDelegateHandle OnPostEngineInitHandle;
105 FDelegateHandle OnBeginPIEHandle;
106 FDelegateHandle OnPostPIEStartedHandle; // after BeginPlay() has been called
107 FDelegateHandle OnEndPIEHandle;
108
109 // Flags
110 bool bIsEngineInitialized = false;
111};
DECLARE_LOG_CATEGORY_EXTERN(LogVaRest, Log, All)
EAssetTypeCategories::Type DlgSystemAssetCategoryBit
TSharedPtr< FUICommandList > LevelMenuEditorCommands
TSharedPtr< FWorkspaceItem > ToolsDialogueCategory
void HandleOnAssetRegistryFilesLoaded()
FDelegateHandle OnPostEngineInitHandle
TArray< FName > RegisteredCustomClassLayouts
TArray< TSharedPtr< IAssetTypeActions > > RegisteredAssetTypeActions
FDlgSystemEditorModule Self
FDelegateHandle OnPostPIEStartedHandle
TSharedPtr< FGraphPanelPinFactory > DialogueGraphPinFactory
TSharedPtr< FGraphPanelNodeFactory > DialogueGraphNodeFactory
EAssetTypeCategories::Type GetAssetCategory() const override
TArray< FName > RegisteredCustomPropertyTypeLayout
UCLASS(BlueprintType, Meta = (DisplayThumbnail = "true"))
Definition DlgDialogue.h:85