Esempio n. 1
0
        public static bool edit(ref LinearColor col)
        {
            var c = col.ToGamma();

            if (edit(ref c))
            {
                col.From(c);
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        public bool ColorSliders_PEGI()
        {
            if (InspectedPainter != null)
            {
                return(ColorSliders());
            }

            bool changed = false;

            Color col = colorLinear.ToGamma();

            if (pegi.edit(ref col).nl())
            {
                colorLinear.From(col);
                changed = true;
            }

            changed |= ChannelSlider(BrushMask.R, ref colorLinear.r, null, true);
            changed |= ChannelSlider(BrushMask.G, ref colorLinear.g, null, true);
            changed |= ChannelSlider(BrushMask.B, ref colorLinear.b, null, true);
            changed |= ChannelSlider(BrushMask.A, ref colorLinear.a, null, true);

            return(changed);
        }