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


C++ TSharedRef::GetCommandList方法代码示例

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


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

示例1: ShowMenuBuilder

TSharedRef<SWidget> SSpriteEditorViewportToolbar::GenerateShowMenu() const
{
	GetInfoProvider().OnFloatingButtonClicked();
	
	TSharedRef<SEditorViewport> ViewportRef = GetInfoProvider().GetViewportWidget();

	const bool bInShouldCloseWindowAfterMenuSelection = true;
	FMenuBuilder ShowMenuBuilder(bInShouldCloseWindowAfterMenuSelection, ViewportRef->GetCommandList());
	{
		ShowMenuBuilder.AddMenuEntry(FSpriteEditorCommands::Get().SetShowSockets);
		ShowMenuBuilder.AddMenuEntry(FSpriteEditorCommands::Get().SetShowPivot);

		ShowMenuBuilder.AddMenuSeparator();

		ShowMenuBuilder.AddMenuEntry(FSpriteEditorCommands::Get().SetShowGrid);
		ShowMenuBuilder.AddMenuEntry(FSpriteEditorCommands::Get().SetShowBounds);
		ShowMenuBuilder.AddMenuEntry(FSpriteEditorCommands::Get().SetShowNormals);

		ShowMenuBuilder.AddMenuSeparator();

		ShowMenuBuilder.AddMenuEntry(FSpriteEditorCommands::Get().SetShowCollision);
		ShowMenuBuilder.AddMenuEntry(FSpriteEditorCommands::Get().SetShowMeshEdges);
	}

	return ShowMenuBuilder.MakeWidget();
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:26,代码来源:SSpriteEditorViewportToolbar.cpp

示例2: ShowMenuBuilder

TSharedRef<SWidget> STileMapEditorViewportToolbar::GenerateShowMenu() const
{
	GetInfoProvider().OnFloatingButtonClicked();

	TSharedRef<SEditorViewport> ViewportRef = GetInfoProvider().GetViewportWidget();

	const FTileMapEditorCommands& Commands = FTileMapEditorCommands::Get();

	const bool bInShouldCloseWindowAfterMenuSelection = true;
	FMenuBuilder ShowMenuBuilder(bInShouldCloseWindowAfterMenuSelection, ViewportRef->GetCommandList());
	{
		ShowMenuBuilder.AddMenuEntry(Commands.SetShowPivot);

		ShowMenuBuilder.AddMenuSeparator();

		ShowMenuBuilder.AddMenuEntry(Commands.SetShowTileGrid);
		ShowMenuBuilder.AddMenuEntry(Commands.SetShowLayerGrid);
		ShowMenuBuilder.AddMenuEntry(Commands.SetShowTileMapStats);

		ShowMenuBuilder.AddMenuSeparator();

		ShowMenuBuilder.AddMenuEntry(Commands.SetShowCollision);
	}

	return ShowMenuBuilder.MakeWidget();
}
开发者ID:AndyHuang7601,项目名称:EpicGames-UnrealEngine,代码行数:26,代码来源:STileMapEditorViewportToolbar.cpp

示例3: ShowMenuBuilder

	// SCommonEditorViewportToolbarBase interface
	virtual TSharedRef<SWidget> GenerateShowMenu() const override
	{
		GetInfoProvider().OnFloatingButtonClicked();

		TSharedRef<SEditorViewport> ViewportRef = GetInfoProvider().GetViewportWidget();

		const bool bInShouldCloseWindowAfterMenuSelection = true;
		FMenuBuilder ShowMenuBuilder(bInShouldCloseWindowAfterMenuSelection, ViewportRef->GetCommandList());
		{
			auto Commands = FStaticMeshEditorCommands::Get();

			ShowMenuBuilder.AddMenuEntry(Commands.SetShowSockets);
			ShowMenuBuilder.AddMenuEntry(Commands.SetShowPivot);
			ShowMenuBuilder.AddMenuEntry(Commands.SetShowVertices);

			ShowMenuBuilder.AddMenuSeparator();

			ShowMenuBuilder.AddMenuEntry(Commands.SetShowGrid);
			ShowMenuBuilder.AddMenuEntry(Commands.SetShowBounds);
			ShowMenuBuilder.AddMenuEntry(Commands.SetShowCollision);

			ShowMenuBuilder.AddMenuSeparator();

			ShowMenuBuilder.AddMenuEntry(Commands.SetShowNormals);
			ShowMenuBuilder.AddMenuEntry(Commands.SetShowTangents);
			ShowMenuBuilder.AddMenuEntry(Commands.SetShowBinormals);

			//ShowMenuBuilder.AddMenuSeparator();
			//ShowMenuBuilder.AddMenuEntry(Commands.SetShowMeshEdges);
		}

		return ShowMenuBuilder.MakeWidget();
	}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:34,代码来源:SStaticMeshEditorViewport.cpp

示例4: ShowMenuBuilder

TSharedRef<SWidget> SMaterialEditorViewportToolBar::GenerateShowMenu() const
{
	GetInfoProvider().OnFloatingButtonClicked();

	TSharedRef<SEditorViewport> ViewportRef = GetInfoProvider().GetViewportWidget();

	const bool bInShouldCloseWindowAfterMenuSelection = true;
	FMenuBuilder ShowMenuBuilder(bInShouldCloseWindowAfterMenuSelection, ViewportRef->GetCommandList());
	{
		auto Commands = FMaterialEditorCommands::Get();

		ShowMenuBuilder.AddMenuEntry(Commands.ToggleMaterialStats);
		ShowMenuBuilder.AddMenuEntry(Commands.ToggleMobileStats);

		ShowMenuBuilder.AddMenuSeparator();

		ShowMenuBuilder.AddMenuEntry(Commands.TogglePreviewGrid);
		ShowMenuBuilder.AddMenuEntry(Commands.TogglePreviewBackground);
	}

	return ShowMenuBuilder.MakeWidget();
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:22,代码来源:SMaterialEditorViewportToolBar.cpp


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