Ejemplo n.º 1
0
 public void SelectRadioItem(RadioButton.RadioType pType)
 {
     if (mRadioGroupController != null)
     {
         mRadioGroupController.SelectItem(pType);
     }
 }
Ejemplo n.º 2
0
 public void onNavMenuItemClick(RadioButton.RadioType pType, bool pOnlyAction = false)
 {
     if (!pOnlyAction)
     {
         mRadioGroupController.UnselectAll();
     }
     mActionNavClick(pType);
 }
Ejemplo n.º 3
0
        private void addMenuBtn(string pIcon, string pName, RadioButton.RadioType pType, bool pOnlyAction = false)
        {
            GameObject  menuItemPrefab = Instantiate(Resources.Load(PREFAB_VIEW_MENU_ITEM)) as GameObject;
            RadioButton controller     = menuItemPrefab.GetComponent <RadioButton>();

            controller.init(pIcon, pName, pType, delegate { onNavMenuItemClick(pType, pOnlyAction); }, 0, pOnlyAction);

            menuItemPrefab.transform.SetParent(mNavMenuPanel.transform);
            Resizer.SetDefScale(menuItemPrefab);
            mRadioGroupController.AddButton(menuItemPrefab.GetComponent <RadioButton>());
        }
 public void SelectItem(RadioButton.RadioType pType)
 {
     foreach (RadioButton btn in radioButtons)
     {
         if (btn.getType() != pType)
         {
             btn.Deselect();
         }
         else
         {
             btn.Select();
         }
     }
 }
        /// <summary>
        /// Click on nav menu items by type.
        /// </summary>
        /// <param name="pType">Type menu item.</param>
        public void NavMenuClick(RadioButton.RadioType pType)
        {
            switch (pType)
            {
            case RadioButton.RadioType.SCREEN_GOODS:
            {
                ShowGoodsShop();
                mNavMenuController.SetVisibleBtn(true, RadioButton.RadioType.SCREEN_FAVOURITE);
                break;
            }

            case RadioButton.RadioType.SCREEN_PRICEPOINT:
            {
                ShowPricePointShop();
                mNavMenuController.SetVisibleBtn(false, RadioButton.RadioType.SCREEN_FAVOURITE);
                break;
            }

            case RadioButton.RadioType.SCREEN_SUBSCRIPTION:
            {
                //LoadSubscriptions();
                DrawSubscriptions();
                mNavMenuController.SetVisibleBtn(false, RadioButton.RadioType.SCREEN_FAVOURITE);
                break;
            }

            case RadioButton.RadioType.SCREEN_REDEEMCOUPON:
            {
                ShowRedeemCoupon();
                mNavMenuController.SetVisibleBtn(false, RadioButton.RadioType.SCREEN_FAVOURITE);
                break;
            }

            case RadioButton.RadioType.SCREEN_FAVOURITE:
            {
                ShowFavGoodsShop();
                break;
            }

            case RadioButton.RadioType.SCREEN_HISTORY:
            {
                ShowHistory();
                break;
            }

            default:
                break;
            }
        }
Ejemplo n.º 6
0
 private void SelectRadioItem(RadioButton.RadioType pType)
 {
     FindObjectOfType <MainNavMenuController>().SelectRadioItem(pType);
 }
Ejemplo n.º 7
0
 public void SetVisibleBtn(bool pVisible, RadioButton.RadioType pType)
 {
     mRadioGroupController.radioButtons.Find(x => (x != null && x.getType() == pType)).visibleBtn(pVisible);
 }