private void InitializeButtons()
        {
            buttons.Clear();

            foreach (Transform child in buttonParent)
            {
                AppBarButton appBarButton = child.GetComponent <AppBarButton>();
                if (appBarButton == null)
                {
                    throw new Exception("Found a transform without an AppBarButton component under buttonTransforms!");
                }

                appBarButton.InitializeButtonContent(this);
                // Set to invisible initially if not custom
                switch (appBarButton.ButtonType)
                {
                case ButtonTypeEnum.Custom:
                    break;

                default:
                    appBarButton.SetVisible(false);
                    break;
                }

                buttons.Add(appBarButton);
            }
        }
Exemple #2
0
        private void InitializeButtons()
        {
            buttons.Clear();

            foreach (Transform child in buttonParent)
            {
                AppBarButton appBarButton = child.GetComponent <AppBarButton>();
                if (appBarButton == null)
                {
                    throw new Exception("Found a transform without an AppBarButton component under buttonTransforms!");
                }

                appBarButton.InitializeButtonContent(this);
                // Set to invisible initially
                appBarButton.SetVisible(false);

                buttons.Add(appBarButton);
            }
        }