zoukankan      html  css  js  c++  java
  • 创建与消除弹窗

    //创建弹窗
    int textureMappingWith = 700;
           int textureMappingHeight = 500;
           TSharedPtr<SWindow> textureMapping = SNew(SWindow)
                  .AutoCenter(EAutoCenter::PreferredWorkArea)
                  .Title(LOCTEXT("材质框", "材质框"))
                  .SizingRule(ESizingRule::FixedSize)
                  .SupportsMaximize(false)
                  .SupportsMinimize(false).HasCloseButton(true)
                  .ClientSize(FVector2D(textureMappingWith, textureMappingHeight))
                  .CreateTitleBar(false);
    //创建弹窗内容
           
    TSharedPtr< SWidget > content =
                  SNew(SVerticalBox)
                  + SVerticalBox::Slot()
                  .AutoHeight()
                  [
                         
    SNew(SBox)
                         .HeightOverride(20)
                         [
                               SNew(SWindowTitleBarArea)//窗口标题,可以将窗口随意拖动
                                      .Content()
                                      [
                                             SNew(SVerticalBox)
                                             + SVerticalBox::Slot()
                                             .HAlign(HAlign_Right)
                                             [
                                             SNew(SButton)
                                             .Text(LOCTEXT("CloseWindows", "X"))
                                             .OnClicked(this, &FEditorModeTestEdModeToolkit::CloseWindows)
                                             ]
                                      ]
                         ]
                         //SNew(SComboBox)
                  ];
    //将弹窗内容添加到弹框中
           textureMapping->SetContent(content.ToSharedRef());
    //显示弹窗
           FSlateApplication::Get().AddWindow(textureMapping.ToSharedRef());
  • 相关阅读:
    TreeSet集合的add()方法的源码解析
    Ubuntu下定时任务和自启动任务的部署
    基于Django的独立运行脚本开发
    python做量化交易干货分享
    使用Glide以及OkHttp集成
    Redis实现简单消息队列
    Linux下高并发socket最大连接数
    Ubuntu14.04部署pyspider的过程
    pymongo "ServerSelectionTimeoutError: No servers found yet" 错误的解决
    gitolite服务器部署中的一些坑
  • 原文地址:https://www.cnblogs.com/huojiaoqingchun0123/p/6955492.html
Copyright © 2011-2022 走看看