internal InputField(GameObject parent, bool visible) : base(Addon.Instantiate(parent, "InputField"), visible) { inputField = GameObject.GetComponent <UnityEngine.UI.InputField> (); inputField.onValueChanged.AddListener(x => { Changed = true; }); }
internal Button(GameObject parent, string content, bool visible) : base(Addon.Instantiate(parent, "Button"), visible) { button = GameObject.GetComponent <UnityEngine.UI.Button> (); text = new Text(GameObject.GetChild("Text")); text.Content = content; button.onClick.AddListener(() => { Clicked = true; }); }
internal Text(GameObject parent, string content, bool visible) : base(Addon.Instantiate(parent, "Text"), visible) { text = GameObject.GetComponent <UnityEngine.UI.Text> (); Content = content; }
internal Panel(GameObject parent, bool visible) : base(Addon.Instantiate(parent, "Panel"), visible) { RectTransform.Anchor = new Tuple2(0.5f, 0.5f); }