You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Framework/MultiBox/SHeadingBlock.h"
|
|
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param InHeadingText Heading text
|
|
*/
|
|
FHeadingBlock::FHeadingBlock( const FName& InExtensionHook, const TAttribute< FText >& InHeadingText )
|
|
: FMultiBlock( NULL, NULL, InExtensionHook, EMultiBlockType::Heading )
|
|
, HeadingText( InHeadingText )
|
|
{
|
|
}
|
|
|
|
|
|
/**
|
|
* Allocates a widget for this type of MultiBlock. Override this in derived classes.
|
|
*
|
|
* @return MultiBlock widget object
|
|
*/
|
|
TSharedRef< class IMultiBlockBaseWidget > FHeadingBlock::ConstructWidget() const
|
|
{
|
|
return SNew( SHeadingBlock );
|
|
}
|
|
|
|
|
|
/**
|
|
* Construct this widget
|
|
*
|
|
* @param InArgs The declaration data for this widget
|
|
*/
|
|
void SHeadingBlock::Construct( const FArguments& InArgs )
|
|
{
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* Builds this MultiBlock widget up from the MultiBlock associated with it
|
|
*/
|
|
void SHeadingBlock::BuildMultiBlockWidget(const ISlateStyle* StyleSet, const FName& StyleName)
|
|
{
|
|
TSharedRef< const FHeadingBlock > HeadingBlock = StaticCastSharedRef< const FHeadingBlock >( MultiBlock.ToSharedRef() );
|
|
|
|
// Add this widget to the search list of the multibox
|
|
if (MultiBlock->GetSearchable())
|
|
OwnerMultiBoxWidget.Pin()->AddSearchElement(this->AsWidget(), FText::GetEmpty());
|
|
|
|
ChildSlot
|
|
.Padding( 2.0f )
|
|
[
|
|
SNew( STextBlock )
|
|
.Text( HeadingBlock->HeadingText )
|
|
.TextStyle( StyleSet, ISlateStyle::Join( StyleName, ".Heading" ) )
|
|
];
|
|
}
|