-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from zenustech/engine/zenoembed
merge Engine/zenoembed
- Loading branch information
Showing
8 changed files
with
118 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Source/ZenoEditor/Private/UI/Menu/ZenoEditorMenuExtender.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
Source/ZenoEditor/Private/UI/Menu/ZenoEmbedGraphEditorExtenderService.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include "UI/Menu/ZenoEmbedGraphEditorExtenderService.h" | ||
|
||
#include "LevelEditor.h" | ||
#include "ZenoEditorCommand.h" | ||
|
||
#define LOCTEXT_NAMESPACE "FZenoEmbedGraphEditorExtenderService" | ||
|
||
FZenoEmbedGraphEditorExtenderService::FZenoEmbedGraphEditorExtenderService() | ||
: FZenoEditorExtenderServiceBase() | ||
{ | ||
} | ||
|
||
void FZenoEmbedGraphEditorExtenderService::Register() | ||
{ | ||
FZenoEditorExtenderServiceBase::Register(); | ||
MenuBarExtender->AddMenuBarExtension("Help", EExtensionHook::After, CommandList, FMenuBarExtensionDelegate::CreateRaw(this, &FZenoEmbedGraphEditorExtenderService::ExtendTopMenuBar)); | ||
} | ||
|
||
void FZenoEmbedGraphEditorExtenderService::Unregister() | ||
{ | ||
FZenoEditorExtenderServiceBase::Unregister(); | ||
} | ||
|
||
FZenoEmbedGraphEditorExtenderService& FZenoEmbedGraphEditorExtenderService::Get() | ||
{ | ||
static FZenoEmbedGraphEditorExtenderService Service; | ||
return Service; | ||
} | ||
|
||
void FZenoEmbedGraphEditorExtenderService::ExtendTopMenuBar(FMenuBarBuilder& Builder) | ||
{ | ||
Builder.AddPullDownMenu(LOCTEXT("Zeno", "Zeno"), LOCTEXT("ZenoTooltip", "Zeno Tools"), FNewMenuDelegate::CreateRaw(this, &FZenoEmbedGraphEditorExtenderService::ExtendEmbedPullDownMenu), ZenoHookLabel, ZenoHookLabel); | ||
} | ||
|
||
void FZenoEmbedGraphEditorExtenderService::ExtendEmbedPullDownMenu(FMenuBuilder& Builder) | ||
{ | ||
Builder.AddMenuEntry(FZenoEditorCommand::Get().Debug); | ||
} | ||
|
||
void FZenoEmbedGraphEditorExtenderService::MapAction() | ||
{ | ||
CommandList->MapAction(FZenoEditorCommand::Get().Debug, FExecuteAction::CreateRaw(this, &FZenoEmbedGraphEditorExtenderService::Debug)); | ||
} | ||
|
||
void FZenoEmbedGraphEditorExtenderService::Debug() | ||
{ | ||
UE_LOG(LogTemp, Error, TEXT("123")); | ||
} | ||
|
||
#undef LOCTEXT_NAMESPACE | ||
|
||
REGISTER_EDITOR_EXTENDER_SERVICE("Embed", FZenoEmbedGraphEditorExtenderService); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
Source/ZenoEditor/Public/UI/Menu/ZenoEmbedGraphEditorExtenderService.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#pragma once | ||
#include "ZenoEditorMenuExtender.h" | ||
|
||
class FZenoEmbedGraphEditorExtenderService final : public FZenoEditorExtenderServiceBase | ||
{ | ||
public: | ||
FZenoEmbedGraphEditorExtenderService(); | ||
|
||
virtual void Register() override; | ||
virtual void Unregister() override; | ||
|
||
static FZenoEmbedGraphEditorExtenderService& Get(); | ||
|
||
private: | ||
void ExtendTopMenuBar(FMenuBarBuilder& Builder); | ||
void ExtendEmbedPullDownMenu(FMenuBuilder& Builder); | ||
|
||
protected: | ||
virtual void MapAction() override; | ||
|
||
// Actions | ||
void Debug(); | ||
}; |