Esempio n. 1
0
    public void ShowPopup(POPUP_TYPE type, Popup.PopupBaseData data = null)
    {
        if (CurrentPopup == type)
        {
            DismissPopup();
        }

        if (PopupList.ContainsKey(type) == false)
        {
            return;
        }

        var popup = PopupList[type];

        popup.gameObject.SetActive(true);

        CurrentPopup = type;
        QueuePopupType.Add(type);

        // sortingOrder

        SortCanvasDepth();

        popup.SetData(data);
    }
Esempio n. 2
0
    public void activeoffPopup(POPUP_TYPE type)
    {
        switch (type)
        {
        case POPUP_TYPE.loading:
            popup_loading.SetActive(false);
            break;

        case POPUP_TYPE.err:
            popup_err.SetActive(false);
            break;

        case POPUP_TYPE.obj:
            popup_obj.SetActive(false);
            break;

        case POPUP_TYPE.video:
            popup_video.SetActive(false);
            break;

        case POPUP_TYPE.camera:
            popup_camera.SetActive(false);
            break;
        }
    }
    public void ShowPopupMessage(POPUP_TYPE popup_type, MESSAGE_IDX msg_idx)
    {
        GameObject objSubView = Instantiate(Resources.Load("UI/Misc/PopupManager")) as GameObject;

        objSubView.transform.SetParent(objUpperUI);
        objSubView.GetComponent <RectTransform>().anchoredPosition = Vector2.zero;
        objSubView.GetComponent <PopupManager>().SetPopupMasseage(popup_type, msg_idx);
    }
Esempio n. 4
0
    public bool IsLoadPopup(POPUP_TYPE type)
    {
        if (mPopupUIList.ContainsKey(type))
        {
            return(true);
        }

        return(false);
    }
Esempio n. 5
0
    public void ShowPopup(POPUP_TYPE type, PopupUIData data = null)
    {
//        SoundManager.Instance.PlayFXSound(CommonData.SOUND_TYPE.BUTTON);
        var popup = mPopupUIList[type];

        if (mShowPopup != null && mShowPopup.GetPopupType() == popup.GetPopupType())
        {
            return;
        }

        popup.gameObject.SetActive(true);
        popup.ShowPopup(data);
        mShowPopup = popup;
        mShowPopupList.Add(popup);
    }
Esempio n. 6
0
    public GameObject PopUpMsg(string strTitle, POPUP_TYPE type = POPUP_TYPE.YES_NO)
    {
        GameObject PopUpMsg = Instantiate(_PopupMsg) as GameObject;

        PopUpMsg.transform.Find("Title").GetComponent <UILabel>().text = strTitle;

        if (type.Equals(POPUP_TYPE.YES_NO))
        {
            PopUpMsg.GetComponent <PopupMsg>().m_popUpType = POPUP_TYPE.YES_NO;
        }
        else if (type.Equals(POPUP_TYPE.CONFIRM))
        {
            PopUpMsg.GetComponent <PopupMsg>().m_popUpType = POPUP_TYPE.CONFIRM;
        }

        return(PopUpMsg);
    }
Esempio n. 7
0
 public GameObject getPopup(POPUP_TYPE type)
 {
     if (type == POPUP_TYPE.loading)
     {
         return(popup_loading);
     }
     else if (type == POPUP_TYPE.err)
     {
         return(popup_err);
     }
     else if (type == POPUP_TYPE.obj)
     {
         return(popup_obj);
     }
     else if (type == POPUP_TYPE.video)
     {
         return(popup_video);
     }
     else if (type == POPUP_TYPE.camera)
     {
         return(popup_camera);
     }
     return(null);
 }
Esempio n. 8
0
    public void DismissPopup(POPUP_TYPE type)
    {
        if (QueuePopupType.Count <= 0)
        {
            return;
        }

        if (QueuePopupType.Contains(type) == false)
        {
            return;
        }

        PopupList[type].gameObject.SetActive(false);

        QueuePopupType.RemoveAt(QueuePopupType.Count - 1);
        if (QueuePopupType.Count <= 0)
        {
            CurrentPopup = POPUP_TYPE.NONE;
        }
        else
        {
            CurrentPopup = QueuePopupType[QueuePopupType.Count - 1];
        }
    }
Esempio n. 9
0
 public void SetPopupMasseage(POPUP_TYPE type, MESSAGE_IDX msg_idx)
 {
     popupType  = type;
     messageIdx = msg_idx;
     updateView();
 }
Esempio n. 10
0
 public bool IsShowPopup(POPUP_TYPE type)
 {
     return(CurrentPopup == type);
 }
 /// <summary>
 /// 팝업 객체들을 끈다.
 /// </summary>
 void DisablePopup()
 {
     CurPopupType = POPUP_TYPE.NONE;
     gameObject.SetActive(false);//어미만 끈다.
 }
 /// <summary>
 /// type에 맞는 객체를 켜주고 다른거는 꺼주는 함수
 /// </summary>
 /// <param name="type">키고자 하는 객체의 타입</param>
 void SetTypeEnablePopup(POPUP_TYPE type)
 {
     CurPopupType = type;
     PopupObj[(uint)type].SetActive(true);
     PopupObj[(uint)(type == POPUP_TYPE.STAGE_INFO ? POPUP_TYPE.SWEEP : POPUP_TYPE.STAGE_INFO)].SetActive(false);
 }