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

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

Creates a new RGB color variable in a given bar.
public ColorVariable ( Bar bar, float r, float g, float b, String def = null ) : System
bar Bar The bar to create the RGB 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.
def String An optional definition string for the new variable.
Результат System
        public ColorVariable(Bar bar, float r = 0, float g = 0, float b = 0, String def = null)
            : base(bar, InitColorVariable, 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); };

            ValidateAndSet(r, g, b);
        }