protected void Awake()
    {
        loadedData = SaveLoadWordData.Load();
        LanguageListDropdownSet();
        ListLanguageOptionsDropdownsSet();
        DifficultyListDropdownSet();

        languageListDropdown.onValueChanged.AddListener(ListValueChanged);
        languageToTranslateDropdown.onValueChanged.AddListener(ToTranslateLanguageValueChanged);
        translationLanguageDropdown.onValueChanged.AddListener(TranslationLanguageValueChanged);

        nextButton.onClick.AddListener(() => OnNextButtonPressed());
        backButton.onClick.AddListener(() => OnBackButtonPressed());
    }
    public void Activate()
    {
        allData = SaveLoadWordData.Load();
        DeleteCurrentButtons();
        namePopUp.gameObject.SetActive(false);
        wordListEditScreen.gameObject.SetActive(false);
        GenerateListButtons();

        saveButton.onClick.RemoveAllListeners();
        backButton.onClick.RemoveAllListeners();

        saveButton.onClick.AddListener(() => OnSaveClicked());
        backButton.onClick.AddListener(() => OnBackClicked());

        title.text = "Word lists";
    }
Ejemplo n.º 3
0
 public void SetLanguages(string wordlistName, string languageToTranslate, string translationLanguage)
 {
     SelectedWordList    = SaveLoadWordData.Load().GetFullWordListByListName(wordlistName);
     LanguageToTranslate = SelectedWordList.GetSectionByLanguage(languageToTranslate);
     TranslationLanguage = SelectedWordList.GetSectionByLanguage(translationLanguage);
 }