• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FMargin函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FMargin函数的典型用法代码示例。如果您正苦于以下问题:C++ FMargin函数的具体用法?C++ FMargin怎么用?C++ FMargin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: SNew

void SAnimMontageSectionsPanel::Construct(const FArguments& InArgs)
{
	MontageEditor = InArgs._MontageEditor;
	Montage = InArgs._Montage;
	SelectedCompositeSection = INDEX_NONE;

	this->ChildSlot
	[
		SNew(SVerticalBox)
		+SVerticalBox::Slot()
		.FillHeight(1)
		[
			SNew( SExpandableArea )
			.AreaTitle( LOCTEXT("Sections", "Sections") )
			.BodyContent()
			[
				SNew( SBorder )
				.Padding( FMargin(2.f, 2.f) )
				[
					SAssignNew( PanelArea, SBorder )
					.BorderImage( FEditorStyle::GetBrush("NoBorder") )
					.Padding( FMargin(2.0f, 2.0f) )
					.ColorAndOpacity( FLinearColor::White )
				]
			]
		]
	];

	Update();
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:30,代码来源:SAnimMontageSectionsPanel.cpp


示例2: FSlateLayoutTransform

int32 FCinematicShotSection::OnPaintSection(FSequencerSectionPainter& InPainter) const
{
	static const FSlateBrush* FilmBorder = FEditorStyle::GetBrush("Sequencer.Section.FilmBorder");

	InPainter.LayerId = InPainter.PaintSectionBackground();

	FVector2D SectionSize = InPainter.SectionGeometry.GetLocalSize();

	FSlateDrawElement::MakeBox(
		InPainter.DrawElements,
		InPainter.LayerId++,
		InPainter.SectionGeometry.ToPaintGeometry(FVector2D(SectionSize.X-2.f, 7.f), FSlateLayoutTransform(FVector2D(1.f, 4.f))),
		FilmBorder,
		InPainter.SectionClippingRect.InsetBy(FMargin(1.f)),
		InPainter.bParentEnabled ? ESlateDrawEffect::None : ESlateDrawEffect::DisabledEffect
	);

	FSlateDrawElement::MakeBox(
		InPainter.DrawElements,
		InPainter.LayerId++,
		InPainter.SectionGeometry.ToPaintGeometry(FVector2D(SectionSize.X-2.f, 7.f), FSlateLayoutTransform(FVector2D(1.f, SectionSize.Y - 11.f))),
		FilmBorder,
		InPainter.SectionClippingRect.InsetBy(FMargin(1.f)),
		InPainter.bParentEnabled ? ESlateDrawEffect::None : ESlateDrawEffect::DisabledEffect
	);

	if (SequenceInstance.IsValid())
	{
		return FThumbnailSection::OnPaintSection(InPainter);
	}

	return InPainter.LayerId;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:33,代码来源:CinematicShotSection.cpp


示例3: SNew

void SErrorUI::Construct(const FArguments& args)
{
	MenuHUD = args._MenuHUD;

	const FMenuBackgroundStyle* BackgroundStyle = &FMagicBattleSoccerStyles::Get().GetWidgetStyle<FMenuBackgroundStyle>("DefaultMenuBackgroundStyle");
	const FButtonStyle* ButtonStyle = &FMagicBattleSoccerStyles::Get().GetWidgetStyle<FButtonStyle>("DefaultMenuButtonStyle");
	UMagicBattleSoccerEngine *Engine = (UMagicBattleSoccerEngine*)GEngine;

	ChildSlot
	[
		// Overlay level
		SNew(SOverlay)
		+ SOverlay::Slot()
		.HAlign(HAlign_Center)
		.VAlign(VAlign_Center)
		[
			// Border level (fills overlay with background image)
			SNew(SBorder)
			.BorderImage(&BackgroundStyle->BackgroundBrush)
			[
				// Vertical margins (space between menu items and border) level
				SNew(SVerticalBox)
				+ SVerticalBox::Slot()
				.Padding(FMargin(0,15,0,15))
				[
					// Horizontal margins (space between menu items and border) level
					SNew(SHorizontalBox)
					+ SHorizontalBox::Slot()
					.Padding(FMargin(0, 15, 0, 15))
					.MaxWidth(800)
					[
						SNew(SVerticalBox)
						+ SVerticalBox::Slot()
						.Padding(10.0f)
						.MaxHeight(600)
						[
							SNew(STextBlock)
							.TextStyle(FMagicBattleSoccerStyles::Get(), "MagicBattleSoccer.ButtonTextStyle")
							.Text(this, &SErrorUI::GetLastErrorString)
							.WrapTextAt(770)
						]
						+ SVerticalBox::Slot()
						.Padding(10.0f)
						[
							// OK button
							SNew(SButton)
							.HAlign(HAlign_Center)
							.VAlign(VAlign_Center)
							.ButtonStyle(ButtonStyle)
							.ContentPadding(FMargin(80.0, 2.0))
							.TextStyle(FMagicBattleSoccerStyles::Get(), "MagicBattleSoccer.ButtonTextStyle")
							.Text(FText::FromString("OK"))
							.OnClicked(this, &SErrorUI::OnOK)
						]
					]
				]
			]
		]
	];
}
开发者ID:Gamieon,项目名称:UBattleSoccerPrototype,代码行数:60,代码来源:ErrorUI.cpp


示例4: SNew

TSharedRef<ITableRow> SVisualLoggerLogsList::LogEntryLinesGenerateRow(TSharedPtr<FLogEntryItem> Item, const TSharedRef<STableViewBase>& OwnerTable)
{
	return SNew(STableRow< TSharedPtr<FString> >, OwnerTable)
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.AutoWidth()
			.Padding(FMargin(5.0f, 0.0f))
			[
				SNew(STextBlock)
				.ColorAndOpacity(FSlateColor(Item->CategoryColor))
				.Text( FText::FromString(Item->Category) )
				.HighlightText(this, &SVisualLoggerLogsList::GetFilterText)
			]
			+ SHorizontalBox::Slot()
			.AutoWidth()
			.Padding(FMargin(5.0f, 0.0f))
			[
				SNew(STextBlock)
				.ColorAndOpacity(FSlateColor(Item->Verbosity == ELogVerbosity::Error ? FLinearColor::Red : (Item->Verbosity == ELogVerbosity::Warning ? FLinearColor::Yellow : FLinearColor::Gray)))
				.Text(FText::FromString(FString(TEXT("(")) + FString(FOutputDevice::VerbosityToString(Item->Verbosity)) + FString(TEXT(")"))))
			]
			+ SHorizontalBox::Slot()
			.Padding(FMargin(5.0f, 0.0f))
			[
				SNew(STextBlock)
				.AutoWrapText(true)
				.ColorAndOpacity(FSlateColor(Item->Verbosity == ELogVerbosity::Error ? FLinearColor::Red : (Item->Verbosity == ELogVerbosity::Warning ? FLinearColor::Yellow : FLinearColor::Gray)))
				.Text(FText::FromString(Item->Line))
				.HighlightText(this, &SVisualLoggerLogsList::GetFilterText)
			]
		];
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:33,代码来源:SVisualLoggerLogsList.cpp


示例5: Construct

	void Construct(const FArguments& InArgs, 
		TSharedPtr<IPropertyHandle> AnchorsHandle,
		TSharedPtr<IPropertyHandle> AlignmentHandle,
		TSharedPtr<IPropertyHandle> OffsetsHandle,
		FText LabelText,
		FAnchors Anchors)
	{
		ResizeCurve = FCurveSequence(0, 0.40f);

		ChildSlot
		[
			SNew(SButton)
			.ButtonStyle(FEditorStyle::Get(), "SimpleSharpButton")
			.ButtonColorAndOpacity(FLinearColor(FColor(40, 40, 40)))
			.OnClicked(this, &SAnchorPreviewWidget::OnAnchorClicked, AnchorsHandle, AlignmentHandle, OffsetsHandle, Anchors)
			.ContentPadding(FMargin(2.0f, 2.0f))
			[
				SNew(SVerticalBox)

				+ SVerticalBox::Slot()
				.AutoHeight()
				[
					SNew(SBorder)
					.BorderImage(FEditorStyle::GetBrush("UMGEditor.AnchorGrid"))
					.Padding(0)
					[
						SNew(SBox)
						.WidthOverride(64)
						.HeightOverride(64)
						.HAlign(HAlign_Center)
						.VAlign(VAlign_Center)
						[
							SNew(SBox)
							.WidthOverride(this, &SAnchorPreviewWidget::GetCurrentWidth)
							.HeightOverride(this, &SAnchorPreviewWidget::GetCurrentHeight)
							[
								SNew(SBorder)
								//.BorderImage(FEditorStyle::GetBrush("NoBrush"))
								//.BorderImage(FEditorStyle::GetBrush("ToolPanel.GroupBorder"))
								//.BorderBackgroundColor
								.Padding(1)
								[
									SNew(SConstraintCanvas)

									+ SConstraintCanvas::Slot()
									.Anchors(Anchors)
									.Offset(FMargin(0, 0, Anchors.IsStretchedHorizontal() ? 0 : 15, Anchors.IsStretchedVertical() ? 0 : 15))
									.Alignment(FVector2D(Anchors.IsStretchedHorizontal() ? 0 : Anchors.Minimum.X, Anchors.IsStretchedVertical() ? 0 : Anchors.Minimum.Y))
									[
										SNew(SImage)
										.Image(FEditorStyle::Get().GetBrush("UMGEditor.AnchoredWidget"))
									]
								]
							]
						]
					]
				]
			]
		];
	}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:60,代码来源:CanvasSlotCustomization.cpp


示例6: check

TSharedRef<SDockTab> FPropertyEditorToolkit::SpawnTab_PropertyTable( const FSpawnTabArgs& Args ) 
{
	check( Args.GetTabId() == GridTabId );

	FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>( "PropertyEditor" );
	TSharedRef<SDockTab> GridToolkitTab = SNew(SDockTab)
		.Icon( FEditorStyle::GetBrush("PropertyEditor.Grid.TabIcon") )
		.Label( LOCTEXT("GenericGridTitle", "Grid") )
		.TabColorScale( GetTabColorScale() )
		.Content()
		[
			SNew( SOverlay )
			+SOverlay::Slot()
			[
				PropertyEditorModule.CreatePropertyTableWidget( PropertyTable.ToSharedRef() )
			]
			+SOverlay::Slot()
			.HAlign( HAlign_Right )
			.VAlign( VAlign_Top )
			.Padding( FMargin( 0, 3, 0, 0 ) )
			[
				SNew( SHorizontalBox )
				+SHorizontalBox::Slot()
				.AutoWidth()
				.HAlign( HAlign_Center )
				.VAlign( VAlign_Center )
				[
					SNew( SImage )
					.Image( FEditorStyle::GetBrush( "PropertyEditor.AddColumnOverlay" ) )
					.Visibility( this, &FPropertyEditorToolkit::GetAddColumnInstructionsOverlayVisibility )
				]

				+SHorizontalBox::Slot()
				.AutoWidth()
				.HAlign( HAlign_Center )
				.VAlign( VAlign_Center )
				[
					SNew( SImage )
					.Image( FEditorStyle::GetBrush( "PropertyEditor.RemoveColumn" ) )
					.Visibility( this, &FPropertyEditorToolkit::GetAddColumnInstructionsOverlayVisibility )
				]

				+SHorizontalBox::Slot()
				.AutoWidth()
				.HAlign( HAlign_Center )
				.VAlign( VAlign_Center )
				.Padding( FMargin( 0, 0, 3, 0 ) )
				[
					SNew( STextBlock )
					.Font( FEditorStyle::GetFontStyle( "PropertyEditor.AddColumnMessage.Font" ) )
					.Text( LOCTEXT("GenericPropertiesTitle", "Pin Properties to Add Columns") )
					.Visibility( this, &FPropertyEditorToolkit::GetAddColumnInstructionsOverlayVisibility )
					.ColorAndOpacity( FEditorStyle::GetColor( "PropertyEditor.AddColumnMessage.ColorAndOpacity" ) )
				]
			]
		];	

	return GridToolkitTab;
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:59,代码来源:PropertyEditorToolkit.cpp


示例7: OnFiltersChanged

void STimeline::Construct(const FArguments& InArgs, TSharedPtr<SVisualLoggerView> VisualLoggerView, TSharedPtr<FVisualLoggerTimeSliderController> TimeSliderController, TSharedPtr<STimelinesContainer> InContainer, const FVisualLogDevice::FVisualLogEntryItem& Entry)
{
	VisualLoggerInterface = InArgs._VisualLoggerInterface.Get();
	OnGetMenuContent = InArgs._OnGetMenuContent;

	Owner = InContainer;
	Name = Entry.OwnerName;

	Entries.Add(Entry);
	OnFiltersChanged();
	
	ULogVisualizerSettings::StaticClass()->GetDefaultObject<ULogVisualizerSettings>()->OnSettingChanged().AddRaw(this, &STimeline::HandleLogVisualizerSettingChanged);


	ChildSlot
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.Padding(FMargin(0, 4, 0, 0))
			.HAlign(HAlign_Fill)
			.VAlign(VAlign_Fill)
			.FillWidth(TAttribute<float>(VisualLoggerView.Get(), &SVisualLoggerView::GetAnimationOutlinerFillPercentage))
			[
				SAssignNew(PopupAnchor, STimelineLabelAnchor, SharedThis(this))
				.OnGetMenuContent(OnGetMenuContent)
				[
					SNew(SBorder)
					.HAlign(HAlign_Fill)
					.Padding(FMargin(0, 0, 4, 0))
					.BorderImage(FCoreStyle::Get().GetBrush("NoBorder"))
					[
						SNew(SBorder)
						.VAlign(VAlign_Center)
						.BorderImage(this, &STimeline::GetBorder)
						.Padding(FMargin(4, 0, 2, 0))
						[
							// Search box for searching through the outliner
							SNew(STextBlock)
							.Text(FString(Name.ToString()))
							.ShadowOffset(FVector2D(1.f, 1.f))
						]
					]
				]
			]
			+ SHorizontalBox::Slot()
			.Padding(FMargin(0, 4, 0, 0))
			.HAlign(HAlign_Left)
			[
				SNew(SBox)
				.Padding(FMargin(0, 0, 0, 0))
				.HAlign(HAlign_Left)
				[
					// Search box for searching through the outliner
					SAssignNew(TimelineBar, STimelineBar, TimeSliderController, SharedThis(this))
					.VisualLoggerInterface(InArgs._VisualLoggerInterface)
				]
			]
		];
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:59,代码来源:STimeline.cpp


示例8: MakeShareable

TSharedPtr< FSlateStyleSet > FSlateFileDialogsStyle::Create()
{
	TSharedPtr< FSlateStyleSet > Style = MakeShareable(new FSlateStyleSet(FSlateFileDialogsStyle::GetStyleSetName()));
	Style->SetContentRoot(FPaths::EngineContentDir());

	const FVector2D Icon10x10(10.0f, 10.0f);
	const FVector2D Icon16x16(16.0f, 16.0f);	
	const FVector2D Icon24x24(24.0f, 24.0f);
	const FVector2D Icon64x64(64.0f, 64.0f);

	const FSlateColor InvertedForeground(FLinearColor(0.0f, 0.0f, 0.0f));
	const FSlateColor SelectionColor(FLinearColor(0.701f, 0.225f, 0.003f));
	const FSlateColor SelectionColor_Inactive(FLinearColor(0.25f, 0.25f, 0.25f));
	const FSlateColor SelectionColor_Pressed(FLinearColor(0.701f, 0.225f, 0.003f));


	// SButton defaults...
	const FButtonStyle Button = FButtonStyle()
		.SetNormal( BOX_BRUSH( "Slate/Common/Button", FVector2D(32,32), 8.0f/32.0f ) )
		.SetHovered( BOX_BRUSH( "Slate/Common/Button_Hovered", FVector2D(32,32), 8.0f/32.0f ) )
		.SetPressed( BOX_BRUSH( "Slate/Common/Button_Pressed", FVector2D(32,32), 8.0f/32.0f ) )
		.SetDisabled( BOX_BRUSH( "Slate/Common/Button_Disabled", 8.0f/32.0f ) )
		.SetNormalPadding( FMargin( 2,2,2,2 ) )
		.SetPressedPadding( FMargin( 2,3,2,1 ) );
	{
		Style->Set( "Button", Button );

		Style->Set( "InvertedForeground", InvertedForeground );
	}

	Style->Set("SlateFileDialogs.Dialog", TTF_FONT("Slate/Fonts/Roboto-Regular", 10));
	Style->Set("SlateFileDialogs.DialogBold", TTF_FONT("Slate/Fonts/Roboto-Bold", 10));
	Style->Set("SlateFileDialogs.DialogLarge", TTF_FONT("Slate/Fonts/Roboto-Bold", 16));
	Style->Set("SlateFileDialogs.DirectoryItem", TTF_FONT("Slate/Fonts/Roboto-Bold", 11));
	Style->Set( "SlateFileDialogs.GroupBorder", new BOX_BRUSH( "Slate/Common/GroupBorder", FMargin(4.0f/16.0f) ) );

	Style->Set("SlateFileDialogs.Folder16", new IMAGE_BRUSH("SlateFileDialogs/Icons/icon_file_folder_16x", Icon16x16));
	Style->Set("SlateFileDialogs.Folder24", new IMAGE_BRUSH("SlateFileDialogs/Icons/icon_file_folder_40x", Icon24x24));
	Style->Set("SlateFileDialogs.NewFolder24", new IMAGE_BRUSH("SlateFileDialogs/Icons/icon_new_folder_40x", Icon24x24));		
	Style->Set("SlateFileDialogs.WhiteBackground", new IMAGE_BRUSH("SlateFileDialogs/Common/Window/WindowWhite", Icon64x64));

	Style->Set( "SlateFileDialogs.PathDelimiter", new IMAGE_BRUSH( "SlateFileDialogs/Common/SmallArrowRight", Icon10x10 ) );

	Style->Set( "SlateFileDialogs.PathText", FTextBlockStyle()
		.SetFont( TTF_FONT( "Slate/Fonts/Roboto-Bold", 11 ) )
		.SetColorAndOpacity( FLinearColor( 1.0f, 1.0f, 1.0f ) )
		.SetHighlightColor( FLinearColor( 1.0f, 1.0f, 1.0f ) )
		.SetHighlightShape(BOX_BRUSH("Slate/Common/TextBlockHighlightShape", FMargin(3.f /8.f)))
		.SetShadowOffset( FVector2D( 1,1 ) )
		.SetShadowColorAndOpacity( FLinearColor(0,0,0,0.9f) ) );

	Style->Set("SlateFileDialogs.FlatButton", FButtonStyle(Button)
		.SetNormal(FSlateNoResource())
		.SetHovered(BOX_BRUSH("SlateFileDialogs/Common/FlatButton", 2.0f / 8.0f, SelectionColor))
		.SetPressed(BOX_BRUSH("SlateFileDialogs/Common/FlatButton", 2.0f / 8.0f, SelectionColor_Pressed))
		);

	return Style;	
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:59,代码来源:SlateFileDialogsStyles.cpp


示例9: MakeLightingDensityMenu

		/** Generates a lighting density sub-menu */
		static void MakeLightingDensityMenu( FMenuBuilder& InMenuBuilder )
		{
			InMenuBuilder.BeginSection("LevelEditorBuildLightingDensity", LOCTEXT( "LightingDensityHeading", "Density Rendering" ) );
			{
				TSharedRef<SWidget> Ideal =		SNew(SHorizontalBox)
												+SHorizontalBox::Slot()
												.Padding( FMargin( 27.0f, 0.0f, 0.0f, 0.0f ) )
												.FillWidth(1.0f)
												[
													SNew(SSpinBox<float>)
													.MinValue(0.f)
													.MaxValue(100.f)
													.Value(FLevelEditorActionCallbacks::GetLightingDensityIdeal())
													.OnValueChanged_Static(&FLevelEditorActionCallbacks::SetLightingDensityIdeal)
												];
				InMenuBuilder.AddWidget(Ideal, LOCTEXT("LightingDensity_Ideal","Ideal Density"));
				
				TSharedRef<SWidget> Maximum =	SNew(SHorizontalBox)
												+SHorizontalBox::Slot()
												.FillWidth(1.0f)
												[
													SNew(SSpinBox<float>)
													.MinValue(0.01f)
													.MaxValue(100.01f)
													.Value(FLevelEditorActionCallbacks::GetLightingDensityMaximum())
													.OnValueChanged_Static(&FLevelEditorActionCallbacks::SetLightingDensityMaximum)
												];
				InMenuBuilder.AddWidget(Maximum, LOCTEXT("LightingDensity_Maximum","Maximum Density"));

				TSharedRef<SWidget> ClrScale =	SNew(SHorizontalBox)
												+SHorizontalBox::Slot()
												.Padding( FMargin( 35.0f, 0.0f, 0.0f, 0.0f ) )
												.FillWidth(1.0f)
												[
													SNew(SSpinBox<float>)
													.MinValue(0.f)
													.MaxValue(10.f)
													.Value(FLevelEditorActionCallbacks::GetLightingDensityColorScale())
													.OnValueChanged_Static(&FLevelEditorActionCallbacks::SetLightingDensityColorScale)
												];
				InMenuBuilder.AddWidget(ClrScale, LOCTEXT("LightingDensity_ColorScale","Color Scale"));

				TSharedRef<SWidget> GrayScale =	SNew(SHorizontalBox)
												+SHorizontalBox::Slot()
												.Padding( FMargin( 11.0f, 0.0f, 0.0f, 0.0f ) )
												.FillWidth(1.0f)
												[
													SNew(SSpinBox<float>)
													.MinValue(0.f)
													.MaxValue(10.f)
													.Value(FLevelEditorActionCallbacks::GetLightingDensityGrayscaleScale())
													.OnValueChanged_Static(&FLevelEditorActionCallbacks::SetLightingDensityGrayscaleScale)
												];
				InMenuBuilder.AddWidget(GrayScale, LOCTEXT("LightingDensity_GrayscaleScale","Grayscale Scale"));

				InMenuBuilder.AddMenuEntry( FLevelEditorCommands::Get().LightingDensity_RenderGrayscale );
			}
			InMenuBuilder.EndSection();
		}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:60,代码来源:LevelEditorToolBar.cpp


示例10: SNew

void SSessionConsoleCommandBar::Construct( const FArguments& InArgs )
{
    OnCommandSubmitted = InArgs._OnCommandSubmitted;
    OnPromoteToShortcutClicked = InArgs._OnPromoteToShortcutClicked;

    ChildSlot
    [
        SNew(SHorizontalBox)

        + SHorizontalBox::Slot()
        .FillWidth(1.0f)
        [
            // command input
            SAssignNew(InputTextBox, SSuggestionTextBox)
            .ClearKeyboardFocusOnCommit(false)
            .OnShowingHistory(this, &SSessionConsoleCommandBar::HandleInputTextShowingHistory)
            .OnShowingSuggestions(this, &SSessionConsoleCommandBar::HandleInputTextShowingSuggestions)
            .OnTextChanged(this, &SSessionConsoleCommandBar::HandleInputTextChanged)
            .OnTextCommitted(this, &SSessionConsoleCommandBar::HandleInputTextCommitted)
        ]

        + SHorizontalBox::Slot()
        .AutoWidth()
        .Padding(4.0f, 0.0f, 0.0f, 0.0f)
        [
            // send button
            SAssignNew(SendButton, SButton)
            .ContentPadding(FMargin(6.0f, 2.0f))
            .IsEnabled(false)
            .OnClicked(this, &SSessionConsoleCommandBar::HandleSendButtonClicked)
            .ToolTipText(LOCTEXT("SendButtonTooltip", "Send the command"))
            [
                SNew(STextBlock)
                .Text(LOCTEXT("SendButtonLabel", "Send Command"))
            ]
        ]

        + SHorizontalBox::Slot()
        .AutoWidth()
        .Padding(4.0f, 0.0f, 0.0f, 0.0f)
        [
            // send button
            SAssignNew(PromoteToShortcutButton, SButton)
            .ContentPadding(FMargin(6.0f, 2.0f))
            .IsEnabled(false)
            .OnClicked(this, &SSessionConsoleCommandBar::HandlePromoteToShortcutButtonClicked)
            .ToolTipText(LOCTEXT("PromoteConsoleCommandButtonTooltip", "Promote Command to Shortcut"))
            [
                SNew(STextBlock)
                .Text(LOCTEXT("PromoteConsoleCommandButtonLabel", "Promote to Shortcut"))
            ]
        ]
    ];
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:54,代码来源:SSessionConsoleCommandBar.cpp


示例11: FMargin

void SSafeZone::SetTitleSafe( bool bIsTitleSafe )
{
	FDisplayMetrics Metrics;
	FSlateApplication::Get().GetDisplayMetrics( Metrics );

	if ( bIsTitleSafe )
	{
		SafeMargin = FMargin( Metrics.TitleSafePaddingSize.X, Metrics.TitleSafePaddingSize.Y );
	}
	else
	{
		SafeMargin = FMargin( Metrics.ActionSafePaddingSize.X, Metrics.ActionSafePaddingSize.Y );
	}
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:14,代码来源:SSafeZone.cpp


示例12: MakeShareable

TSharedRef< FSlateStyleSet > FFriendsAndChatModuleStyle::Create(FFriendsAndChatStyle FriendStyle)
{
	TSharedRef< FSlateStyleSet > Style = MakeShareable(new FSlateStyleSet("FriendsAndChatStyle"));

	const FTextBlockStyle DefaultText = FTextBlockStyle()
		.SetFont(FriendStyle.FriendsFontStyleSmall);

	// Name Style
	const FTextBlockStyle GlobalChatFont = FTextBlockStyle(DefaultText)
		.SetFont(FriendStyle.FriendsFontStyleSmallBold)
		.SetColorAndOpacity(FriendStyle.DefaultChatColor);

	const FTextBlockStyle PartyChatFont = FTextBlockStyle(DefaultText)
		.SetFont(FriendStyle.FriendsFontStyleSmallBold)
		.SetColorAndOpacity(FriendStyle.PartyChatColor);

	const FTextBlockStyle WhisperChatFont = FTextBlockStyle(DefaultText)
		.SetFont(FriendStyle.FriendsFontStyleSmallBold)
		.SetColorAndOpacity(FriendStyle.WhisplerChatColor);

	const FButtonStyle UserNameButton = FButtonStyle()
		.SetNormal(FSlateNoResource())
		.SetPressed(FSlateNoResource())
		.SetHovered(FSlateNoResource());

	const FHyperlinkStyle GlobalChatHyperlink = FHyperlinkStyle()
		.SetUnderlineStyle(UserNameButton)
		.SetTextStyle(GlobalChatFont)
		.SetPadding(FMargin(0.0f));

	const FHyperlinkStyle PartyChatHyperlink = FHyperlinkStyle()
		.SetUnderlineStyle(UserNameButton)
		.SetTextStyle(PartyChatFont)
		.SetPadding(FMargin(0.0f));

	const FHyperlinkStyle WhisperChatHyperlink = FHyperlinkStyle()
		.SetUnderlineStyle(UserNameButton)
		.SetTextStyle(WhisperChatFont)
		.SetPadding(FMargin(0.0f));

	Style->Set("UserNameTextStyle.GlobalHyperlink", GlobalChatHyperlink);
	Style->Set("UserNameTextStyle.PartyHyperlink", PartyChatHyperlink);
	Style->Set("UserNameTextStyle.Whisperlink", WhisperChatHyperlink);
	Style->Set("UserNameTextStyle.GlobalTextStyle", GlobalChatFont);
	Style->Set("UserNameTextStyle.PartyTextStyle", PartyChatFont);
	Style->Set("UserNameTextStyle.WhisperTextStyle", WhisperChatFont);

	return Style;
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:49,代码来源:FriendsAndChatStyle.cpp


示例13: GenerateWidgetForColumn

	virtual TSharedRef<SWidget> GenerateWidgetForColumn(const FName& ColumnName) override
	{
		if (ColumnName == TEXT("Quality Option"))
		{
			return	SNew(SBox)
				.HeightOverride(20)
				.Padding(FMargin(3, 0))
				.VAlign(VAlign_Center)
				[
					SNew(STextBlock)
					.Text(FText::FromString(Item->RangeName))
					.Font(IDetailLayoutBuilder::GetDetailFont())
				];
		}
		else
		{
			EMaterialQualityLevel::Type MaterialQualityLevel = EMaterialQualityLevel::Num;

			if (ColumnName == TEXT("Low"))
			{
				MaterialQualityLevel = EMaterialQualityLevel::Low;
			}
			else if (ColumnName == TEXT("Medium"))
			{
				MaterialQualityLevel = EMaterialQualityLevel::Medium;
			}
			else if (ColumnName == TEXT("High"))
			{
				MaterialQualityLevel = EMaterialQualityLevel::High;
			}

			if (MaterialQualityLevel < EMaterialQualityLevel::Num)
			{
				return	SNew(SBox)
					.HeightOverride(20)
					.Padding(FMargin(3, 0))
					.VAlign(VAlign_Center)
					[
						SNew(SCheckBox)
						.OnCheckStateChanged(this, &SQualityListItem::OnQualityRangeChanged, MaterialQualityLevel)
						.IsChecked(this, &SQualityListItem::IsQualityRangeSet, MaterialQualityLevel)
						.IsEnabled(this, &SQualityListItem::IsEnabled, MaterialQualityLevel)
					];
			}
		}
	
		return SNullWidget::NullWidget;
	}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:48,代码来源:MaterialShaderQualitySettingsCustomization.cpp


示例14: SNew

void FLandscapeEditorStructCustomization_FGizmoImportLayer::CustomizeStructChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& ChildBuilder, IStructCustomizationUtils& StructCustomizationUtils)
{
	TSharedRef<IPropertyHandle> PropertyHandle_LayerFilename = StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FGizmoImportLayer, LayerFilename)).ToSharedRef();
	ChildBuilder.AddChildProperty(PropertyHandle_LayerFilename)
	.CustomWidget()
	.NameContent()
	[
		PropertyHandle_LayerFilename->CreatePropertyNameWidget()
	]
	.ValueContent()
	.MinDesiredWidth(250.0f)
	.MaxDesiredWidth(0)
	[
		SNew(SHorizontalBox)
		+ SHorizontalBox::Slot()
		[
			PropertyHandle_LayerFilename->CreatePropertyValueWidget()
		]
		+ SHorizontalBox::Slot()
		.AutoWidth()
		//.Padding(0,0,12,0) // Line up with the other properties due to having no reset to default button
		[
			SNew(SButton)
			.ContentPadding(FMargin(4, 0))
			.Text(NSLOCTEXT("UnrealEd", "GenericOpenDialog", "..."))
			.OnClicked_Static(&FLandscapeEditorStructCustomization_FGizmoImportLayer::OnGizmoImportLayerFilenameButtonClicked, PropertyHandle_LayerFilename)
		]
	];

	TSharedRef<IPropertyHandle> PropertyHandle_LayerName = StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FGizmoImportLayer, LayerName)).ToSharedRef();
	ChildBuilder.AddChildProperty(PropertyHandle_LayerName);
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:32,代码来源:LandscapeEditorDetailCustomization_CopyPaste.cpp


示例15: DetailsViewArgs

void SFacialAnimationBulkImporter::Construct(const FArguments& InArgs)
{
	FDetailsViewArgs DetailsViewArgs(false, false, true, FDetailsViewArgs::HideNameArea);

	FPropertyEditorModule& PropertyEditorModule = FModuleManager::Get().GetModuleChecked<FPropertyEditorModule>("PropertyEditor");
	TSharedRef<IDetailsView> DetailsView = PropertyEditorModule.CreateDetailView(DetailsViewArgs);
	DetailsView->SetObject(GetMutableDefault<UFacialAnimationBulkImporterSettings>());

	ChildSlot
	[
		SNew(SVerticalBox)
		+SVerticalBox::Slot()
		.FillHeight(1.0f)
		[
			DetailsView
		]
		+SVerticalBox::Slot()
		.AutoHeight()
		.HAlign(HAlign_Right)
		.Padding(4.0f)
		[
			SNew(SButton)
			.ButtonStyle(FEditorStyle::Get(), "FlatButton.Success")
			.ForegroundColor(FLinearColor::White)
			.ContentPadding(FMargin(6, 2))
			.IsEnabled(this, &SFacialAnimationBulkImporter::IsImportButtonEnabled)
			.OnClicked(this, &SFacialAnimationBulkImporter::HandleImportClicked)
			[
				SNew(STextBlock)
				.TextStyle(FEditorStyle::Get(), "ContentBrowser.TopBar.Font")
				.Text(LOCTEXT("ImportAllButton", "Import All"))
			]
		]
	];
}
开发者ID:AndyHuang7601,项目名称:EpicGames-UnrealEngine,代码行数:35,代码来源:SFacialAnimationBulkImporter.cpp


示例16: SNew

void SAnimCompositePanel::Construct(const FArguments& InArgs)
{
	SAnimTrackPanel::Construct( SAnimTrackPanel::FArguments()
		.WidgetWidth(InArgs._WidgetWidth)
		.ViewInputMin(InArgs._ViewInputMin)
		.ViewInputMax(InArgs._ViewInputMax)
		.InputMin(InArgs._InputMin)
		.InputMax(InArgs._InputMax)
		.OnSetInputViewRange(InArgs._OnSetInputViewRange));

	Composite = InArgs._Composite;
	CompositeEditor = InArgs._CompositeEditor;

	this->ChildSlot
	[
		SNew(SVerticalBox)
		+SVerticalBox::Slot()
		.FillHeight(1)
		[
			SNew( SExpandableArea )
			.AreaTitle( LOCTEXT( "CompositeLabel", "Composite" ) )
			.BodyContent()
			[
				SAssignNew( PanelArea, SBorder )
				.BorderImage( FEditorStyle::GetBrush("NoBorder") )
				.Padding( FMargin(2.0f, 2.0f) )
				.ColorAndOpacity( FLinearColor::White )
			]
		]
	];

	Update();
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:33,代码来源:SAnimCompositePanel.cpp


示例17: SNew

TSharedRef<SWidget> SVectorInputBox::BuildDecoratorLabel(FLinearColor BackgroundColor, FLinearColor ForegroundColor, FText Label)
{
	TSharedRef<SWidget> LabelWidget = SNumericEntryBox<float>::BuildLabel(Label, ForegroundColor, BackgroundColor);

	TSharedRef<SWidget> ResultWidget = LabelWidget;
	
	if (bCanBeCrushed)
	{
		ResultWidget =
			SNew(SWidgetSwitcher)
			.WidgetIndex(this, &SVectorInputBox::GetLabelActiveSlot)
			+SWidgetSwitcher::Slot()
			[
				LabelWidget
			]
			+SWidgetSwitcher::Slot()
			[
				SNew(SBorder)
				.BorderImage(FCoreStyle::Get().GetBrush("NumericEntrySpinBox.NarrowDecorator"))
				.BorderBackgroundColor(BackgroundColor)
				.ForegroundColor(ForegroundColor)
				.VAlign(VAlign_Center)
				.HAlign(HAlign_Left)
				.Padding(FMargin(5.0f, 0.0f, 0.0f, 0.0f))
			];
	}

	return ResultWidget;
}
开发者ID:colwalder,项目名称:unrealengine,代码行数:29,代码来源:SVectorInputBox.cpp


示例18: SNew

void FIOSTargetSettingsCustomization::BuildImageRow(IDetailLayoutBuilder& DetailLayout, IDetailCategoryBuilder& Category, const FPlatformIconInfo& Info, const FVector2D& MaxDisplaySize)
{
	const FString AutomaticImagePath = EngineGraphicsPath / Info.IconPath;
	const FString TargetImagePath = GameGraphicsPath / Info.IconPath;

	Category.AddCustomRow(Info.IconName.ToString())
		.NameContent()
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.Padding(FMargin(0, 1, 0, 1))
			.FillWidth(1.0f)
			[
				SNew(STextBlock)
				.Text(Info.IconName)
				.Font(DetailLayout.GetDetailFont())
			]
		]
		.ValueContent()
		.MaxDesiredWidth(400.0f)
		.MinDesiredWidth(100.0f)
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.FillWidth(1.0f)
			.VAlign(VAlign_Center)
			[
				SNew(SExternalImageReference, AutomaticImagePath, TargetImagePath)
				.FileDescription(Info.IconDescription)
				.RequiredSize(Info.IconRequiredSize)
				.MaxDisplaySize(MaxDisplaySize)
			]
		];
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:34,代码来源:IOSTargetSettingsCustomization.cpp


示例19: SNew

void SSourceControlPicker::Construct(const FArguments& InArgs)
{
	ChildSlot
	[
		SNew( SBorder )
		.BorderImage( FEditorStyle::GetBrush("DetailsView.CategoryTop") )
		.Padding( FMargin( 0.0f, 3.0f, 1.0f, 0.0f ) )
		[
			SNew(SHorizontalBox)
			+SHorizontalBox::Slot()
			.VAlign(VAlign_Center)
			.FillWidth(1.0f)
			.Padding(2.0f)
			[
				SNew( STextBlock )
				.Text( LOCTEXT("ProviderLabel", "Provider") )
				.Font( FEditorStyle::GetFontStyle(TEXT("SourceControl.LoginWindow.Font")) )
			]
			+SHorizontalBox::Slot()
			.FillWidth(2.0f)
			[
				SNew(SComboButton)
				.OnGetMenuContent(this, &SSourceControlPicker::OnGetMenuContent)
				.ContentPadding(1)
				.ToolTipText( LOCTEXT("ChooseProvider", "Choose the source control provider you want to use before you edit login settings.") )
				.ButtonContent()
				[
					SNew( STextBlock )
					.Text( this, &SSourceControlPicker::OnGetButtonText )
					.Font( FEditorStyle::GetFontStyle(TEXT("SourceControl.LoginWindow.Font")) )
				]
			]
		]
	];
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:35,代码来源:SSourceControlPicker.cpp


示例20: SNew

TSharedRef<SBorder> SPropertyTableCell::ConstructInvalidPropertyWidget()
{
	return 
		SNew(SBorder)
		.BorderImage(FEditorStyle::GetBrush( Style, ".ReadOnlyEditModeCellBorder"))
		.VAlign(VAlign_Center)
		.Padding(0)
		.Content()
		[
			SNew(SHorizontalBox)
			+SHorizontalBox::Slot()
			.AutoWidth()
			.Padding(FMargin(0.0f, 0.0f, 4.0f, 0.0f))
			[
				SNew(SImage)
				.Image(FEditorStyle::GetBrush("Icons.Error"))
			]
			+SHorizontalBox::Slot()
			[
				SNew(STextBlock)
				.ColorAndOpacity(FLinearColor::Red)
				.Text(NSLOCTEXT("PropertyEditor", "InvalidTableCellProperty", "Failed to retrieve value"))
			]
		];
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:25,代码来源:SPropertyTableCell.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FN函数代码示例发布时间:2022-05-30
下一篇:
C++ FMS函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap