using LitJson; using SC.XR.Unity; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using XRTool.Util; using XRTool.WorldUI; namespace ShadowStudio.UI { public enum PopType { Cancel = 0, Normal = 1 } [RequireComponent(typeof(WorldDlg))] public class BasePop : MonoBehaviour { public string title = ""; public string msg = ""; public PopType popType = PopType.Normal; private Button cancelBtn; private Button defineBtn; private Button okBtn; private SCInputField scInputField; public bool ifneedInput = false; public string btnText1; public string btnText2; public Action callBack1; public Action callBack2; public Action callBack3; WorldDlg dlg; private Action closeBack; public void OnClose(Action callback) { closeBack = callback; } // Start is called before the first frame update void Start() { btnText1 = LanguageMgr.Instance.GetMessage("1066").Message; btnText2 = LanguageMgr.Instance.GetMessage("1058").Message; } public void init() { dlg = GetComponent(); dlg.showDlg(); cancelBtn = dlg.GetBreadthChild