コード例 #1
0
    private void showPrePagePopup()
    {
        if (CurrentPageBase == null)
        {
            return;
        }

        List <UIPopupBase> stackList;

        if (_pagePopupList.ContainsKey(CurrentPageBase))
        {
            stackList = _pagePopupList[CurrentPageBase];

            if (stackList.Count > 0)
            {
                var stactpop = stackList[stackList.Count - 1];
                stactpop.ShowBaseUI();

                var uidata = _datamanager.GetData(stactpop.GetType());

                stactpop.ResetUIUpdate(uidata);
            }
            else
            {
                CurrentPageBase.ShowBaseUI();
                var uidata = _datamanager.GetData(CurrentPageBase.GetType());
                CurrentPageBase.ResetUIUpdate(uidata);
            }
        }
        else
        {
            Debug.Log("Page 없는 버그");
        }
    }
コード例 #2
0
    /// <summary>
    ///  팝업 하이어라키 부분의 최상위를 삭제해준다
    /// </summary>
    /// <returns> 팝업을 지우면 true </returns>
    public bool RemoveTopPopup()
    {
        int count = _popupList.Count;

        if (count > 0)
        {
            UIPopupBase popup = _popupList[count - 1];

            _popupList.Remove(popup);

            Destroy(popup.gameObject);

            // 팝업이 있으면 다음 팝업을 업데이트 시킨다
            if (_popupList.Count > 0)
            {
                popup = _popupList[_popupList.Count - 1];

                var data = _datamanager.GetData(popup.GetType());

                popup.ResetUIUpdate(data);
            }
            else
            {
                // 스택팝업까지만 reUpdate를 진행하자 페이지는 잠시 보류
                if (CurrentPageBase == null)
                {
                    return(false);
                }

                List <UIPopupBase> stackList = _pagePopupList[CurrentPageBase];

                if (stackList.Count > 0)
                {
                    popup = stackList[stackList.Count - 1];
                    var data = _datamanager.GetData(popup.GetType());
                    popup.ResetUIUpdate(data);
                }
                else
                {
                    var data = _datamanager.GetData(popup.GetType());
                    CurrentPageBase.ResetUIUpdate(data);
                }
            }

            return(true);
        }

        return(false);
    }
コード例 #3
0
    static public Sprite GetAtlasSprite(this UIPopupBase uiBase, string spriteName)
    {
        Sprite temp = null;

        UISpriteRepository.i.GetSprite(uiBase.GetType().ToString(), spriteName);

        return(temp);
    }