private void ShowPage()
 {
     if (_selectedCategory)
     {
         _selectedCategory._pageButton.interactable = true;
         _selectedCategory._page.gameObject.SetActive(false);
         _selectedCategory = null;
     }
     _selectedCategory = this;
     _selectedCategory._pageButton.interactable = false;
     _page.gameObject.SetActive(true);
 }
Exemple #2
0
        private void Start()
        {
            _pageTemplate     = GetComponentInChildren <Modal_SettingsPageEntry>(true);
            _categoryTemplate = GetComponentInChildren <Modal_SettingsCategoryEntry>(true);
            _changeEntry      = GetComponentInChildren <Modal_SettingsChangeEntry>(true);
            _pageTemplate.gameObject.SetActive(false);
            _categoryTemplate.gameObject.SetActive(false);
            _changeEntry.gameObject.SetActive(false);

            _saveButton.onClick.AddListener(SaveChanges);
            _cancelButton.onClick.AddListener(ClearChanges);

            CreatePages();
        }