AntTweakBar.BoolVariable.InitBoolVariable C# (CSharp) Method

InitBoolVariable() private static method

Initialization delegate, which creates the boolean variable.
private static InitBoolVariable ( Variable var, String id ) : void
var Variable
id String
return void
        private static void InitBoolVariable(Variable var, String id)
        {
            var it = var as BoolVariable;

            Variable.SetCallbacks.Add(id, new Tw.SetVarCallback(it.SetCallback));
            Variable.GetCallbacks.Add(id, new Tw.GetVarCallback(it.GetCallback));

            Tw.AddVarCB(var.ParentBar.Pointer, id,
                        Tw.VariableType.Bool8,
                        Variable.SetCallbacks[id],
                        Variable.GetCallbacks[id],
                        IntPtr.Zero, null);
        }