public static void OKCancelDialog(H type) { RoutineSetUp(); _type = type; _dialogGo = DialogGO.Create(Root.dialogOKCancel, _canvas, _middleOfScreen, _type); }
public static void OKDialog(H type, string str1 = "") { if (type == H.CompleteQuest) { str1 = MyText.DollarFormat(float.Parse(str1)); } RoutineSetUp(); _type = type; _dialogGo = DialogGO.Create(Root.dialogOK, _canvas, _middleOfScreen, _type, str1); }
static public DialogGO Create(string root, Transform container, Vector3 iniPos, H type, string str1 = "") { DialogGO obj = null; obj = (DialogGO)Resources.Load(root, typeof(DialogGO)); obj = (DialogGO)Instantiate(obj, new Vector3(), Quaternion.identity); var localScale = obj.transform.localScale; obj.transform.position = iniPos; obj.transform.SetParent(container); obj.transform.localScale = localScale; obj.Type1 = type; obj.Str1 = str1; return(obj); }
public static void InputFormDialog(H type, string str1 = "") { RoutineSetUp(); _type = type; if (type == H.Invitation) { _dialogGo = DialogGO.Create(Root.inputFormDialogInvitation, _canvas, _middleOfScreen, _type, str1); } else if (type == H.OptionalFeedback) { _dialogGo = DialogGO.Create(Root.inputFormOptionalFeedBack, _canvas, _middleOfScreen, _type, str1); } else if (type == H.MandatoryFeedback) { _dialogGo = DialogGO.Create(Root.mandatoryFeedBack, _canvas, _middleOfScreen, _type, str1); } else { _dialogGo = DialogGO.Create(Root.inputFormDialog, _canvas, _middleOfScreen, _type, str1); } }
/// <summary> /// Called from GUI /// </summary> public void EnterDraw() { if (Email.text != EmailConfirm.text) { Display.text = "Emails are not the same"; return; } else if (!DialogGO.IsValidEmail(Email.text)) { Display.text = "Invalid email"; return; } Display.text = "This week you are in! Only 1 application per week is needed"; SendIt(); ResetPlayer(); Program.WeekDraw = true; PlayerPrefs.SetInt("Week", _week); Debug.Log("Week " + _week); Qualified.SetActive(false); }