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;
|
2024-12-17 22:44:43 +08:00
|
|
|
|
public Button LogoutBtn;
|
2024-11-15 15:13:21 +08:00
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
Kfbtn.onClick.AddListener(Display_pop_up_window);
|
2024-12-17 22:44:43 +08:00
|
|
|
|
LogoutBtn.onClick.AddListener(LogoutClick);
|
2024-11-15 15:13:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2024-12-17 22:44:43 +08:00
|
|
|
|
private void LogoutClick()
|
|
|
|
|
{
|
|
|
|
|
List<BoxType> boxTypes = new List<BoxType>();
|
|
|
|
|
boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 13, content = "ȷ<><C8B7>ע<EFBFBD><D7A2>" });
|
|
|
|
|
boxTypes.Add(new BoxType { Name = "submit", textName = " ȡ<><C8A1>ȷ<EFBFBD><C8B7> ", prompt = "ȡ<><C8A1>", Type = 2 });
|
|
|
|
|
GameObject gameObject = add_pop_up();
|
|
|
|
|
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "ʵ<><CAB5><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 == 0)//ȡ<><C8A1>
|
|
|
|
|
{
|
|
|
|
|
gameObject.GetComponent<input_box_pop_up_window>().destroy();
|
|
|
|
|
}
|
|
|
|
|
else if (type == 1)//<2F>ύ
|
|
|
|
|
{
|
|
|
|
|
bool issucceffull = await Scene_main_jiekou.instance.Cancellations();
|
|
|
|
|
if (issucceffull)
|
|
|
|
|
{
|
|
|
|
|
Application.Quit();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("ע<><D7A2>ʧ<EFBFBD><CAA7>");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-15 15:13:21 +08:00
|
|
|
|
|
2024-12-17 22:44:43 +08:00
|
|
|
|
private void Display_pop_up_window()//<2F><>ϵ<EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD>
|
2024-11-15 15:13:21 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|