Exemple #1
0
 public void SetExpand(bool expand)
 {
     this.expand = expand;
     if (expand)
     {
         paramTable.GetComponent <UIWidget>().alpha = 1f;
     }
     else
     {
         paramTable.GetComponent <UIWidget>().alpha = 0.001f;
     }
     background.height = ((!expand) ? NORMAL_HEIGHT : EXPANDED_HEIGHT);
 }
Exemple #2
0
 void Update()
 {
     if (tableType1.transform.parent.GetComponent <UIScrollView>().isDragging)
     {
         btnCreateGame.SetActive(false);
         return;
     }
     if (tableType1.GetComponent <UICenterOnChild>().centeredObject != null && tableType1.transform.childCount > 0)
     {
         btnCreateGame.SetActive(tableType1.GetComponent <UICenterOnChild>().centeredObject == tableType1.transform.GetChild(0).gameObject);
         return;
     }
     btnCreateGame.SetActive(true);
 }
Exemple #3
0
 void Start()
 {
     HeaderMenuView.Instance.ShowInWorldGame();
     presenter = new PokerPlazaPresenter(this);
     UIEventListener.Get(btnPlayNow).onClick += this.OnBtnPlayNowClick;
     UIEventListener.Get(btnLobby).onClick   += this.OnBtnLobbyClick;
     UIEventListener.Get(btnLeague).onClick  += this.OnBtnLeagueClick;
     UIEventListener.Get(btnEvent).onClick   += this.OnBtnEventClick;
     UIEventListener.Get(btnHelp).onClick    += this.OnBtnHelpClick;
     UIEventListener.Get(btnReplay).onClick  += this.OnBtnHelpClick;
     foreach (GameObject item in btnFreeGold)
     {
         UIEventListener.Get(item).onClick += this.OnClickPromotion;
     }
     tablePromotion.GetComponent <UICenterOnChild>().onCenter += onTablePromotionGoToCenter;
     tableEvent.GetComponent <UICenterOnChild>().onCenter     += onTableEventGoToCenter;
     initIndicator(btnFreeGold.Length, indicatorPromotion);
     fetchEvent();
 }
        protected override void InitUI()
        {
            base.InitUI();

            //初始化对象池
            _tabCache  = new FRenderCache <UIToggle>(tabTable, tabItemPrefab);
            _pageCache = new FRenderCache <GameObject>(pageTable, pageItemPrefab);

            //默认隐藏小箭头
            if (previous)
            {
                previous.gameObject.SetActive(false);
            }
            if (next)
            {
                next.gameObject.SetActive(false);
            }

            if (tabTable)
            {
                _tabScrollView = tabTable.GetComponentInParent <UIScrollView>();
                if (_tabScrollView)
                {
                    _tabScrollView.onMoving += SetTabArrowStatus;
                }
            }

            if (pageTable)
            {
                _centerOnChild = pageTable.GetComponent <UICenterOnChild>();
                if (_centerOnChild)
                {
                    _centerOnChild.onCenter = PageOnCenter;
                }
                _pageDragScrollView = pageTable.GetComponentInParent <UIDragScrollView>();
            }
        }