示例#1
0
 public CounterLimitAccessKeyField(SharedAccessKeysEditor editor)
     : base(editor)
 {
     this._MaxAccessCountField = new Skill.Editor.UI.IntField()
     {
         Margin = new Thickness(4, 2)
     };
     this._MaxAccessCountField.Label.text = "Max Access Count";
     this.Controls.Add(_MaxAccessCountField);
     this._MaxAccessCountField.ValueChanged += _MaxAccessCountField_ValueChanged;
 }
示例#2
0
        void OnEnable()
        {
            _ScreenShot = base.serializedObject.targetObject as ScreenShot;

            _Frame = new Skill.Framework.UI.Frame("Frame");
            _Frame.Grid.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _Frame.Grid.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);
            _Frame.Grid.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);

            _BtnCustomSize = new Skill.Editor.UI.ToggleButton()
            {
                Row = 0, Column = 0, IsChecked = _ScreenShot.CustomSize
            };
            _BtnCustomSize.Label.text = "Custom size";

            Skill.Framework.UI.Thickness margin = new Skill.Framework.UI.Thickness(20, 0, 0, 0);

            _IFieldWidth = new Skill.Editor.UI.IntField()
            {
                Row = 1, Column = 0, Value = _ScreenShot.Width, Margin = margin
            };
            _IFieldWidth.Label.text = "Width";

            _IFieldHeight = new Skill.Editor.UI.IntField()
            {
                Row = 2, Column = 0, Value = _ScreenShot.Height, Margin = margin
            };
            _IFieldHeight.Label.text = "Height";

            _FFieldScale = new Skill.Editor.UI.FloatField()
            {
                Row = 1, Column = 0, Value = _ScreenShot.Scale, Margin = margin
            };
            _FFieldScale.Label.text = "Scale";

            _Frame.Grid.Controls.Add(_BtnCustomSize);
            _Frame.Grid.Controls.Add(_IFieldWidth);
            _Frame.Grid.Controls.Add(_IFieldHeight);
            _Frame.Grid.Controls.Add(_FFieldScale);

            _BtnCustomSize.Changed     += _BtnCustomSize_Changed;
            _IFieldWidth.ValueChanged  += _Width_ValueChanged;
            _IFieldHeight.ValueChanged += _Height_ValueChanged;
            _FFieldScale.ValueChanged  += _Scale_ValueChanged;

            ManageControls();
        }
示例#3
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;
        }