本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}