Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TSharedPtr<SDockTab> Window = SNew(SDockTab)
- .TabRole(ETabRole::MajorTab)
- [
- SNew(SSplitter).Orientation(Orient_Horizontal)
- +SSplitter::Slot().Value(0.25f)
- [
- SNew(SVerticalBox)
- +SVerticalBox::Slot().AutoHeight()
- [
- SNew(SHorizontalBox)
- + SHorizontalBox::Slot().AutoWidth()
- .HAlign(EHorizontalAlignment::HAlign_Center)
- .VAlign(EVerticalAlignment::VAlign_Center)
- [
- SNew(STextBlock)
- .Text(FText::FromString(TEXT("Default Wall")))
- ]
- +SHorizontalBox::Slot().HAlign(EHorizontalAlignment::HAlign_Right).Padding(0,0,10,0)
- [
- SNew(SObjectPropertyEntryBox)
- .AllowedClass(UBlueprint::StaticClass())
- .ObjectPath_Lambda([this]()->FString {return WallPath.GetAsset()->GetPathName();})
- .OnObjectChanged_Lambda([this](const FAssetData& Data)->void {WallPath = Data; })
- .ThumbnailPool(MyThumbnailPool)
- .DisplayThumbnail(true)
- ]
- ]
- + SVerticalBox::Slot().AutoHeight()
- [
- SNew(SHorizontalBox)
- + SHorizontalBox::Slot().AutoWidth()
- .HAlign(EHorizontalAlignment::HAlign_Center)
- .VAlign(EVerticalAlignment::VAlign_Center)
- [
- SNew(STextBlock)
- .Text(FText::FromString(TEXT("Destructible Wall")))
- ]
- + SHorizontalBox::Slot().HAlign(EHorizontalAlignment::HAlign_Right).Padding(0, 0, 10, 0)
- [
- SNew(SObjectPropertyEntryBox)
- .AllowedClass(UBlueprint::StaticClass())
- .ObjectPath_Lambda([this]()->FString {return DestructibleWallPath.GetAsset()->GetPathName(); })
- .OnObjectChanged_Lambda([this](const FAssetData& Data)->void {DestructibleWallPath = Data; })
- .ThumbnailPool(MyThumbnailPool)
- .DisplayThumbnail(true)
- ]
- ]
- + SVerticalBox::Slot().AutoHeight()
- [
- SNew(SHorizontalBox)
- + SHorizontalBox::Slot().AutoWidth()
- .HAlign(EHorizontalAlignment::HAlign_Center)
- .VAlign(EVerticalAlignment::VAlign_Center)
- [
- SNew(STextBlock).Text(FText::FromString(TEXT("Floor")))
- ]
- + SHorizontalBox::Slot().HAlign(EHorizontalAlignment::HAlign_Right).Padding(0, 0, 10, 0)
- [
- SNew(SObjectPropertyEntryBox)
- .AllowedClass(UBlueprint::StaticClass())
- .ObjectPath_Lambda([this]()->FString {return FloorPath.GetAsset()->GetPathName(); })
- .OnObjectChanged_Lambda([this](const FAssetData& Data)->void {FloorPath = Data; })
- .ThumbnailPool(MyThumbnailPool)
- .DisplayThumbnail(true)
- ]
- ]
- + SVerticalBox::Slot().AutoHeight()
- [
- SNew(SButton)
- .Text(FText::FromString(TEXT("Select Texture")))
- .OnClicked(FOnClicked::CreateRaw(this,&FCustomViewportModule::OnSelectPath))
- /*.OnPathPicked(SDirectoryPicker::FOnDirectoryChanged::CreateRaw(this, &FCustomViewportModule::DirectoryChanged))*/
- ]
- +SVerticalBox::Slot().AutoHeight()
- [
- SNew(SButton)
- .Text(FText::FromString(TEXT("Update Preview")))
- .OnClicked(FOnClicked::CreateRaw(this,&FCustomViewportModule::OnUpdateClick))
- ]
- + SVerticalBox::Slot().AutoHeight()
- [
- SNew(SButton).Text(FText::FromString(TEXT("Generate Level")))
- .OnClicked(FOnClicked::CreateRaw(this, &FCustomViewportModule::OnGenerateClick))
- ]
- ]
- + SSplitter::Slot()
- [
- MyViewport.ToSharedRef()
- ]
- ];
Advertisement
Add Comment
Please, Sign In to add comment