public static GeneralWindowDialog Create(Camera camera = null) { GameObject _tmpObj = Resources.Load("Prefab/GeneralWindowDialog/GeneralWindowDialog") as GameObject; if (_tmpObj == null) { return(null); } GameObject _newObj = Instantiate(_tmpObj) as GameObject; if (_newObj == null) { return(null); } UnityUtil.SetObjectEnabledOnce(_newObj, true); GeneralWindowDialog dialog = _newObj.GetComponent <GeneralWindowDialog>(); if (camera != null && dialog != null) { dialog.SetCamera(camera); } return(dialog); }
void OnClickGeneralWindow(OthersInfoListContext item) { SoundUtil.PlaySE(SEID.SE_MENU_OK2); GeneralWindowDialog dialog = GeneralWindowDialog.Create(); dialog.SetGroupID(item.ID); dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.CLOSE, () => { }); dialog.Show(); }
public void OnClickOpen() { GeneralWindowDialog dialog = GeneralWindowDialog.Create(); dialog.SetGroupID(m_CurrentID); dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.YES, () => { Debug.Log("Send Yes"); }); dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.NO, () => { Debug.Log("Send No"); }); dialog.SetDialogEvent(GeneralWindowDialog.ButtonEventType.CLOSE, () => { Debug.Log("Send Close"); }); dialog.Show(); }