AssoAndrea

Untitled

Jun 17th, 2022
768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.31 KB | None | 0 0
  1. TSharedPtr<SDockTab> Window = SNew(SDockTab)
  2.         .TabRole(ETabRole::MajorTab)
  3.         [
  4.             SNew(SSplitter).Orientation(Orient_Horizontal)
  5.             +SSplitter::Slot().Value(0.25f)
  6.             [
  7.                 SNew(SVerticalBox)
  8.                 +SVerticalBox::Slot().AutoHeight()
  9.                 [
  10.                     SNew(SHorizontalBox)
  11.                     + SHorizontalBox::Slot().AutoWidth()
  12.                     .HAlign(EHorizontalAlignment::HAlign_Center)
  13.                     .VAlign(EVerticalAlignment::VAlign_Center)
  14.                     [
  15.                         SNew(STextBlock)
  16.                        
  17.                         .Text(FText::FromString(TEXT("Default Wall")))
  18.                     ]
  19.                     +SHorizontalBox::Slot().HAlign(EHorizontalAlignment::HAlign_Right).Padding(0,0,10,0)
  20.                     [
  21.                         SNew(SObjectPropertyEntryBox)
  22.                         .AllowedClass(UBlueprint::StaticClass())
  23.                         .ObjectPath_Lambda([this]()->FString {return WallPath.GetAsset()->GetPathName();})
  24.                         .OnObjectChanged_Lambda([this](const FAssetData& Data)->void {WallPath = Data; })
  25.                         .ThumbnailPool(MyThumbnailPool)
  26.                         .DisplayThumbnail(true)
  27.                     ]
  28.                 ]
  29.                 + SVerticalBox::Slot().AutoHeight()
  30.                     [
  31.                         SNew(SHorizontalBox)
  32.                         + SHorizontalBox::Slot().AutoWidth()
  33.                         .HAlign(EHorizontalAlignment::HAlign_Center)
  34.                         .VAlign(EVerticalAlignment::VAlign_Center)
  35.                         [
  36.                             SNew(STextBlock)
  37.                             .Text(FText::FromString(TEXT("Destructible Wall")))
  38.                         ]
  39.                         + SHorizontalBox::Slot().HAlign(EHorizontalAlignment::HAlign_Right).Padding(0, 0, 10, 0)
  40.                         [
  41.                             SNew(SObjectPropertyEntryBox)
  42.                             .AllowedClass(UBlueprint::StaticClass())
  43.                             .ObjectPath_Lambda([this]()->FString {return DestructibleWallPath.GetAsset()->GetPathName(); })
  44.                             .OnObjectChanged_Lambda([this](const FAssetData& Data)->void {DestructibleWallPath = Data; })
  45.                             .ThumbnailPool(MyThumbnailPool)
  46.                             .DisplayThumbnail(true)
  47.                         ]
  48.                        
  49.                     ]
  50.                 + SVerticalBox::Slot().AutoHeight()
  51.                     [
  52.                         SNew(SHorizontalBox)
  53.                         + SHorizontalBox::Slot().AutoWidth()
  54.                         .HAlign(EHorizontalAlignment::HAlign_Center)
  55.                         .VAlign(EVerticalAlignment::VAlign_Center)
  56.                         [
  57.                             SNew(STextBlock).Text(FText::FromString(TEXT("Floor")))
  58.                         ]
  59.                         + SHorizontalBox::Slot().HAlign(EHorizontalAlignment::HAlign_Right).Padding(0, 0, 10, 0)
  60.                         [
  61.                             SNew(SObjectPropertyEntryBox)
  62.                             .AllowedClass(UBlueprint::StaticClass())
  63.                             .ObjectPath_Lambda([this]()->FString {return FloorPath.GetAsset()->GetPathName(); })
  64.                             .OnObjectChanged_Lambda([this](const FAssetData& Data)->void {FloorPath = Data; })
  65.                             .ThumbnailPool(MyThumbnailPool)
  66.                             .DisplayThumbnail(true)
  67.                         ]
  68.                     ]
  69.                 + SVerticalBox::Slot().AutoHeight()
  70.                 [
  71.                     SNew(SButton)
  72.                     .Text(FText::FromString(TEXT("Select Texture")))
  73.                     .OnClicked(FOnClicked::CreateRaw(this,&FCustomViewportModule::OnSelectPath))
  74.                     /*.OnPathPicked(SDirectoryPicker::FOnDirectoryChanged::CreateRaw(this, &FCustomViewportModule::DirectoryChanged))*/
  75.                 ]
  76.                 +SVerticalBox::Slot().AutoHeight()
  77.                 [
  78.                     SNew(SButton)
  79.                     .Text(FText::FromString(TEXT("Update Preview")))
  80.                     .OnClicked(FOnClicked::CreateRaw(this,&FCustomViewportModule::OnUpdateClick))
  81.                 ]
  82.                 + SVerticalBox::Slot().AutoHeight()
  83.                 [
  84.                     SNew(SButton).Text(FText::FromString(TEXT("Generate Level")))
  85.                     .OnClicked(FOnClicked::CreateRaw(this, &FCustomViewportModule::OnGenerateClick))
  86.                 ]
  87.             ]
  88.             + SSplitter::Slot()
  89.             [
  90.                 MyViewport.ToSharedRef()
  91.             ]
  92.         ];
Advertisement
Add Comment
Please, Sign In to add comment