public override void OpenUI(int title, int msg, MSGBOX_TYPE type = MSGBOX_TYPE.OK, UITutorial.UITutorialMsgCB msgCB = null) { #region Update m_uiTutorialMsgCB = msgCB; m_labelArray[(int)LABEL_TYPE.TYPE_TITLE].text = Str.instance.Get(title); m_labelArray[(int)LABEL_TYPE.TYPE_TEXT].text = Str.instance.Get(msg); switch (type) { case MSGBOX_TYPE.OK: m_buttonArray[(int)BUTTON_TYPE.TYPE_YES].SetActive(false); m_buttonArray[(int)BUTTON_TYPE.TYPE_NO].SetActive(false); m_buttonArray[(int)BUTTON_TYPE.TYPE_OK].SetActive(true); break; case MSGBOX_TYPE.YESNO: m_buttonArray[(int)BUTTON_TYPE.TYPE_YES].SetActive(true); m_buttonArray[(int)BUTTON_TYPE.TYPE_NO].SetActive(true); m_buttonArray[(int)BUTTON_TYPE.TYPE_OK].SetActive(false); break; } #endregion SetActive(true); Hashtable hash = new Hashtable(); hash.Add("amount", new Vector3(0.05f, 0.05f, 0f)); hash.Add("time", 1f); hash.Add("ignoretimescale", true); iTween.PunchScale(m_window.gameObject, hash); SoundManager.instance.PlayAudioClip("UI_PopupOpen"); }
public void OpenTutorialMessageBox(int title, int msg, MSGBOX_TYPE type = MSGBOX_TYPE.OK, UITutorial.UITutorialMsgCB msgCB = null) { m_uiTutorial[(int)TUTORIAL_UI_TYPE.TYPE_MESSAGE].OpenUI(title, msg, type, msgCB); }