AntTweakBar.Color4Variable.Color4Variable C# (CSharp) Метод

Color4Variable() публичный Метод

Creates a new RGBA color variable in a given bar.
public Color4Variable ( Bar bar, float r, float g, float b, float a, String def = null ) : System
bar Bar The bar to create the RGBA color variable in.
r float The initial red channel value of the variable.
g float The initial green channel value of the variable.
b float The initial blue channel value of the variable.
a float The initial alpha channel value of the variable.
def String An optional definition string for the new variable.
Результат System
        public Color4Variable(Bar bar, float r = 0, float g = 0, float b = 0, float a = 0, String def = null)
            : base(bar, InitColor4Variable, def)
        {
            Validating += (s, e) => { e.Valid = (0 <= e.R) && (e.R <= 1); };
            Validating += (s, e) => { e.Valid = (0 <= e.G) && (e.G <= 1); };
            Validating += (s, e) => { e.Valid = (0 <= e.B) && (e.B <= 1); };
            Validating += (s, e) => { e.Valid = (0 <= e.A) && (e.A <= 1); };

            ValidateAndSet(r, g, b, a);
        }