Ejemplo n.º 1
0
        private void OnExampleMenuItem(AppController.EMenu id)
        {
            VWord word = m_VocabularyData[m_SelectedCategory].WordSet.GetWordById(m_SelectedWordID);

            switch (id)
            {
            case AppController.EMenu.NEXT:
                // Set next sentence
                m_SelectedExampleID++;
                m_SelectedExampleID %= word.SentencesExamples.Sentence.Count;

                SetExample(m_SelectedExampleID);
                break;

            case AppController.EMenu.KANJI:
                m_ExamplesUI.Sentence = word.SentencesExamples.Sentence[m_SelectedExampleID];
                break;

            case AppController.EMenu.KANA:
                m_ExamplesUI.Sentence = word.SentencesExamples.Kana[m_SelectedExampleID];
                break;

            case AppController.EMenu.ROMAJI:
                m_ExamplesUI.Sentence = word.SentencesExamples.Romaji[m_SelectedExampleID];
                break;
            }
        }
Ejemplo n.º 2
0
        private void OnExampleMenuItem(AppController.EMenu id)
        {
            Debug.Log("<color=cyan> [GrammarControl.OnExampleMenuItem] id: " + id.ToString() + "</color>");

            switch (id)
            {
            case AppController.EMenu.NEXT:
                // Set next sentence
                m_SelectedExample++;
                m_SelectedExample %= m_GrammarSet[m_SelectedCategory].Data[m_SelectedGrammar].SentencesExamples.Sentence.Count;

                SetExample(m_SelectedExample);
                break;

            case AppController.EMenu.KANJI:
                m_ExampleUI.Sentence = m_GrammarSet[m_SelectedCategory].Data[m_SelectedGrammar].SentencesExamples.Sentence[m_SelectedExample];
                break;

            case AppController.EMenu.KANA:
                m_ExampleUI.Sentence = m_GrammarSet[m_SelectedCategory].Data[m_SelectedGrammar].SentencesExamples.Kana[m_SelectedExample];
                break;

            case AppController.EMenu.ROMAJI:
                m_ExampleUI.Sentence = m_GrammarSet[m_SelectedCategory].Data[m_SelectedGrammar].SentencesExamples.Romaji[m_SelectedExample];
                break;
            }
        }