Cute_demon_attacks/meng_yao/Assets/script/TanChuang/Customer_serviceTanchuang.cs

44 lines
1.6 KiB
C#
Raw Normal View History

2024-11-15 15:13:21 +08:00
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<BoxType> boxTypes = new List<BoxType>();
boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 13, content = "<22>ͷ<EFBFBD><CDB7><EFBFBD>ϵ<EFBFBD><CFB5>ʽ<EFBFBD><CABD>qq<71><71>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<input_box_pop_up_window>().minHeight = 300;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͸߶<CDB8>
gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(0);//<2F><><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>ģʽΪ<CABD><CEAA><EFBFBD><EFBFBD>
//gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(0);//<2F><><EFBFBD>ù<EFBFBD><C3B9><EFBFBD>ģʽΪ<CABD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "<22><>ϵ<EFBFBD>ͷ<EFBFBD>");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
gameObjects[1].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//<2F><>¼ȷ<C2BC><C8B7><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>
{
if (type == 1)
{
gameObject.GetComponent<input_box_pop_up_window>().destroy();
}
});
}
// Update is called once per frame
void Update()
{
}
}