SetLoading() public method

public SetLoading ( bool isLoading ) : void
isLoading bool
return void
Example #1
0
 public void init(XsollaUtils pUtils)
 {
     mUtils          = pUtils;
     _titlePage.text = (pUtils.GetProject().components ["subscriptions"].Name != "") ? pUtils.GetProject().components["subscriptions"].Name : pUtils.GetTranslations().Get(XsollaTranslations.SUBSCRIPTION_PAGE_TITLE);
     mProgressBar.SetLoading(false);
     GetSubsRequest();
 }
Example #2
0
        private void SelectGoodsGroup(XsollaGoodsGroup pGroup)
        {
            // Зачищаем панель с товарами
            ClearItemsContent();
            // Запускаем прелоадер
            mProgressBar.SetLoading(true);
            // выбор товаров по группе
            // Меняем заголовок
            mShopTitle.text = pGroup.GetName();
            mCurrGroupId    = pGroup.id;

            // запрос на данные
            Logger.Log("Load goods from groupId:" + pGroup.id.ToString());
            Dictionary <String, object> lParams = new Dictionary <string, object>();

            lParams.Add(XsollaApiConst.ACCESS_TOKEN, mUtils.GetAcceessToken());
            if (mUtils.GetUser().userBalance != null)
            {
                lParams.Add(XsollaApiConst.USER_INITIAL_CURRENCY, mUtils.GetUser().userBalance.currency);
            }
            lParams.Add("group_id", pGroup.id);
            // Если id = -1 то это распродажа и делаем запрос по другому адресу
            ApiRequest.Instance.getApiRequest(new XsollaRequestPckg((pGroup.id == -1) ? mSalesUrl : mGoodsUrl, lParams), GoodsRecived, ErrorRecived, mGroupUseCached.ContainsKey(mCurrGroupId) ? mGroupUseCached[mCurrGroupId] : true);

            SetCachedStateOnGroupId(mCurrGroupId, true);
        }
Example #3
0
        public void initWaitScreen(XsollaUtils pUtils, Action pAddPaymentMethod)
        {
            mUtilsLink        = pUtils;
            _addPaymentMethod = pAddPaymentMethod;
            mWaitChangeScreen.SetActive(true);
            mProgressBar.SetLoading(true);
            _MethodsOnWaitLoop = null;

            // Start wait change loop
            InvokeRepeating("StartGetSavedMethodLoop", 0f, 5f);
            mCancelWaitBtn.GetComponent <Button>().onClick.AddListener(() => CancelWait());
            mCanceltext.text = pUtils.GetTranslations().Get("cancel");
        }
Example #4
0
        /// <summary>
        /// Gets the request list.
        /// </summary>
        private void GetRequestList()
        {
            mProgressBar.SetLoading(true);
            Dictionary <String, object> lParams = new Dictionary <string, object>();

            lParams.Add(XsollaApiConst.ACCESS_TOKEN, mUtils.GetAcceessToken());
            lParams.Add("offset", mList.Count);
            lParams.Add("limit", mCountMore);
            lParams.Add("sortDesc", mSortDesc.ToString().ToLower());
            lParams.Add("sortKey", "dateTimestamp");
            Logger.Log("Request on history: offset - " + mList.Count + " Limit - " + mCountMore + " Sort - " + mSortDesc.ToString());
            ApiRequest.Instance.getApiRequest(new XsollaRequestPckg(mHistoryUrl, lParams), HistoryListRecived, ErrorRecived, false);
        }
 /// <summary>
 /// Progresses the bar buy button.
 /// </summary>
 /// <param name="pState">If set to <c>true</c> p state.</param>
 private void ProgressBarBuyBtn(bool pState)
 {
     if (mBtnProgressBar != null)
     {
         mBtnProgressBar.SetLoading(pState);
         mBtnBuyText.gameObject.SetActive(!pState);
         mAmountPanel.SetActive(!pState);
         mBuyBtn.GetComponent <Image>().color = pState ? new Color(255, 255, 255, 0) : new Color(255, 255, 255, 255);
     }
 }
 protected override void SetLoading(bool isLoading)
 {
     if (!isMainScreenShowed)
     {
         if (isLoading)
         {
             mainScreen.SetActive(false);
         }
         else
         {
             mainScreen.SetActive(true);
             isMainScreenShowed = true;
         }
     }
     else
     {
         if (isLoading)
         {
             Resizer.DestroyChilds(mainScreenContainer.transform);
         }
     }
     progressBar.SetLoading(isLoading);
 }