예제 #1
0
        public CacheObjectField(CacheGroupEditor editor)
        {
            this.Editor = editor;

            this._PrefabField = new ObjectField <GameObject>()
            {
                Row = 0, Column = 0, AllowSceneObjects = false, Margin = new Thickness(4, 2, 4, 0)
            };
            this._PrefabField.Label.text = "Prefab";

            this._CacheSizeField = new Skill.Editor.UI.IntField()
            {
                Row = 1, Column = 0, Margin = new Thickness(4, 2, 4, 2)
            };
            this._CacheSizeField.Label.text = "CacheSize";

            this._TbGrowable = new Skill.Editor.UI.ToggleButton()
            {
                Row = 2, Column = 0, Margin = new Thickness(4, 2, 4, 2)
            };
            this._TbGrowable.Label.text = "Growable?";

            this.Padding    = new Thickness(2);
            this.AutoHeight = true;
            this.RowDefinitions.Add(1, GridUnitType.Star);
            this.RowDefinitions.Add(1, GridUnitType.Star);
            this.RowDefinitions.Add(1, GridUnitType.Star);
            this.ColumnDefinitions.Add(1, GridUnitType.Star);

            this.Controls.Add(_PrefabField);
            this.Controls.Add(_CacheSizeField);
            this.Controls.Add(_TbGrowable);

            this._CacheSizeField.ValueChanged += _CacheSizeField_ValueChanged;
            this._TbGrowable.Changed          += _TbGrowable_Changed;
            this._PrefabField.ObjectChanged   += _PrefabField_ObjectChanged;

            this.Object = null;
            this.Height = _PrefabField.LayoutHeight + _PrefabField.Margin.Vertical +
                          _CacheSizeField.LayoutHeight + _CacheSizeField.Margin.Vertical +
                          _TbGrowable.LayoutHeight + _TbGrowable.Margin.Vertical + 2;
        }
예제 #2
0
 public CacheGroupListItem(CacheGroupEditor editor, Skill.Framework.Managers.CacheObject obj)
     : base(editor)
 {
     this.Object = obj;
 }