当前位置: 首页>>代码示例>>C++>>正文


C++ FMenuBuilder::EndSection方法代码示例

本文整理汇总了C++中FMenuBuilder::EndSection方法的典型用法代码示例。如果您正苦于以下问题:C++ FMenuBuilder::EndSection方法的具体用法?C++ FMenuBuilder::EndSection怎么用?C++ FMenuBuilder::EndSection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FMenuBuilder的用法示例。


在下文中一共展示了FMenuBuilder::EndSection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MakeSetColorSubMenu

void FPathContextMenu::MakeSetColorSubMenu(FMenuBuilder& MenuBuilder)
{
	// New Color
	MenuBuilder.AddMenuEntry(
		LOCTEXT("NewColor", "New Color"),
		LOCTEXT("NewColorTooltip", "Changes the color this folder should appear as."),
		FSlateIcon(),
		FUIAction( FExecuteAction::CreateSP( this, &FPathContextMenu::ExecutePickColor ) )
		);

	// Clear Color (only required if any of the selection has one)
	if ( SelectedHasCustomColors() )
	{
		MenuBuilder.AddMenuEntry(
			LOCTEXT("ClearColor", "Clear Color"),
			LOCTEXT("ClearColorTooltip", "Resets the color this folder appears as."),
			FSlateIcon(),
			FUIAction( FExecuteAction::CreateSP( this, &FPathContextMenu::ExecuteResetColor ) )
			);
	}

	// Add all the custom colors the user has chosen so far
	TArray< FLinearColor > CustomColors;
	if ( ContentBrowserUtils::HasCustomColors( &CustomColors ) )
	{	
		MenuBuilder.BeginSection("PathContextCustomColors", LOCTEXT("CustomColorsExistingColors", "Existing Colors") );
		{
			for ( int32 ColorIndex = 0; ColorIndex < CustomColors.Num(); ColorIndex++ )
			{
				const FLinearColor& Color = CustomColors[ ColorIndex ];
				MenuBuilder.AddWidget(
						SNew(SHorizontalBox)
						+SHorizontalBox::Slot()
						.AutoWidth()
						.Padding(2, 0, 0, 0)
						[
							SNew(SButton)
							.ButtonStyle( FEditorStyle::Get(), "Menu.Button" )
							.OnClicked( this, &FPathContextMenu::OnColorClicked, Color )
							[
								SNew(SColorBlock)
								.Color( Color )
								.Size( FVector2D(77,16) )
							]
						],
					LOCTEXT("CustomColor", ""),
					/*bNoIndent=*/true
				);
			}
		}
		MenuBuilder.EndSection();
	}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:53,代码来源:PathContextMenu.cpp

示例2: MakePostInfinityExtrapSubMenu

		static void MakePostInfinityExtrapSubMenu(FMenuBuilder& MenuBuilder)
		{
			MenuBuilder.BeginSection( "Post-Infinity Extrapolation", LOCTEXT( "CurveEditorMenuPostInfinityExtrapHeader", "Extrapolation" ) );
			{
				MenuBuilder.AddMenuEntry( FRichCurveEditorCommands::Get().SetPostInfinityExtrapCycle);
				MenuBuilder.AddMenuEntry( FRichCurveEditorCommands::Get().SetPostInfinityExtrapCycleWithOffset);
				MenuBuilder.AddMenuEntry( FRichCurveEditorCommands::Get().SetPostInfinityExtrapOscillate);
				MenuBuilder.AddMenuEntry( FRichCurveEditorCommands::Get().SetPostInfinityExtrapLinear);
				MenuBuilder.AddMenuEntry( FRichCurveEditorCommands::Get().SetPostInfinityExtrapConstant);
			}
			MenuBuilder.EndSection();
		}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:12,代码来源:SSequencerCurveEditorToolBar.cpp

示例3: MakeLightingToolsMenu

		/** Generates a lighting tools sub-menu */
		static void MakeLightingToolsMenu( FMenuBuilder& InMenuBuilder )
		{
			InMenuBuilder.BeginSection("LevelEditorBuildLightingTools", LOCTEXT( "LightingToolsHeading", "Light Environments" ) );
			{
				InMenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().LightingTools_ShowBounds );
				InMenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().LightingTools_ShowTraces );
				InMenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().LightingTools_ShowDirectOnly );
				InMenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().LightingTools_ShowIndirectOnly );
				InMenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().LightingTools_ShowIndirectSamples );
			}
			InMenuBuilder.EndSection();
		}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:13,代码来源:LevelEditorToolBar.cpp

示例4: BuildViewOptionsMenu

		static void BuildViewOptionsMenu(FMenuBuilder& Menu)
		{
			Menu.BeginSection("CascadeViewOverlays", NSLOCTEXT("Cascade", "ViewOptionsHeader", "View Overlays"));
			{
				Menu.AddMenuEntry(FCascadeCommands::Get().View_ParticleCounts);
				Menu.AddMenuEntry(FCascadeCommands::Get().View_ParticleEventCounts);
				Menu.AddMenuEntry(FCascadeCommands::Get().View_ParticleTimes);
				Menu.AddMenuEntry(FCascadeCommands::Get().View_ParticleMemory);
				Menu.AddMenuEntry(FCascadeCommands::Get().View_SystemCompleted);
			}
			Menu.EndSection();
		}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:12,代码来源:SCascadePreviewToolbar.cpp

示例5: BuildAnimSpeedOptionsMenu

		static void BuildAnimSpeedOptionsMenu(FMenuBuilder& Menu)
		{
			Menu.BeginSection("CascadeAnimSpeed", NSLOCTEXT("Cascade", "AnimSpeedHeader", "AnimSpeed"));
			{
				Menu.AddMenuEntry(FCascadeCommands::Get().AnimSpeed_100);
				Menu.AddMenuEntry(FCascadeCommands::Get().AnimSpeed_50);
				Menu.AddMenuEntry(FCascadeCommands::Get().AnimSpeed_25);
				Menu.AddMenuEntry(FCascadeCommands::Get().AnimSpeed_10);
				Menu.AddMenuEntry(FCascadeCommands::Get().AnimSpeed_1);
			}
			Menu.EndSection();
		}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:12,代码来源:SCascadePreviewToolbar.cpp

示例6: MakeSaveDynamicCollectionSubMenu

void FCollectionContextMenu::MakeSaveDynamicCollectionSubMenu(FMenuBuilder& MenuBuilder, FText InSearchQuery)
{
	auto OnCollectionCreated = FCollectionItem::FCollectionCreatedEvent::CreateSP(this, &FCollectionContextMenu::ExecuteSaveDynamicCollection, InSearchQuery);

	// Create new root level collection
	MakeNewCollectionSubMenu(MenuBuilder, ECollectionStorageMode::Dynamic, SCollectionView::FCreateCollectionPayload(OnCollectionCreated));

	FCollectionManagerModule& CollectionManagerModule = FCollectionManagerModule::GetModule();
	
	TArray<FCollectionNameType> AvailableCollections;
	CollectionManagerModule.Get().GetCollections(AvailableCollections);

	AvailableCollections.Sort([](const FCollectionNameType& One, const FCollectionNameType& Two) -> bool
	{
		return One.Name < Two.Name;
	});

	if (AvailableCollections.Num() > 0)
	{
		MenuBuilder.BeginSection("CollectionReplaceCollection", LOCTEXT("OverwriteDynamicCollectionMenuHeading", "Overwrite Dynamic Collection"));

		for (const FCollectionNameType& AvailableCollection : AvailableCollections)
		{
			// Never display system collections
			if (AvailableCollection.Type == ECollectionShareType::CST_System)
			{
				continue;
			}

			// Can only overwrite dynamic collections
			ECollectionStorageMode::Type StorageMode = ECollectionStorageMode::Static;
			CollectionManagerModule.Get().GetCollectionStorageMode(AvailableCollection.Name, AvailableCollection.Type, StorageMode);
			if (StorageMode != ECollectionStorageMode::Dynamic)
			{
				continue;
			}

			MenuBuilder.AddMenuEntry(
				FText::FromName(AvailableCollection.Name), 
				FText::Format(LOCTEXT("SaveDynamicCollection_OverwriteExistingCollectionToolTip", "Overwrite '{0}' with the current search query"), FText::FromName(AvailableCollection.Name)),
				FSlateIcon(FEditorStyle::GetStyleSetName(), ECollectionShareType::GetIconStyleName(AvailableCollection.Type)),
				FUIAction(
					FExecuteAction::CreateSP( this, &FCollectionContextMenu::ExecuteSaveDynamicCollection, AvailableCollection, InSearchQuery ),
					FCanExecuteAction::CreateSP( this, &FCollectionContextMenu::CanExecuteSaveDynamicCollection, AvailableCollection )
					)
				);
		}

		MenuBuilder.EndSection();
	}
}
开发者ID:magetron,项目名称:UnrealEngine4-mod,代码行数:51,代码来源:CollectionContextMenu.cpp

示例7: CreateLODGroupActionsSubMenu

	static void CreateLODGroupActionsSubMenu(FMenuBuilder& MenuBuilder, TArray<FAssetData> SelectedAssets)
	{
		MenuBuilder.BeginSection("Simplygon", LOCTEXT("SimplygonHeading", "Simplygon"));
		{
			MenuBuilder.AddSubMenu(
				LOCTEXT("LODGroupSubMenu", "Assign LOD Group"),
				LOCTEXT("LODGroupSubMenu_ToolTip", "Assign LODGroup to selection"),
				FNewMenuDelegate::CreateStatic(&PopulateLODGroupMenu, SelectedAssets),
				false,
				FSlateIcon(FEditorStyle::GetStyleSetName(), "SimplygonIcon.TabIcon"));
		}

		MenuBuilder.EndSection();
	}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:14,代码来源:SimplygonContentBrowserExtensions.cpp

示例8: ExtendMenu

		static void ExtendMenu( FMenuBuilder& MenuBuilder )
		{
			// one extra entry when summoning the menu this way
			MenuBuilder.BeginSection("ActorPreview", LOCTEXT("PreviewHeading", "Preview") );
			{
				// Note: not using a command for play from here since it requires a mouse click
				FUIAction PlayFromHereAction( 
					FExecuteAction::CreateStatic( &FPlayWorldCommandCallbacks::StartPlayFromHere ) );

				const FText PlayFromHereLabel = GEditor->OnlyLoadEditorVisibleLevelsInPIE() ? LOCTEXT("PlayFromHereVisible", "Play From Here (visible levels)") : LOCTEXT("PlayFromHere", "Play From Here");
				MenuBuilder.AddMenuEntry( PlayFromHereLabel, LOCTEXT("PlayFromHere_ToolTip", "Starts a game preview from the clicked location"),FSlateIcon(), PlayFromHereAction );
			}
			MenuBuilder.EndSection();
		}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:14,代码来源:LevelEditorContextMenu.cpp

示例9: GenerateContextMenuEntries

//------------------------------------------------------------------------------
void SBlueprintFavoritesPalette::GenerateContextMenuEntries(FMenuBuilder& MenuBuilder) const
{
	FBlueprintFavoritesPaletteCommands const& PaletteCommands = FBlueprintFavoritesPaletteCommands::Get();

	MenuBuilder.BeginSection("FavoritedItem");
	{
		TSharedPtr<FEdGraphSchemaAction> SelectedAction = GetSelectedAction();
		// if we have a specific action selected
		if (SelectedAction.IsValid())
		{
			MenuBuilder.AddMenuEntry(PaletteCommands.RemoveSingleFavorite);
		}
		// if we have a category selected 
		{
			FString CategoryName = GraphActionMenu->GetSelectedCategoryName();
			// make sure it is an actual category and isn't the root (assume there's only one category with that name)
			if (!CategoryName.IsEmpty() && (CategoryName != SBlueprintFavoritesPaletteUtils::FavoritesCategoryName))
			{
				MenuBuilder.AddMenuEntry(PaletteCommands.RemoveSubFavorites);
			}
		}
	}
	MenuBuilder.EndSection();
	MenuBuilder.BeginSection("FavoritesList");
	{
		SBlueprintSubPalette::GenerateContextMenuEntries(MenuBuilder);

		MenuBuilder.AddSubMenu(	
			LOCTEXT("LoadProfile", "Load Profile"), 
			LOCTEXT("LoadProfileTooltip", "Replace your current favorites with ones from a pre-defined profile."),
			FNewMenuDelegate::CreateStatic(&SBlueprintFavoritesPaletteUtils::BuildProfilesSubMenu)
		);

		MenuBuilder.AddMenuEntry(PaletteCommands.ClearFavorites);
	}
	MenuBuilder.EndSection();
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:38,代码来源:SBlueprintFavoritesPalette.cpp

示例10: FillFileMenu

void SVisualLogger::FillFileMenu(FMenuBuilder& MenuBuilder, const TSharedPtr<FTabManager> InTabManager)
{
	MenuBuilder.BeginSection("LogFile", LOCTEXT("FileMenu", "Log File"));
	{
		MenuBuilder.AddMenuEntry(FVisualLoggerCommands::Get().LoadFromVLog);
		MenuBuilder.AddMenuEntry(FVisualLoggerCommands::Get().SaveToVLog);
	}
	MenuBuilder.EndSection();
	MenuBuilder.BeginSection("LogFilters", LOCTEXT("FIlterMenu", "Log Filters"));
	{
		MenuBuilder.AddSubMenu(
			LOCTEXT("LoadPreset", "Load Preset"), LOCTEXT("LoadPresetTooltip", "Load filter's preset"),
			FNewMenuDelegate::CreateRaw(this, &SVisualLogger::FillLoadPresetMenu));

		MenuBuilder.AddMenuEntry(
			LOCTEXT("SavePreset", "Save Preset"), LOCTEXT("SavePresetTooltip", "Save filter's setting as preset"),
			FSlateIcon(), FUIAction(
			FExecuteAction::CreateLambda(
				[this](){
				}
			)));
	}
	MenuBuilder.EndSection();
}
开发者ID:a3pelawi,项目名称:UnrealEngine,代码行数:24,代码来源:SVisualLogger.cpp

示例11: FillHelpMenu

void FMainMenu::FillHelpMenu( FMenuBuilder& MenuBuilder, const TSharedRef< FExtender > Extender )
{
	MenuBuilder.BeginSection("HelpOnline", NSLOCTEXT("MainHelpMenu", "Online", "Online"));
	{
		MenuBuilder.AddMenuEntry(FMainFrameCommands::Get().VisitForums);
		MenuBuilder.AddMenuEntry(FMainFrameCommands::Get().VisitSearchForAnswersPage);
		MenuBuilder.AddMenuEntry(FMainFrameCommands::Get().VisitWiki);


		const FText SupportWebSiteLabel = NSLOCTEXT("MainHelpMenu", "VisitUnrealEngineSupportWebSite", "Unreal Engine Support Web Site...");

		MenuBuilder.AddMenuSeparator("EpicGamesHelp");
		MenuBuilder.AddMenuEntry(FMainFrameCommands::Get().VisitEpicGamesDotCom, "VisitEpicGamesDotCom");
	}
	MenuBuilder.EndSection();

	MenuBuilder.BeginSection("HelpApplication", NSLOCTEXT("MainHelpMenu", "Application", "Application"));
	{
		const FText AboutWindowTitle = NSLOCTEXT("MainHelpMenu", "AboutUnrealEditor", "About Unreal Editor...");

		MenuBuilder.AddMenuEntry(FMainFrameCommands::Get().AboutUnrealEd, "AboutUnrealEd", AboutWindowTitle);
	}
	MenuBuilder.EndSection();
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:24,代码来源:MainMenu.cpp

示例12: BuildLandscapeVisualizersMenu

			static void BuildLandscapeVisualizersMenu(FMenuBuilder& InMenuBuilder)
			{
				const FLandscapeEditorCommands& LandscapeActions = FLandscapeEditorCommands::Get();

				InMenuBuilder.BeginSection("LandscapeVisualizers", LOCTEXT("LandscapeHeader", "Landscape Visualizers"));
				{
					InMenuBuilder.AddMenuEntry(LandscapeActions.ViewModeNormal, NAME_None, LOCTEXT("LandscapeViewModeNormal", "Normal"));
					InMenuBuilder.AddMenuEntry(LandscapeActions.ViewModeLOD, NAME_None, LOCTEXT("LandscapeViewModeLOD", "LOD"));
					InMenuBuilder.AddMenuEntry(LandscapeActions.ViewModeLayerDensity, NAME_None, LOCTEXT("LandscapeViewModeLayerDensity", "Layer Density"));
					if (GLevelEditorModeTools().IsModeActive(FBuiltinEditorModes::EM_Landscape))
					{
						InMenuBuilder.AddMenuEntry(LandscapeActions.ViewModeLayerDebug, NAME_None, LOCTEXT("LandscapeViewModeLayerDebug", "Layer Debug"));
					}
					InMenuBuilder.AddMenuEntry(LandscapeActions.ViewModeWireframeOnTop, NAME_None, LOCTEXT("LandscapeViewModeWireframeOnTop", "Wireframe on Top"));
				}
				InMenuBuilder.EndSection();
			}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:17,代码来源:LandscapeEditorModule.cpp

示例13: MakeCollectionShareTypeSubMenu

void FCollectionContextMenu::MakeCollectionShareTypeSubMenu(FMenuBuilder& MenuBuilder)
{
	MenuBuilder.BeginSection("CollectionShareType", LOCTEXT("CollectionShareTypeMenuHeading", "Collection Share Type"));
	{
		MenuBuilder.AddMenuEntry(
			ECollectionShareType::ToText( ECollectionShareType::CST_Shared ),
			ECollectionShareType::GetDescription( ECollectionShareType::CST_Shared ),
			FSlateIcon( FEditorStyle::GetStyleSetName(), ECollectionShareType::GetIconStyleName( ECollectionShareType::CST_Shared ) ),
			FUIAction(
				FExecuteAction::CreateSP( this, &FCollectionContextMenu::ExecuteSetCollectionShareType, ECollectionShareType::CST_Shared ),
				FCanExecuteAction::CreateSP( this, &FCollectionContextMenu::CanExecuteSetCollectionShareType, ECollectionShareType::CST_Shared ),
				FIsActionChecked::CreateSP( this, &FCollectionContextMenu::IsSetCollectionShareTypeChecked, ECollectionShareType::CST_Shared )
				),
			NAME_None,
			EUserInterfaceActionType::Check
			);

		MenuBuilder.AddMenuEntry(
			ECollectionShareType::ToText( ECollectionShareType::CST_Private ),
			ECollectionShareType::GetDescription( ECollectionShareType::CST_Private ),
			FSlateIcon( FEditorStyle::GetStyleSetName(), ECollectionShareType::GetIconStyleName( ECollectionShareType::CST_Private ) ),
			FUIAction(
				FExecuteAction::CreateSP( this, &FCollectionContextMenu::ExecuteSetCollectionShareType, ECollectionShareType::CST_Private ),
				FCanExecuteAction::CreateSP( this, &FCollectionContextMenu::CanExecuteSetCollectionShareType, ECollectionShareType::CST_Private ),
				FIsActionChecked::CreateSP( this, &FCollectionContextMenu::IsSetCollectionShareTypeChecked, ECollectionShareType::CST_Private )
				),
			NAME_None,
			EUserInterfaceActionType::Check
			);

		MenuBuilder.AddMenuEntry(
			ECollectionShareType::ToText( ECollectionShareType::CST_Local ),
			ECollectionShareType::GetDescription( ECollectionShareType::CST_Local ),
			FSlateIcon( FEditorStyle::GetStyleSetName(), ECollectionShareType::GetIconStyleName( ECollectionShareType::CST_Local ) ),
			FUIAction(
				FExecuteAction::CreateSP( this, &FCollectionContextMenu::ExecuteSetCollectionShareType, ECollectionShareType::CST_Local ),
				FCanExecuteAction::CreateSP( this, &FCollectionContextMenu::CanExecuteSetCollectionShareType, ECollectionShareType::CST_Local ),
				FIsActionChecked::CreateSP( this, &FCollectionContextMenu::IsSetCollectionShareTypeChecked, ECollectionShareType::CST_Local )
				),
			NAME_None,
			EUserInterfaceActionType::Check
			);
	}
	MenuBuilder.EndSection();
}
开发者ID:magetron,项目名称:UnrealEngine4-mod,代码行数:45,代码来源:CollectionContextMenu.cpp

示例14: ExtendSequencerAddTrackMenu

void FWidgetBlueprintEditor::ExtendSequencerAddTrackMenu( FMenuBuilder& AddTrackMenuBuilder, TArray<UObject*> ContextObjects )
{
	if ( ContextObjects.Num() == 1 )
	{
		UWidget* Widget = Cast<UWidget>( ContextObjects[0] );
		if ( Widget != nullptr && Widget->GetParent() != nullptr && Widget->Slot != nullptr )
		{
			AddTrackMenuBuilder.BeginSection( "Slot", LOCTEXT( "SlotSection", "Slot" ) );
			{
				FUIAction AddSlotAction( FExecuteAction::CreateRaw( this, &FWidgetBlueprintEditor::AddSlotTrack, Widget->Slot ) );
				FText AddSlotLabel = FText::Format(LOCTEXT("SlotLabelFormat", "{0} Slot"), FText::FromString(Widget->GetParent()->GetName()));
				FText AddSlotToolTip = FText::Format(LOCTEXT("SlotToolTipFormat", "Add {0} slot"), FText::FromString( Widget->GetParent()->GetName()));
				AddTrackMenuBuilder.AddMenuEntry(AddSlotLabel, AddSlotToolTip, FSlateIcon(), AddSlotAction);
			}
			AddTrackMenuBuilder.EndSection();
		}
	}
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:18,代码来源:WidgetBlueprintEditor.cpp

示例15: FillLoadPresetMenu

void SVisualLogger::FillLoadPresetMenu(FMenuBuilder& MenuBuilder)
{
	ULogVisualizerSettings* Settings = ULogVisualizerSettings::StaticClass()->GetDefaultObject<ULogVisualizerSettings>();
	
	MenuBuilder.BeginSection("FilterPresets", LOCTEXT("FilterPresets", "Presets"));
#if 0 //disabled for now, we don't use presets yet
	for (auto& CurrentPreset : Settings->FilterPresets)
	{
		MenuBuilder.AddMenuEntry(
			FText::FromString(CurrentPreset.FilterName), LOCTEXT("LoadPresetTooltip", "Load filter's preset"),
			FSlateIcon(), FUIAction(
			FExecuteAction::CreateLambda([this, CurrentPreset](){ this->SetFiltersPreset(CurrentPreset); }
			))
		);
	}
#endif
	MenuBuilder.EndSection();
}
开发者ID:a3pelawi,项目名称:UnrealEngine,代码行数:18,代码来源:SVisualLogger.cpp


注:本文中的FMenuBuilder::EndSection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。