public EditColor(Color val1, ColorType type = ColorType.rgb, bool rangeOver = true)
 {
     this.type = type;
     range     = (rangeOver)? RANGE_2 : RANGE;
     rangeA    = RANGE;
     Set(val1);
 }
 public EditColor(Color val1, ColorType type, EditRange <float> range, EditRange <float> range_a)
 {
     this.type  = type;
     this.range = range;
     rangeA     = range_a;
     Set(val1);
 }
예제 #3
0
 // Token: 0x060002F7 RID: 759 RVA: 0x000184B9 File Offset: 0x000166B9
 protected EditValueBase(T val1, EditRange <T> attr)
 {
     this.range = attr;
     this.Set(val1);
 }
 // Token: 0x06000305 RID: 773 RVA: 0x000188D2 File Offset: 0x00016AD2
 public NamedEditValue(string name, float val1, EditRange <float> attr, Action <float> act) : base(val1, attr)
 {
     this.name = name;
     this.act  = act;
 }
 // Token: 0x06000302 RID: 770 RVA: 0x000188B2 File Offset: 0x00016AB2
 internal EditValue(float val1, EditRange <float> attr) : base(val1, attr)
 {
 }
예제 #6
0
 // Token: 0x060002FD RID: 765 RVA: 0x00018658 File Offset: 0x00016858
 internal EditIntValue(int val1, EditRange <int> attr) : base(val1, attr)
 {
 }
        public void Set(int idx, string editVal1, EditRange <float> er = null)
        {
            if (idx >= editVals.Length)
            {
                return;
            }
            editVals[idx] = editVal1;

            if (er == null)
            {
                er = GetRange(idx);
            }
            var   sync = false;
            float v;

            if (float.TryParse(editVal1, out v))
            {
                if (er.editMin > v)
                {
                    v = er.editMin;
                }
                else if (er.editMax < v)
                {
                    v = er.editMax;
                }
                else
                {
                    sync = true;
                }

                if (sync)
                {
                    if (type == ColorType.a)
                    {
                        val.a = v;
                    }
                    else
                    {
                        switch (idx)
                        {
                        case 0:
                            val.r = v;
                            break;

                        case 1:
                            val.g = v;
                            break;

                        case 2:
                            val.b = v;
                            break;

                        case 3:
                            val.a = v;
                            break;
                        }
                    }
                }
            }
            isSyncs[idx] = sync;
        }
예제 #8
0
 protected EditValueBase(T val1, string format, T min, T max)
 {
     range = new EditRange <T>(format, min, max);
     Set(val1);
 }
예제 #9
0
 protected EditValueBase(T val1, EditRange <T> attr)
 {
     range = attr;
     Set(val1);
 }