예제 #1
0
        public QuickCheckbox(string name = "QuickCheckbox", Transform parent = null, UIOptionsTag prototype = null)
        {
            IEDebug.Log("Creating Checkbox : {0}", name);
            var chBox = (UIOptionsTag)Object.Instantiate(prototype ?? Prototype);

            chBox.transform.parent = parent;
            chBox.name             = name;

            chBox.transform.localScale    = new Vector3(1, 1, 1);
            chBox.transform.localPosition = new Vector3(0, 0, 0);
            GameObject      = chBox.gameObject;
            GameObject.name = name;
            IEDebug.Log("IEMod created: " + chBox.name);
            IsChecked = BindingValue.Member(() => this.isChecked).ToBindable();
            chBox.Checkbox.onStateChange += (a, b) => {
                IsChecked.NotifyChange();
            };
        }