UE4笔记--创建右键菜单
FVRSMainFrameCommands 部分可以查看UE源码中的FMainFrameCommands代码
FReply SVRSTutorialButton::OnMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent)
{
if (MouseEvent.GetEffectingButton() == EKeys::RightMouseButton)
{
const bool bInShouldCloseWindowAfterMenuSelection = true;
FMenuBuilder MenuBuilder(bInShouldCloseWindowAfterMenuSelection, FVRSMainFrameCommands::ActionList);
MenuBuilder.AddMenuEntry(FVRSMainFrameCommands::Get().Edit_Clone);
MenuBuilder.AddMenuEntry(FVRSMainFrameCommands::Get().Group_Group);
MenuBuilder.AddMenuEntry(FVRSMainFrameCommands::Get().Group_Ungroup);
MenuBuilder.AddMenuEntry(FVRSMainFrameCommands::Get().Edit_Copy);
MenuBuilder.AddMenuEntry(FVRSMainFrameCommands::Get().Edit_Paste);
MenuBuilder.AddMenuEntry(FVRSMainFrameCommands::Get().Edit_Delete);
MenuBuilder.AddMenuEntry(FVRSMainFrameCommands::Get().Ed