コード例 #1
0
void SSequencerCurveEditorToolBar::Construct( const FArguments& InArgs, TSharedPtr<FUICommandList> CurveEditorCommandList )
{
	FToolBarBuilder ToolBarBuilder( CurveEditorCommandList, FMultiBoxCustomization::None, TSharedPtr<FExtender>(), Orient_Horizontal, true );
	ToolBarBuilder.BeginSection( "Curve" );
	{
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().ZoomToFitHorizontal );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().ZoomToFitVertical );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().ZoomToFitAll );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().ZoomToFitSelected );
	}
	ToolBarBuilder.EndSection();

	ToolBarBuilder.BeginSection( "Interpolation" );
	{
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationCubicAuto );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationCubicUser );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationCubicBreak );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationLinear );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationConstant );
	}
	ToolBarBuilder.EndSection();

	ChildSlot
	[
		ToolBarBuilder.MakeWidget()
	];
}
TSharedRef<SWidget> SMessagingDebuggerToolbar::MakeToolbar( const TSharedRef<FUICommandList>& CommandList )
{
	FToolBarBuilder ToolBarBuilder(CommandList, FMultiBoxCustomization::None);

	ToolBarBuilder.BeginSection("Debugger");
	{
		ToolBarBuilder.AddToolBarButton(FMessagingDebuggerCommands::Get().StartDebugger, NAME_None, LOCTEXT("StartDebugger", "Start"));
		ToolBarBuilder.AddToolBarButton(FMessagingDebuggerCommands::Get().ContinueDebugger, NAME_None, LOCTEXT("ContinueDebugger", "Continue"));
		ToolBarBuilder.AddToolBarButton(FMessagingDebuggerCommands::Get().StepDebugger, NAME_None, LOCTEXT("StepDebugger", "Step"));
		ToolBarBuilder.AddToolBarButton(FMessagingDebuggerCommands::Get().BreakDebugger, NAME_None, LOCTEXT("BreakAtNextMessage", "Break"));
		ToolBarBuilder.AddToolBarButton(FMessagingDebuggerCommands::Get().StopDebugger,  NAME_None, LOCTEXT("StopDebugger", "Stop"));

		ToolBarBuilder.AddSeparator();
		ToolBarBuilder.AddToolBarButton(FMessagingDebuggerCommands::Get().ClearHistory, NAME_None, LOCTEXT("ClearHistory", "Clear History"));
	}

	return ToolBarBuilder.MakeWidget();
}
コード例 #3
0
/* SVisualLoggerToolbar implementation
*****************************************************************************/
TSharedRef<SWidget> SVisualLoggerToolbar::MakeToolbar(const TSharedRef<FUICommandList>& CommandList)
{
    FToolBarBuilder ToolBarBuilder(CommandList, FMultiBoxCustomization::None);

    ToolBarBuilder.BeginSection("Debugger");
    {
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().StartRecording, NAME_None, LOCTEXT("StartDebugger", "Start"), LOCTEXT("StartDebuggerTooltip", "Starts recording and collecting visual logs"), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Record")));
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().StopRecording, NAME_None, LOCTEXT("StopDebugger", "Stop"), TAttribute<FText>(), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Stop")));
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().Pause, NAME_None, LOCTEXT("PauseGame", "Pause"), TAttribute<FText>(), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Pause")));
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().Resume, NAME_None, LOCTEXT("ResumeGame", "Resume"), TAttribute<FText>(), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Resume")));

        ToolBarBuilder.AddSeparator();
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().FreeCamera, NAME_None, LOCTEXT("FreeCamera", "Camera"), TAttribute<FText>(), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Camera")));
        ToolBarBuilder.AddSeparator();
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().Load, NAME_None, LOCTEXT("Load", "Load"), TAttribute<FText>(), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Load")));
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().Save, NAME_None, LOCTEXT("Save", "Save"), TAttribute<FText>(), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Save")));
        ToolBarBuilder.AddSeparator();
        ToolBarBuilder.AddToolBarButton(FVisualLoggerCommands::Get().ToggleGraphs, NAME_None, LOCTEXT("ToggleGraphs", "Graphs"), TAttribute<FText>(), FSlateIcon(FLogVisualizerStyle::Get().GetStyleSetName(), TEXT("Toolbar.Graphs")));
    }

    return ToolBarBuilder.MakeWidget();
}
void SSequencerCurveEditorToolBar::Construct( const FArguments& InArgs, TSharedRef<FSequencer> InSequencer, TSharedPtr<FUICommandList> CurveEditorCommandList )
{
	Sequencer = InSequencer;
	SequencerSettings = InSequencer->GetSettings();

	FToolBarBuilder ToolBarBuilder( CurveEditorCommandList, FMultiBoxCustomization::None, TSharedPtr<FExtender>(), Orient_Horizontal, true );

	ToolBarBuilder.AddComboButton(
		FUIAction(),
		FOnGetContent::CreateSP( this, &SSequencerCurveEditorToolBar::MakeCurveEditorViewOptionsMenu, CurveEditorCommandList ),
		LOCTEXT( "CurveEditorViewOptions", "View Options" ),
		LOCTEXT( "CurveEditorViewOptionsToolTip", "View Options" ),
		TAttribute<FSlateIcon>(),
		true );

	ToolBarBuilder.AddWidget(
		SNew( SImage )
			.Image(FEditorStyle::GetBrush("Sequencer.Value")) );

	ToolBarBuilder.AddWidget(
		SNew( SBox )
			.VAlign( VAlign_Center )
			[
				SNew( SNumericDropDown<float> )
					.DropDownValues( SequencerSnapValues::GetSnapValues() )
					.ToolTipText( LOCTEXT( "ValueSnappingIntervalToolTip", "Curve value snapping interval" ) )
					.Value( this, &SSequencerCurveEditorToolBar::OnGetValueSnapInterval )
					.OnValueChanged( this, &SSequencerCurveEditorToolBar::OnValueSnapIntervalChanged )
			]);

	ToolBarBuilder.BeginSection( "Curve" );
	{
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().ZoomToFitHorizontal );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().ZoomToFitVertical );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().ZoomToFit );
	}
	ToolBarBuilder.EndSection();

	ToolBarBuilder.BeginSection( "Interpolation" );
	{
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationCubicAuto );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationCubicUser );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationCubicBreak );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationLinear );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().InterpolationConstant );
	}
	ToolBarBuilder.EndSection();

	ToolBarBuilder.BeginSection( "Tangents" );
	{
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().FlattenTangents );
		ToolBarBuilder.AddToolBarButton( FRichCurveEditorCommands::Get().StraightenTangents );
	}
	ToolBarBuilder.EndSection();

	ToolBarBuilder.AddComboButton(
		FUIAction(),
		FOnGetContent::CreateSP( this, &SSequencerCurveEditorToolBar::MakeCurveEditorCurveOptionsMenu, CurveEditorCommandList ),
		LOCTEXT( "CurveEditorCurveOptions", "Curves Options" ),
		LOCTEXT( "CurveEditorCurveOptionsToolTip", "Curve Options" ),
		TAttribute<FSlateIcon>(),
		true );

	ChildSlot
	[
		ToolBarBuilder.MakeWidget()
	];
}