public void SelectRadioItem(RadioButton.RadioType pType) { if (mRadioGroupController != null) { mRadioGroupController.SelectItem(pType); } }
public void onNavMenuItemClick(RadioButton.RadioType pType, bool pOnlyAction = false) { if (!pOnlyAction) { mRadioGroupController.UnselectAll(); } mActionNavClick(pType); }
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; } }
private void SelectRadioItem(RadioButton.RadioType pType) { FindObjectOfType <MainNavMenuController>().SelectRadioItem(pType); }
public void SetVisibleBtn(bool pVisible, RadioButton.RadioType pType) { mRadioGroupController.radioButtons.Find(x => (x != null && x.getType() == pType)).visibleBtn(pVisible); }