Esempio n. 1
0
        protected override bool SetupView()
        {
            bool flag = Singleton <PlayerModule> .Instance.playerData.teamLevel >= MiscData.Config.BasicConfig.GachaUnlockNeedPlayerLevel;

            if (!flag && (this._currentShopType == UIShopType.SHOP_GACHATICKET))
            {
                this._currentShopType = UIShopType.SHOP_NORMAL;
            }
            switch (this._currentShopType)
            {
            case UIShopType.SHOP_NORMAL:
                this.SetupNormalStoreTab();
                break;

            case UIShopType.SHOP_ENDLESS:
                this.SetupEndlessStoreTab();
                break;

            case UIShopType.SHOP_ACTIVITY:
                this.SetupActivityStoreTab();
                break;

            case UIShopType.SHOP_GACHATICKET:
                this.SetupGachaTicketStoreTab();
                break;
            }
            base.view.transform.Find("ShopTab/SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket").gameObject.SetActive(flag);
            this.TrySetCartInfoPanel();
            return(false);
        }
Esempio n. 2
0
        private void SetupGachaTicketStoreTab()
        {
            this._currentShopType = UIShopType.SHOP_GACHATICKET;
            GameObject   gameObject = base.view.transform.Find("ShopTab").gameObject;
            List <Goods> goodsList  = new List <Goods>();

            foreach (int num in Singleton <PlayerModule> .Instance.playerData.gachaTicketPriceDict.Keys)
            {
                Goods item = new Goods();
                item.set_goods_id((uint)num);
                goodsList.Add(item);
            }
            StoreDataItem storeDataItem = new StoreDataItem(true, "Menu_Label_GachaTicket", "Menu_Label_GachaTicket", goodsList);

            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1").GetComponent <Button>().interactable           = true;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2").GetComponent <Button>().interactable           = true;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket").GetComponent <Button>().interactable = false;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity").GetComponent <Button>().interactable    = true;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1/Text").GetComponent <Text>().color           = Color.white;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2/Text").GetComponent <Text>().color           = Color.white;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket/Text").GetComponent <Text>().color = MiscData.GetColor("Black");
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity/Text").GetComponent <Text>().color    = Color.white;
            if (storeDataItem != null)
            {
                base.view.transform.Find("ShopTab").GetComponent <MonoShopStoreTab>().SetupView(UIShopType.SHOP_GACHATICKET, storeDataItem, gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket/Text").GetComponent <Text>(), true, true);
            }
        }
Esempio n. 3
0
 public StoreDataItem(bool isOpen, string shopNameTextID, string shopButtonNameTextID, List <Goods> goodsList)
 {
     this.shopType             = UIShopType.SHOP_GACHATICKET;
     this.isOpen               = isOpen;
     this.shopNameTextID       = shopNameTextID;
     this.shopButtonNameTextID = shopButtonNameTextID;
     this.goodsList            = goodsList;
 }
Esempio n. 4
0
 public StoreDataItem GetStoreDataByType(UIShopType shopType)
 {
     if (this._shopDict.ContainsKey(shopType))
     {
         return(this._shopDict[shopType]);
     }
     return(null);
 }
Esempio n. 5
0
        public ShopPageContext(UIShopType shopType = 1)
        {
            ContextPattern pattern = new ContextPattern {
                contextName    = "ShopPageContext",
                viewPrefabPath = "UI/Menus/Page/Shop/ShopOverviewPage",
                cacheType      = ViewCacheType.AlwaysCached
            };

            base.config           = pattern;
            base.showSpaceShip    = false;
            this._currentShopType = shopType;
        }
Esempio n. 6
0
 public void SetupView(UIShopType shopType, StoreDataItem storeDataItem, Text tabText, bool playAnim = true, bool clearCurrentSelectGoods = true)
 {
     this._shopType = shopType;
     if (clearCurrentSelectGoods)
     {
         this._currentSelectedGoodsID = 0;
         base.transform.parent.Find("CartInfoPanel/Info").gameObject.SetActive(false);
     }
     this._scrollViewTrans = base.transform.Find("ScrollView");
     this._storeDataItem   = storeDataItem;
     this.SetShopIsOpen();
     tabText.text = LocalizationGeneralLogic.GetText(this._storeDataItem.shopNameTextID, new object[0]);
     this.SetupMetalNum();
     this.SetupAutoRefreshInfo();
     this.SetupManualRefreshInfo();
     this.SetupGoodsItem(playAnim);
     base.transform.Find("SpecialDesc").gameObject.SetActive(false);
 }
Esempio n. 7
0
        private void SetupNormalStoreTab()
        {
            this._currentShopType = UIShopType.SHOP_NORMAL;
            GameObject    gameObject      = base.view.transform.Find("ShopTab").gameObject;
            StoreDataItem storeDataByType = Singleton <StoreModule> .Instance.GetStoreDataByType(UIShopType.SHOP_NORMAL);

            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1").GetComponent <Button>().interactable           = false;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2").GetComponent <Button>().interactable           = true;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket").GetComponent <Button>().interactable = true;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity").GetComponent <Button>().interactable    = true;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1/Text").GetComponent <Text>().color           = MiscData.GetColor("Black");
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_2/Text").GetComponent <Text>().color           = Color.white;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_GachaTicket/Text").GetComponent <Text>().color = Color.white;
            gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_Activity/Text").GetComponent <Text>().color    = Color.white;
            if (storeDataByType != null)
            {
                base.view.transform.Find("ShopTab").GetComponent <MonoShopStoreTab>().SetupView(UIShopType.SHOP_NORMAL, storeDataByType, gameObject.transform.Find("SystemInfoPanel/TitleTab/TabBtns/TabBtn_1/Text").GetComponent <Text>(), true, true);
            }
        }
Esempio n. 8
0
 public StoreDataItem(Shop shopDataItem)
 {
     this.shopType = UIShopType.SHOP_GACHATICKET;
     this.shopID   = (int)shopDataItem.get_shop_id();
     this.isOpen   = shopDataItem.get_is_open();
     if (shopDataItem.get_shop_typeSpecified())
     {
         this.shopType = (UIShopType)shopDataItem.get_shop_type();
     }
     this.shopNameTextID        = shopDataItem.get_text_map_name();
     this.shopButtonNameTextID  = shopDataItem.get_text_map_button_name();
     this.goodsList             = shopDataItem.get_goods_list();
     this.nextAutoRefreshTime   = shopDataItem.get_next_auto_refresh_time();
     this.scheduleChangeTime    = shopDataItem.get_schedule_change_time();
     this.manualRefreshTimes    = (int)shopDataItem.get_manual_refresh_times();
     this.refreshItemID         = (int)shopDataItem.get_refresh_item();
     this.nextRefreshCost       = (int)shopDataItem.get_next_refresh_cost();
     this.maxManualRefreshTimes = (int)shopDataItem.get_max_manual_refresh_times();
     this.currencyIDList        = new List <int>();
     foreach (uint num in shopDataItem.get_currency_list())
     {
         this.currencyIDList.Add((int)num);
     }
 }