Ejemplo n.º 1
0
        // Token: 0x06001385 RID: 4997 RVA: 0x0007CF48 File Offset: 0x0007B348
        protected virtual void handleNamespaceButtonClicked(Sleek2ImageButton button)
        {
            TranslationNamespaceButton translationNamespaceButton = button as TranslationNamespaceButton;

            if (translationNamespaceButton == null || translationNamespaceButton.translation == null || translationNamespaceButton.translation.tree == null)
            {
                return;
            }
            this.climbBranch(translationNamespaceButton.translation.tree);
        }
Ejemplo n.º 2
0
 // Token: 0x06001379 RID: 4985 RVA: 0x0007C98C File Offset: 0x0007AD8C
 protected virtual void climbBranch(TranslationBranch newBranch)
 {
     this.branch = newBranch;
     this.treePanel.clearElements();
     if (this.branch == null)
     {
         TranslationWindow.ETreeMode etreeMode = this.treeMode;
         string key;
         if (etreeMode != TranslationWindow.ETreeMode.ORIGIN)
         {
             if (etreeMode != TranslationWindow.ETreeMode.TRANSLATION)
             {
                 Debug.LogError("Unknown translation UI tree mode: " + this.treeMode);
                 return;
             }
             key = Translator.language;
         }
         else
         {
             key = Translator.ORIGIN_LANGUAGE;
         }
         Dictionary <string, Translation> dictionary;
         Translator.languages.TryGetValue(key, out dictionary);
         foreach (KeyValuePair <string, Translation> keyValuePair in dictionary)
         {
             TranslationNamespaceButton translationNamespaceButton = new TranslationNamespaceButton(keyValuePair.Value);
             translationNamespaceButton.clicked += this.handleNamespaceButtonClicked;
             this.treePanel.addElement(translationNamespaceButton);
         }
     }
     else
     {
         foreach (KeyValuePair <string, TranslationBranch> keyValuePair2 in this.branch.branches)
         {
             TranslationBranch value = keyValuePair2.Value;
             if (value.leaf != null)
             {
                 TranslationLeafField element = new TranslationLeafField(value.leaf);
                 this.treePanel.addElement(element);
             }
             else
             {
                 TranslationBranchButton translationBranchButton = new TranslationBranchButton(value);
                 translationBranchButton.climbButton.clicked += this.handleBranchClimbButtonClicked;
                 this.treePanel.addElement(translationBranchButton);
             }
         }
     }
 }