RuntimeMeshComponentEditorPlugin.cpp
Go to the documentation of this file.
1 // Copyright 2016-2018 Chris Conway (Koderz). All Rights Reserved.
2 
4 #include "PropertyEditorModule.h"
5 #include "RuntimeMeshComponent.h"
9 
10 #include "ModuleManager.h"
11 #include "LevelEditor.h"
12 
13 class FToolBarBuilder;
14 class FMenuBuilder;
15 
16 #define LOCTEXT_NAMESPACE "FRuntimeMeshComponentEditorModule"
17 
19 {
20 public:
22  virtual void StartupModule() override;
23  virtual void ShutdownModule() override;
24 
26  void DonateActionClicked();
27  void HelpActionClicked();
28  void ForumsActionClicked();
29  void IssuesActionClicked();
30  void DiscordActionClicked();
32 
33 private:
34 
35  void AddMenuBarExtension(FMenuBarBuilder& Builder);
36  void AddMenuExtension(FMenuBuilder& Builder);
37 
38 private:
39  TSharedPtr<class FUICommandList> PluginCommands;
40 };
41 
42 IMPLEMENT_MODULE(FRuntimeMeshComponentEditorPlugin, RuntimeMeshComponentEditor)
43 
44 
45 
47 {
48  {
49  FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
50  PropertyModule.RegisterCustomClassLayout(URuntimeMeshComponent::StaticClass()->GetFName(), FOnGetDetailCustomizationInstance::CreateStatic(&FRuntimeMeshComponentDetails::MakeInstance));
51  }
52 
55 
56  FRuntimeMeshComponentEditorCommands::Register();
57 
58  PluginCommands = MakeShareable(new FUICommandList);
59 
60  PluginCommands->MapAction(
62  FExecuteAction::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::DonateActionClicked),
63  FCanExecuteAction());
64  PluginCommands->MapAction(
66  FExecuteAction::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::HelpActionClicked),
67  FCanExecuteAction());
68  PluginCommands->MapAction(
70  FExecuteAction::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::ForumsActionClicked),
71  FCanExecuteAction());
72  PluginCommands->MapAction(
74  FExecuteAction::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::IssuesActionClicked),
75  FCanExecuteAction());
76  PluginCommands->MapAction(
78  FExecuteAction::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::DiscordActionClicked),
79  FCanExecuteAction());
80  PluginCommands->MapAction(
81  FRuntimeMeshComponentEditorCommands::Get().MarketplaceAction,
82  FExecuteAction::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::MarketplaceActionClicked),
83  FCanExecuteAction());
84 
85  FLevelEditorModule& LevelEditorModule = FModuleManager::LoadModuleChecked<FLevelEditorModule>("LevelEditor");
86 
87  {
88  TSharedPtr<FExtender> MenuExtender = MakeShareable(new FExtender());
89  MenuExtender->AddMenuBarExtension("Window", EExtensionHook::After, PluginCommands, FMenuBarExtensionDelegate::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::AddMenuBarExtension));
90  LevelEditorModule.GetMenuExtensibilityManager()->AddExtender(MenuExtender);
91  }
92 }
93 
95 {
97 
98  FRuntimeMeshComponentEditorCommands::Unregister();
99 }
100 
102 {
103  FPlatformProcess::LaunchURL(TEXT("https://github.com/Koderz/RuntimeMeshComponent/wiki/Support-the-development!"), NULL, NULL);
104 
105 }
106 
108 {
109  FPlatformProcess::LaunchURL(TEXT("https://github.com/Koderz/UE4RuntimeMeshComponent/wiki"), NULL, NULL);
110 }
111 
113 {
114  FPlatformProcess::LaunchURL(TEXT("https://github.com/Koderz/UE4RuntimeMeshComponent/wiki"), NULL, NULL);
115 
116 }
117 
119 {
120  FPlatformProcess::LaunchURL(TEXT("https://github.com/Koderz/UE4RuntimeMeshComponent/issues"), NULL, NULL);
121 
122 }
123 
125 {
126 
127  FPlatformProcess::LaunchURL(TEXT("https://discord.gg/KGvBBTv"), NULL, NULL);
128 }
129 
131 {
132  FPlatformProcess::LaunchURL(TEXT("https://unrealengine.com/Marketplace/RuntimeMeshComponent"), NULL, NULL);
133 
134 }
135 
137 {
138  Builder.AddPullDownMenu(
139  LOCTEXT("RuntimeMeshComponentMenu", "Runtime Mesh Component"),
140  LOCTEXT("RuntimeMeshComponentMenu_ToolTip", "Open Runtime Mesh Component Help and Documentation"),
141  FNewMenuDelegate::CreateRaw(this, &FRuntimeMeshComponentEditorPlugin::AddMenuExtension),
142  "Runtime Mesh Component");
143 }
144 
146 {
147  Builder.BeginSection("Help", LOCTEXT("RuntimeMeshComponentMenu_Help", "Help"));
148  Builder.AddMenuEntry(FRuntimeMeshComponentEditorCommands::Get().MarketplaceAction);
149  Builder.AddMenuEntry(FRuntimeMeshComponentEditorCommands::Get().ForumsAction);
150  Builder.AddMenuEntry(FRuntimeMeshComponentEditorCommands::Get().HelpAction);
151  Builder.AddMenuEntry(FRuntimeMeshComponentEditorCommands::Get().IssuesAction);
152  Builder.AddMenuEntry(FRuntimeMeshComponentEditorCommands::Get().DiscordAction);
153  Builder.EndSection();
154 
155  Builder.BeginSection("Support", LOCTEXT("RuntimeMeshComponentMenu_Support", "Support"));
156  Builder.AddMenuEntry(FRuntimeMeshComponentEditorCommands::Get().DonateAction);
157  Builder.EndSection();
158 }
159 
160 
161 #undef LOCTEXT_NAMESPACE
static TSharedRef< IDetailCustomization > MakeInstance()
typedef void(APIENTRY *GLDEBUGPROC)(GLenum source
TSharedPtr< class FUICommandList > PluginCommands
UTexture2D * Get(TUniquePtr< T > &Dtex)
#define NULL
Definition: tinycthread.c:47


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:41