public void OnEnable() { _settingsNavigationController.didFinishEvent += OnSettingsDidFinish; _dropdown.didSelectCellWithIdxEvent += OnSelectedCell; _dropdown.SetTexts(_languageDisplayNames); _dropdown.SelectCellWithIdx(_languages.IndexOf(_selectedLanguage)); }
public void OnEnable() { _settingsNavigationController.didFinishEvent += OnSettingsDidFinish; _dropdown.didSelectCellWithIdxEvent += OnSelectedCell; _dropdown.SetTexts(_languageDisplayNames); int idx = _languages.IndexOf(_selectedLanguage); if (idx >= 0) { _dropdown.SelectCellWithIdx(idx); } else { _selectedLanguage = Locale.English; } }