本文整理汇总了C++中FMenuBuilder::PopExtender方法的典型用法代码示例。如果您正苦于以下问题:C++ FMenuBuilder::PopExtender方法的具体用法?C++ FMenuBuilder::PopExtender怎么用?C++ FMenuBuilder::PopExtender使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FMenuBuilder
的用法示例。
在下文中一共展示了FMenuBuilder::PopExtender方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillMenu
//.........这里部分代码省略.........
LOCTEXT("SelectSubMenu_ToolTip", "Opens the actor selection menu"),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillSelectActorMenu ) );
MenuBuilder.AddSubMenu(
LOCTEXT("EditSubMenu", "Edit"),
FText::GetEmpty(),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillEditMenu, ContextType ) );
MenuBuilder.AddSubMenu(
LOCTEXT("VisibilitySubMenu", "Visibility"),
LOCTEXT("VisibilitySubMenu_ToolTip", "Selected actor visibility options"),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillActorVisibilityMenu ) );
// Build the menu for grouping actors
BuildGroupMenu( MenuBuilder, SelectionInfo );
MenuBuilder.AddSubMenu(
LOCTEXT("LevelSubMenu", "Level"),
LOCTEXT("LevelSubMenu_ToolTip", "Options for interacting with this actor's level"),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillActorLevelMenu ) );
}
MenuBuilder.EndSection();
if (ContextType == LevelEditorMenuContext::Viewport)
{
LevelEditorCreateActorMenu::FillAddReplaceViewportContextMenuSections( MenuBuilder );
}
if( GEditor->PlayWorld != NULL )
{
if( SelectionInfo.NumSelected > 0 )
{
MenuBuilder.BeginSection( "Simulation", NSLOCTEXT( "LevelViewportContextMenu", "SimulationHeading", "Simulation" ) );
{
MenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().KeepSimulationChanges );
}
MenuBuilder.EndSection();
}
}
MenuBuilder.BeginSection("LevelViewportAttach");
{
// Only display the attach menu if we have actors selected
if ( GEditor->GetSelectedActorCount() )
{
if(SelectionInfo.bHaveAttachedActor)
{
MenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().DetachFromParent );
}
MenuBuilder.AddSubMenu(
LOCTEXT( "ActorAttachToSubMenu", "Attach To" ),
LOCTEXT( "ActorAttachToSubMenu_ToolTip", "Attach Actor as child" ),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillActorMenu ) );
}
// Add a heading for "Movement" if an actor is selected
if ( GEditor->GetSelectedActorIterator() )
{
// Add a sub-menu for "Transform"
MenuBuilder.AddSubMenu(
LOCTEXT("TransformSubMenu", "Transform"),
LOCTEXT("TransformSubMenu_ToolTip", "Actor transform utils"),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillTransformMenu ) );
}
// @todo UE4: The current pivot options only work for brushes
if( SelectionInfo.bHaveBrush )
{
// You can only move the pivot in ortho viewports, but you can reset it in any viewport
if( GCurrentLevelEditingViewportClient->ViewportType != LVT_Perspective )
{
// Add a sub-menu for "Pivot"
MenuBuilder.AddSubMenu(
LOCTEXT("PivotSubMenu", "Pivot"),
LOCTEXT("PivotSubMenu_ToolTip", "Actor pivoting utils"),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillPivotMenu ) );
}
else
{
MenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().ResetPivot );
}
}
if (GetDefault<UEditorExperimentalSettings>()->bActorMerging &&
(SelectionInfo.bHaveStaticMeshComponent || SelectionInfo.bHaveLandscape))
{
MenuBuilder.AddSubMenu(
LOCTEXT("MergeActorsSubMenu", "Merge"),
LOCTEXT("MergeActorsSubMenu_ToolTip", "Actor merging utils"),
FNewMenuDelegate::CreateStatic( &FLevelEditorContextMenuImpl::FillMergeActorsMenu ) );
}
}
MenuBuilder.EndSection();
FLevelScriptEventMenuHelper::FillLevelBlueprintEventsMenu(MenuBuilder, SelectedActors);
MenuBuilder.PopCommandList();
MenuBuilder.PopExtender();
}