Exemple #1
0
        private void SetupChatList()
        {
            MonoGridScroller component = base.view.transform.Find("Dialog/Content/ChatList/ScrollView").GetComponent <MonoGridScroller>();

            component.Init(new MonoGridScroller.OnChange(this.OnScrollChange), this.GetScrollerCount(), null);
            component.ScrollToEnd();
        }
Exemple #2
0
        private void SetupFriendList()
        {
            MonoGridScroller component = base.view.transform.Find("Dialog/Content/FriendListPanel/FriendList/ScrollView").GetComponent <MonoGridScroller>();
            RectTransform    transform = base.view.transform.Find("Dialog/Content/FriendListPanel/FriendList").GetComponent <RectTransform>();
            int friendChatCount        = Singleton <ChatModule> .Instance.GetFriendChatCount();

            float size = Mathf.Clamp((float)((friendChatCount * 60f) + 30f), (float)215.3f, (float)351.3f);

            transform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, size);
            this._friendTabManager.Clear();
            component.Init(new MonoGridScroller.OnChange(this.OnFriendScrollChange), friendChatCount, null);
            component.ScrollToEnd();
        }
Exemple #3
0
        public void SetupView(Action onGetBtnClick = null)
        {
            this._onGetBtnClick       = onGetBtnClick;
            this._scrollViewTrans     = base.transform.Find("ScrollView");
            this._welfareDataItemList = Singleton <ShopWelfareModule> .Instance.GetWelfareDataItemList();

            MonoGridScroller component = this._scrollViewTrans.GetComponent <MonoGridScroller>();

            component.Init(new MonoGridScroller.OnChange(this.OnScrollChange), this._welfareDataItemList.Count, new Vector2(0f, 1f));
            if (this._scrollViewTrans.gameObject.activeInHierarchy)
            {
                MonoScrollerFadeManager manager = this._scrollViewTrans.GetComponent <MonoScrollerFadeManager>();
                manager.Init(component.GetItemDict(), null, new Func <RectTransform, RectTransform, bool>(this.IsWelfareDataItemEqual));
                manager.Play();
            }
        }
Exemple #4
0
 private void SetupTheRewardPanel()
 {
     if (this._signInRewardStatus == null)
     {
         LoadingWheelWidgetContext widget = new LoadingWheelWidgetContext(0x7a, null);
         Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any);
     }
     else
     {
         base.view.transform.Find("Dialog/Content/MonthPanel").gameObject.SetActive(true);
         base.view.transform.Find("Dialog/Content/GetRewardBtn").gameObject.SetActive(true);
         MonoGridScroller component = base.view.transform.Find("Dialog/Content/MonthPanel/ScrollView").GetComponent <MonoGridScroller>();
         int num  = ((this._daysOfMonth % 6) != 0) ? ((this._daysOfMonth / 6) + 1) : (this._daysOfMonth / 6);
         int num2 = (int)((this._signInRewardStatus.get_next_sign_in_day() - 1) / 6);
         component.Init(new MonoGridScroller.OnChange(this.OnScrollerChanged), this._signInRewardItemList.Count, new Vector2(0f, 1f - (((float)num2) / ((float)num))));
     }
 }