public static GameObject ConfirmBox(string text, string confirmID, UIUtility.DialogResultEvent okEventListener, UIUtility.DialogResultEvent cancelEventListener, GameObject parent = null, bool systemModal = false, int systemModalPriority = -1) { if (string.IsNullOrEmpty(confirmID)) { return(UIUtility.ConfirmBox(text, okEventListener, cancelEventListener, (GameObject)null, false, -1)); } GameSettings instance = GameSettings.Instance; if (PlayerPrefs.GetInt(confirmID, 0) != 0) { okEventListener((GameObject)null); return((GameObject)null); } Canvas canvas = UIUtility.PushCanvas(systemModal, systemModalPriority); if (Object.op_Inequality((Object)parent, (Object)null)) { ((Component)canvas).get_transform().SetParent(parent.get_transform()); } Win_Btn_DecideCancel_FL_Check_C decideCancelFlCheckC = UIUtility.Instantiate <Win_Btn_DecideCancel_FL_Check_C>(instance.Dialogs.YesNoDialogWithCheckBox); ((Component)decideCancelFlCheckC).get_transform().SetParent(((Component)canvas).get_transform(), false); decideCancelFlCheckC.OnClickYes = okEventListener; decideCancelFlCheckC.OnClickNo = cancelEventListener; decideCancelFlCheckC.Text_Message.set_text(text); decideCancelFlCheckC.ConfirmID = confirmID; decideCancelFlCheckC.Toggle.set_isOn(false); UIUtility.FixFont(((Component)decideCancelFlCheckC).get_gameObject()); return(((Component)decideCancelFlCheckC).get_gameObject()); }
public static GameObject NegativeSystemMessage(string title, string msg, UIUtility.DialogResultEvent okEventListener, GameObject parent = null, bool systemModal = false, int systemModalPriority = -1) { GameObject gameObject = UIUtility.SystemMessage(title, msg, okEventListener, parent, systemModal, systemModalPriority); SystemSound systemSound = !Object.op_Equality((Object)gameObject, (Object)null) ? (SystemSound)gameObject.GetComponentInChildren <SystemSound>() : (SystemSound)null; if (Object.op_Inequality((Object)systemSound, (Object)null)) { systemSound.Cue = SystemSound.ECue.Tap; } return(gameObject); }
public static GameObject SystemMessage(string title, string msg, UIUtility.DialogResultEvent okEventListener, GameObject parent = null, bool systemModal = false, int systemModalPriority = -1) { GameSettings instance = GameSettings.Instance; Canvas canvas = UIUtility.PushCanvas(systemModal, systemModalPriority); if (Object.op_Inequality((Object)parent, (Object)null)) { ((Component)canvas).get_transform().SetParent(parent.get_transform()); } Win_Btn_Decide_Title_Flx btnDecideTitleFlx = UIUtility.Instantiate <Win_Btn_Decide_Title_Flx>(instance.Dialogs.YesDialogWithTitle); ((Component)btnDecideTitleFlx).get_transform().SetParent(((Component)canvas).get_transform(), false); btnDecideTitleFlx.Text_Title.set_text(title); btnDecideTitleFlx.Text_Message.set_text(msg); btnDecideTitleFlx.OnClickYes = okEventListener; UIUtility.FixFont(((Component)btnDecideTitleFlx).get_gameObject()); return(((Component)btnDecideTitleFlx).get_gameObject()); }
public static GameObject ConfirmBox(string text, UIUtility.DialogResultEvent okEventListener, UIUtility.DialogResultEvent cancelEventListener, GameObject parent = null, bool systemModal = false, int systemModalPriority = -1) { GameSettings instance = GameSettings.Instance; Canvas canvas = UIUtility.PushCanvas(systemModal, systemModalPriority); if (Object.op_Inequality((Object)parent, (Object)null)) { ((Component)canvas).get_transform().SetParent(parent.get_transform()); } Win_Btn_DecideCancel_FL_C btnDecideCancelFlC = UIUtility.Instantiate <Win_Btn_DecideCancel_FL_C>(instance.Dialogs.YesNoDialog); ((Component)btnDecideCancelFlC).get_transform().SetParent(((Component)canvas).get_transform(), false); btnDecideCancelFlC.OnClickYes = okEventListener; btnDecideCancelFlC.OnClickNo = cancelEventListener; btnDecideCancelFlC.Text_Message.set_text(text); UIUtility.FixFont(((Component)btnDecideCancelFlC).get_gameObject()); return(((Component)btnDecideCancelFlC).get_gameObject()); }
private GameObject CreatePrefab(string resource_path, string title, string msg, UIUtility.DialogResultEvent ok_event_listener, GameObject go_parent, bool system_modal, int system_modal_priority) { Canvas canvas = UIUtility.PushCanvas(system_modal, system_modal_priority); if (Object.op_Inequality((Object)go_parent, (Object)null)) { ((Component)canvas).get_transform().SetParent(go_parent.get_transform()); } GameObject gameObject1 = AssetManager.Load <GameObject>(resource_path); if (!Object.op_Implicit((Object)gameObject1)) { Debug.LogError((object)("FlowNode_MessageBoxCustum/Load failed. '" + resource_path + "'")); return((GameObject)null); } GameObject gameObject2 = (GameObject)Object.Instantiate <GameObject>((M0)gameObject1); if (!Object.op_Implicit((Object)gameObject2)) { Debug.LogError((object)("FlowNode_MessageBoxCustum/Instantiate failed. '" + resource_path + "'")); return((GameObject)null); } Win_Btn_Decide_Title_Flx component = (Win_Btn_Decide_Title_Flx)gameObject2.GetComponent <Win_Btn_Decide_Title_Flx>(); if (!Object.op_Implicit((Object)component)) { Debug.LogError((object)"FlowNode_MessageBoxCustum/Component not attached. 'Win_Btn_Decide_Title_Flx'"); return((GameObject)null); } ((Component)component).get_transform().SetParent(((Component)canvas).get_transform(), false); component.Text_Title.set_text(title); component.Text_Message.set_text(msg); component.OnClickYes = ok_event_listener; return(((Component)component).get_gameObject()); }