Exemplo n.º 1
0
        //============================================================
        // <T>创建层。</T>
        //
        // @return 层
        //============================================================
        public FDxLayer CreateLayer()
        {
            FDxLayer result = new FDxLayer();

            result.Device = this;
            result.Setup();
            return(result);
        }
Exemplo n.º 2
0
        //============================================================
        // <T>创建层。</T>
        //
        // @param width 宽度
        // @param height 高度
        // @return 层
        //============================================================
        public FDxLayer CreateLayer(float width, float height)
        {
            FDxLayer result = new FDxLayer();

            result.Device = this;
            result.Size.Set(width, height);
            result.Setup();
            return(result);
        }
Exemplo n.º 3
0
        //============================================================
        // <T>创建层。</T>
        //
        // @param size 大小
        // @return 层
        //============================================================
        public FDxLayer CreateLayer(SFloatSize size)
        {
            FDxLayer result = new FDxLayer();

            result.Device = this;
            result.Size.Assign(size);
            result.Setup();
            return(result);
        }
Exemplo n.º 4
0
 //============================================================
 // <T>配置处理。</T>
 //
 // @param args 参数
 //============================================================
 public override void OnSetup(SUiSetupArgs args)
 {
     base.OnSetup(args);
     // 配置设计器
     if (args.context.OptionDesign)
     {
         _designer = new FUiControlDesigner();
         _designer.Setup(args);
         _designer.Control = this;
     }
     // 配置层
     _deviceLayer = _context.Device.CreateLayer();
     // 配置前景
     SetupResource(_foreResource);
     // 配置背景
     //SetupResource(_groundResource);
     // 配置后景
     SetupResource(_backResource);
 }