Ejemplo n.º 1
0
        private void SelectPanel(ENavButtonType navButtonType)
        {
            _navigationPanel.SelectButton(navButtonType);

            switch (navButtonType)
            {
            case ENavButtonType.Contacts:
                _contactPanel.gameObject.SetActive(true);
                _chatPanel.gameObject.SetActive(false);
                _settingPanel.gameObject.SetActive(false);

                InitContacts();
                break;

            case ENavButtonType.Chats:
                _contactPanel.gameObject.SetActive(false);
                _chatPanel.gameObject.SetActive(true);
                _settingPanel.gameObject.SetActive(false);
                break;

            case ENavButtonType.Settings:
                _contactPanel.gameObject.SetActive(false);
                _chatPanel.gameObject.SetActive(false);
                _settingPanel.gameObject.SetActive(true);

                _settingPanel.SetProfile();
                break;
            }
        }
Ejemplo n.º 2
0
        public void SelectButton(ENavButtonType navButtonType)
        {
            switch (navButtonType)
            {
            case ENavButtonType.Contacts:
                _btnContacts.image.color = ThemeManager.Instance.NavButtonBackground;
                _btnContacts.GetComponentInChildren <Text>().color =
                    ThemeManager.Instance.NavButtonBackground;
                //------------------------------------------------
                _btnChats.image.color = ThemeManager.Instance.NavButtonDisable;
                _btnChats.GetComponentInChildren <Text>().color = ThemeManager.Instance.NavButtonDisable;
                _btnSettings.image.color = ThemeManager.Instance.NavButtonDisable;
                _btnSettings.GetComponentInChildren <Text>().color =
                    ThemeManager.Instance.NavButtonDisable;
                break;

            case ENavButtonType.Chats:
                _btnChats.image.color = ThemeManager.Instance.NavButtonBackground;
                _btnChats.GetComponentInChildren <Text>().color =
                    ThemeManager.Instance.NavButtonBackground;
                //------------------------------------------------
                _btnContacts.image.color = ThemeManager.Instance.NavButtonDisable;
                _btnContacts.GetComponentInChildren <Text>().color =
                    ThemeManager.Instance.NavButtonDisable;
                _btnSettings.image.color = ThemeManager.Instance.NavButtonDisable;
                _btnSettings.GetComponentInChildren <Text>().color =
                    ThemeManager.Instance.NavButtonDisable;
                break;

            case ENavButtonType.Settings:
                _btnSettings.image.color = ThemeManager.Instance.NavButtonBackground;
                _btnSettings.GetComponentInChildren <Text>().color =
                    ThemeManager.Instance.NavButtonBackground;
                //------------------------------------------------
                _btnContacts.image.color = ThemeManager.Instance.NavButtonDisable;
                _btnContacts.GetComponentInChildren <Text>().color =
                    ThemeManager.Instance.NavButtonDisable;
                _btnChats.image.color = ThemeManager.Instance.NavButtonDisable;
                _btnChats.GetComponentInChildren <Text>().color = ThemeManager.Instance.NavButtonDisable;
                break;
            }
        }