void SBlueprintProfilerView::UpdateActiveProfilerWidget() { ChildSlot [ SNew(SVerticalBox) +SVerticalBox::Slot() .AutoHeight() .Padding(0) [ ProfilerToolbar.ToSharedRef() ] +SVerticalBox::Slot() [ SNew(SBorder) .Padding(FMargin(0,2,0,0)) .BorderImage(FEditorStyle::GetBrush("BlueprintProfiler.ViewContent")) [ CreateActiveStatisticWidget() ] ] ]; }
void SBlueprintProfilerView::UpdateActiveProfilerWidget() { FMenuBuilder ViewComboContent(true, NULL); ViewComboContent.AddMenuEntry( LOCTEXT("OverviewViewType", "Profiler Overview"), LOCTEXT("OverviewViewTypeDesc", "Displays High Level Profiling Information"), FSlateIcon(), FExecuteAction::CreateSP(this, &SBlueprintProfilerView::OnViewSelectionChanged, EBlueprintPerfViewType::Overview), NAME_None, EUserInterfaceActionType::Button); ViewComboContent.AddMenuEntry( LOCTEXT("ExecutionGraphViewType", "Execution Graph"), LOCTEXT("ExecutionGraphViewTypeDesc", "Displays the Execution Graph with Statistics"), FSlateIcon(), FExecuteAction::CreateSP(this, &SBlueprintProfilerView::OnViewSelectionChanged, EBlueprintPerfViewType::ExecutionGraph), NAME_None, EUserInterfaceActionType::Button); ViewComboContent.AddMenuEntry( LOCTEXT("LeastPerformantViewType", "Least Performant List"), LOCTEXT("LeastPerformantViewTypeDesc", "Displays a list of Least Performant Areas of the Blueprint"), FSlateIcon(), FExecuteAction::CreateSP(this, &SBlueprintProfilerView::OnViewSelectionChanged, EBlueprintPerfViewType::LeastPerformant), NAME_None, EUserInterfaceActionType::Button); ChildSlot [ SNew(SVerticalBox) +SVerticalBox::Slot() .AutoHeight() .Padding(0) [ SNew(SBorder) .BorderImage(FEditorStyle::GetBrush("BlueprintProfiler.ViewToolBar")) .Padding(0) .VAlign(VAlign_Top) .HAlign(HAlign_Right) [ SNew(SHorizontalBox) +SHorizontalBox::Slot() .AutoWidth() .Padding(FMargin(5,0)) [ SAssignNew(ViewComboButton, SComboButton) .ForegroundColor(this, &SBlueprintProfilerView::GetViewButtonForegroundColor) .ToolTipText(LOCTEXT("BlueprintProfilerViewType", "View Type")) .ButtonStyle(FEditorStyle::Get(), "ToggleButton") .ContentPadding(2) .MenuContent() [ ViewComboContent.MakeWidget() ] .ButtonContent() [ CreateViewButton() ] ] ] ] +SVerticalBox::Slot() [ SNew(SBorder) .Padding(FMargin(0,2,0,0)) .BorderImage(FEditorStyle::GetBrush("NoBorder")) [ CreateActiveStatisticWidget() ] ] ]; }