using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Customer_serviceTanchuang : mount { public Button Kfbtn; public Transform canvas; // Start is called before the first frame update void Start() { Kfbtn.onClick.AddListener(Display_pop_up_window); } private void Display_pop_up_window() { List boxTypes = new List(); boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 13, content = "客服联系方式:qq:5649846541654" }); boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 11 }); GameObject gameObject = add_pop_up(); gameObject.transform.position = new Vector3(Screen.width / 2, Screen.height / 2, 0); gameObject.transform.SetParent(canvas); gameObject.GetComponent().minHeight = 300;//设置最低高度 gameObject.GetComponent().setScrollMode(0);//设置滚动模式为滚动 //gameObject.GetComponent().setScrollMode(0);//设置滚动模式为自动填充 List gameObjects = gameObject.GetComponent().updateUI(boxTypes, "联系客服");//测试输入框回调处理 gameObjects[1].GetComponent().register_click(async (BoxType boxType, int type) =>//登录确定或取消 { if (type == 1) { gameObject.GetComponent().destroy(); } }); } // Update is called once per frame void Update() { } }