Advertisement

在窗口中添加SWindow

阅读量:

首先需要自行设定一个窗口

复制代码
 TSharedRef<SWindow> Window = SNew(SWindow)

    
 		.Title(LOCTEXT("WindowTitle", "Alembic Cache Import Options"))
    
 		.SizingRule(ESizingRule::FixedSize)
    
 		.ClientSize(FVector2D(1000.f, 700.f))
    
 		.AutoCenter(EAutoCenter::PreferredWorkArea)
    
 		.ScreenPosition(FVector2D(0,0))
    
 		.IsEnabled(true)
    
 		.SupportsMinimize(true)
    
 		.SupportsMaximize(true);
    
  
    
 	Window->SetContent
    
 	(
    
 		SNew(SImage)
    
 	);
    
    
    
    

在此处,可通过调用FSlateApplication::Get()函数来创建该窗口,无论是采用AddModalWindow方法还是AddWindow方法均能实现此目的。

复制代码
  /*T

全部评论 (0)

还没有任何评论哟~